-
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
Only close inserter on Escape or button press on inserter toggle #60391
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 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. |
Size Change: +49 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
This is interesting. It's growing on me, especially now that the patterns categories do not cover up your content (in the site editor). |
I feel like this should behave (and maybe share code) exactly like the list view. Can we add a close button like the list view? |
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
I would echo that this is functioning well. The Esc to close feels like a smaller step away from the modal behavior we have at the moment. Here's a GIF showing the behavior: In that GIF:
|
c97eb2c
to
148541d
Compare
fd069c3
to
bf8f690
Compare
Trying out a larger refactor of the inserter tab panels here: #61048 |
Remove the useDialog hook, as it was only used for focus outside and escape keypresses to close the inserter. It doesn't appear any semantics were added. This manually implements an escape keypress hook to close the inserter when focus is inside the inserter.
bf8f690
to
9a1ec9c
Compare
Closing in favor of #61004 |
Remove the useDialog hook, as it was only used for focus outside and escape keypresses to close the inserter. It doesn't appear any semantics were added. This manually implements an escape keypress hook to close the inserter when focus is inside the inserter.
What?
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast