-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upcoming: [M3-8340] - Update Manage Image Regions Drawer based on UX feedback #10674
upcoming: [M3-8340] - Update Manage Image Regions Drawer based on UX feedback #10674
Conversation
@@ -67,7 +67,7 @@ export const RegionMultiSelect = React.memo((props: RegionMultiSelectProps) => { | |||
selectedIds, | |||
sortRegionOptions, | |||
width, | |||
onClose, | |||
...rest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows us to override any prop of the Autocomplete.
Needed to make this change so I could override renderTags
@@ -68,7 +68,7 @@ export interface RegionSelectProps< | |||
|
|||
export interface RegionMultiSelectProps | |||
extends Omit< | |||
EnhancedAutocompleteProps<Region, false>, | |||
EnhancedAutocompleteProps<Region, true>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isMulti
generic should be true
for the RegionMultiSelectProps. This type was wrong.
@@ -155,7 +155,6 @@ export const RegionMultiSelect = React.memo((props: RegionMultiSelectProps) => { | |||
InputProps: { | |||
required, | |||
}, | |||
placeholder: selectedRegions.length > 0 ? '' : placeholder, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good default so I moved this special logic into AccessKeyRegions.tsx
.
We want the placeholder to always show in the Manage Regions Drawer and this logic was messing that up
Coverage Report: β
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm strongly liking this new iteration of the manage regions flow and I think it improves on a lot of the usability quirks of the original version.
Verified all the changes and the existing functionality continue to work as expected. Also verified RegionMultiSelect
works as expected in AccessKeyRegions
.
Thanks for the cleanup in RegionMultiSelect
and for test coverage.
@@ -29,13 +29,15 @@ export const AccessKeyRegions = (props: Props) => { | |||
|
|||
return ( | |||
<RegionMultiSelect | |||
onChange={onChange} | |||
placeholder={ | |||
selectedRegion.length > 0 ? ' ' : 'Select regions or type to search' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for this space?
selectedRegion.length > 0 ? ' ' : 'Select regions or type to search' | |
selectedRegion.length > 0 ? '' : 'Select regions or type to search' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I leave it as ''
(with no space) the default placeholder shows, which isn't what we want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, fixed with 6df361f
packages/manager/src/features/Images/ImagesLanding/ImageRegions/ManageImageRegionsForm.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Really happy about this change π₯
Description π
Updates the "Manage Image Regions" Drawer based on UX feedback ποΈ
Changes π
Preview π·
Screen.Recording.2024-07-11.at.12.41.49.PM.mov
Screen.Recording.2024-07-11.at.12.40.19.PM.mov
How to test π§ͺ
Prerequisites
Verification steps
multi-regions-test-image
π§ͺAs an Author I have considered π€