-
Notifications
You must be signed in to change notification settings - Fork 365
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
feat: [M3-8016] - Add TagSelect to edit images drawer #10466
feat: [M3-8016] - Add TagSelect to edit images drawer #10466
Conversation
@@ -42,15 +42,15 @@ export interface TagsInputProps { | |||
/** | |||
* Callback fired when the value changes. | |||
*/ | |||
onChange: (selected: Item[]) => void; |
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.
By default, this type is string | number
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.
Tags are working well ✅
- Found a few things 🐛
- The
Cancel
button does not work for me currently - The loading state persists when the drawer is reopened
- The
Screen.Recording.2024-05-15.at.12.31.52.PM.mov
We decided as a team that going forward that we'd like to keep drawers purpose very concise. So in this case, we could split up ImageDrawer
into RestoreImageDrawer
and EditImageDrawer
. We don't need to do this now, but you can if you'd like to! It could also give us a chance to rewrite these forms to use react-hook-form
, but again, not required
Coverage Report: ✅ |
Good catch, fixed! ✅ |
Update: I opened a separate PR to handle the clean up work in order to keep this PR more focused and avoid blocking the release of this feature. (cc @bnussman-akamai) |
ab32af5
to
bfbdc9a
Compare
} | ||
|
||
type CombinedProps = Props; | ||
|
||
export type DrawerMode = 'closed' | 'create' | 'edit' | 'imagize' | 'restore'; |
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 'create' and 'imagize' modes of this drawer are no longer used, allowing for significant clean-up.
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.
Tagging looks good! 🏷️ 🎉
I did notice this behavior shown in the video. Clearing a field and saving results in no change to the Image. I'd expect a validation error if I clear the label field. We can address this later
Screen.Recording.2024-05-20.at.5.28.38.PM.mov
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.
Great PR and cleanup!
left a couple code comments.
Also, to add to either this PR or the follow up ticket you created, when encountering an API error (ex: block PUT | https://api.dev.linode.com/v4/images/private requests), the error will persist when reopening the drawer.
Lastly, it's pretty strange to be able to add to add/edit tags in create/edit flow yet they are not visible anywhere in the UI when looking at the image list (prolly a follow up with UX would be good there)
Description 📝
Adds a TagSelect to the edit image drawer based on the new field in the API.
Changes 🔄
tags
fieldImageDrawer
component, removing unused codeTarget release date 🗓️
5/28
Preview 📷
How to test 🧪
Prerequisites
Verification steps
TODO
As an Author I have considered 🤔
Check all that apply