-
Notifications
You must be signed in to change notification settings - Fork 30
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
Classifier: Add tooltips to the Button component in ImageToolbar #6636
Conversation
@seanmiller26 please take a look at the video above for design review of the tooltips. |
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.
LGTM! Tested locally on http://localhost:6006/?path=/story/image-toolbar-image-toolbar--with-single-image-viewer and test project linked. 👍
A few minor things: For styling, can we use Grommet's Caret? The tip box should still expand to the left of the toolbar. The copy for each label should match the linked issue #4483
|
Yes, Grommet does not come with a built-in caret, but I created one from an additional html element (similar to Grommet's Tip Storybook example)
👍 Added an animation delay of 250ms and a short fade-in. I also made sure the tip only appears on devices with hover instead of a touch action. By default, Grommet's Tip appears when you touch a button on a touchscreen, but this doesn't work with the classifier UX. For example, we don't want the tip to persist when someone touches the zoom buttons on a phone.
👍 Done Lastly, I added a tiny amount of space (2px) in between each image toolbar button because they're looking crowded, especially on mobile phones or in the smaller layouts for separate frames, etc. I'll make sure to check-in once this PR is deployed. |
Package
lib-classifier
Linked Issue and/or Talk Post
Closes #4483
This is a small survey task enhancement purposely separate from the
lib-classifier_survey-task-design-changes
branch.Describe your changes
Add Grommet Tip to the buttons in the ImageToolbar. The styling matches the tips used in lib-user and lib-content.
I aligned the tip to the left of each button because there will always be enough space to the left of the toolbar regardless of screen size.
Here's a video:
tooltips.mov
How to Review
Checklist
PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.
General
yarn panic && yarn bootstrap
ordocker-compose up --build
and FEM works as expectedGeneral UX
Example Staging Project: i-fancy-cats
New Feature