-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix Multiple Tooltips from Focus Toolbar Shortcut on Site Editor #50349
Conversation
Size Change: +89 B (0%) Total Size: 1.38 MB
ℹ️ View Unchanged
|
4c48232
to
e5c3cab
Compare
68dfb51
to
db78d75
Compare
Flaky tests detected in db78d75. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4917270650
|
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
Fixes #49925
What?/Why?
Fixes multiple tooltips being visible when using the focus toolbar shortcut (alt + F10) on the Site Editor
How?
Implements the refactored
useShouldContextualToolbarShow()
from #50344 on the Site Editor<NavigableToolbar />
.Testing Instructions for Keyboard
Switch to a theme that can use the Site Editor, such as TT3, and go to the Site Editor:
/wp-admin/site-editor.php?canvas=edit
Block toolbar open
alt + F10
(orfn + option + F10
on mac keyboards)No selected blocks
alt + F10
(orfn + option + F10
on mac keyboards)In Select Mode
alt + F10
(orfn + option + F10
on mac keyboards)Basically, try to break it using all of the different view modes (Top Toolbar on/off, Spotlight mode, etc) and with an empty default blocks selected, a block selected, multiple blocks selected, etc. When pressing the shortcut, focus should get moved to one and only one toolbar.
Screenshots or screencast
Broken State: Only one tooltip should show