Repository navigation
Zoom Out: Remove double click to exit hook from the block-editor package - #66335
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: -34 B (0%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
| useBlockRefProvider( clientId ), | ||
| useFocusHandler( clientId ), | ||
| useEventHandlers( { clientId, isSelected } ), | ||
| useZoomOutModeExit(), |
There was a problem hiding this comment.
Good question, why was it added here? It's good to avoid adding hooks to every block if we can capture the event higher up.
There was a problem hiding this comment.
And the other one in the editor package was added here more recently: #65963
There was a problem hiding this comment.
@andrewserong Any reason you left the other one in place?
There was a problem hiding this comment.
Thanks for the ping! Nope, I left it there by accident as there were a couple of iterations on the approach. Thanks for following up!
ellatrix
left a comment
There was a problem hiding this comment.
Works on my end, and yes agree it's an implementation detail.
…age (WordPress#66335) Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Related #50739
What?
Ideally the zoom level of the block editor should be something that you can enforce from the settings of the editor. But to be able to do so, we need to move any "smart" behavior that exists zoom-out from the block-editor package.
Also, I noticed that the
useZoomOutModeExithook is applied into places (potentially duplicate). Do we know why it was applied on the block ref at all?This PR attempt to remove that duplication but I'm not entirely sure what impact it has. The goal being no impact at all.
Testing Instructions
1- Try double click to exit zoom out.