-
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
Add private isZoomOutMode
selector
#64503
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: +43 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
Flaky tests detected in 89c62b6. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10388756421
|
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.
this sounds reasonable to me, we have this pattern all over
89c62b6
to
407e3a0
Compare
What?
Adds a private selector for determining if the currenting editing mode is
zoom-out
.Why?
As zoom out is developing and becoming more integral to the editor experience, the codebase is being littered with
__unstableGetEditorMode() === 'zoom-out'
calls.This refactors to a standard selector. There is a previous precedent with the
isNavigationMode
selector.How?
Create a private selector which can be used to determine whether the editor is in
zoom-out
wirthout having to do a string comparison in every instance.Currently private as zoom out is still relatively new and untested.
I haven't done any refactoring of usage because I want buy-in on the selector before I make the effort to do that.
Testing Instructions
Difficult to test as the selector is private.
Testing Instructions for Keyboard
Screenshots or screencast