-
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
Zoom out: Add keyboard shortcut in editor #66400
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. |
packages/block-editor/src/components/keyboard-shortcuts/index.js
Outdated
Show resolved
Hide resolved
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.
I left two minor notes, but the new keyboard shortcut works as expected ✅
Size Change: +103 B (+0.01%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
efa08f6
to
8cdf4d5
Compare
It looks like it would be better to add the shortcut here in the editor package instead of the block editor package, and set the namespace to |
8cdf4d5
to
badcae7
Compare
Thank you @t-hamano! I added it to editor then, although it feels a bit weird to me that the functionality exists in block editor. On the other hand the shortcut has a bigger 'area' and we have similar shortcuts. |
Thanks for the update! I have confirmed that this command works on Windows OS as well. Another thing I noticed is that the shortcut appears even though the zoom out is not available. i.e. pattern editor, non-iframe editor, etc: I'm not sure if this PR needs to address this, but I think it will have to be addressed at some point. |
I think "editor" is the right place for it personally. Yes, block-editor supports zoom-out by default but block-editor shouldn't control the state of zoom-out, it should be just an immutable setting there (I know we have some places where we exit zoom-out in block-editor... today, but I think we should remove these ideally). |
badcae7
to
fc50e88
Compare
I moved the registration of the shortcut in |
I couldn't find a simpler shortcut with |
Browsers have |
|
I updated to ⇧⌘0 and will merge for now. |
Co-authored-by: ntsekouras <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: stokesman <[email protected]>
Co-authored-by: ntsekouras <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: stokesman <[email protected]>
What?
Part of: #50739
This PR adds a zoom out shortcut in block editor.: (⇧⌘0)
We could also add a command for this.
Testing Instructions
Test the above shortcut that works.