-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add tooltip on hover of color and typography presets #62201
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @sahiladit. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
{ () => <StylesPreviewColors /> } | ||
</Variation> | ||
<Tooltip key={ index } text={ variation?.title }> | ||
<div> |
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.
Do we need this extra div?
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.
Hi @scruffian, thanks for your review.
I tried it without the div, but it seems that the Tooltip doesn't seem to work then.
It would be good to do this for typography variations too, though happy for that to be a separate PR |
Thanks for suggestion. Addressed this in a separate PR. |
Confirming this works as expected and is a nice touch! |
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.
It's a shame that we need this extra div but I can't find a way round it.
packages/edit-site/src/components/global-styles/variations/variations-color.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Ben Dwyer <ben@scruffian.com>
Can you please include testing instructions and post the test results for users of screen readers and keyboard users. |
Also does this affect the color palette presets in every part of the UI; or only in the Styles sidebar as in the clip? |
Hi @scruffian & @carolinan, because of the extra div the focus is not working properly on the palletes. It requires two tab button clicks to focus the palette. This is how it's working now: Screen.Recording.2024-06-21.at.1.23.19.PM.movAnd if we move the Tooltip inside Screen.Recording.2024-06-21.at.1.29.01.PM.mov |
I had considered this too, I think we should try it. |
Updated it. Here's a demo, Screen.Recording.2024-06-21.at.3.14.57.PM.mov |
@scruffian Is anything else required from my side? Thanks! |
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, thanks for iterating on this!
The PHP tests seem stuck on this PR. Since the PR doesn't touch and PHP I'm going to merge it. |
What?
Fix: #61743
Why?
To improve the user experience by displaying the title of each color preset when hovering over them in the site editor's global styles palette just like it happens with the theme colors.
How?
This PR adds tooltip to the color presets in the site editor's global styles palette to display the title of each preset when hovered over.
Testing Instructions
Screenshots or screencast
Screen.Recording.2024-06-01.at.8.54.30.PM.mov