-
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 engage zoom out mode if the editor is focused on certain entities #61044
Comments
Did some digging for this, surprisingly more "complicated" for such a seemingly simple thing:
Not sure if/what to do about that.
These point to the idea that there should be some setting that higher level editors should send to the block editor to disable zoom out from engaging, when it does so automatically. However, I thought that yet another setting for a small impact feature, maybe there is another way, like not allowing the user to engage the mode at all. Alas, this can't happen because:
So we can't pass a new param based on the current edited entity to the hook because we call the hook once in the block editor and once in the site editor (for now, likely it will exist in other places). Options:
Also, I may have missed something 😊 obvious and this is really very simple. |
I've seen this referred to as "spotlight mode" in the block editor docs. So maybe it's worthwhile updating it in the code?
This is what's referred to as "focus mode" in the site editor docs, and what I think of when I hear "focus mode".
Right, the
In general, I don't like the idea of setting state as a side-effect of component mounting/unmounting like we have. It should come directly from some user-generated action so that the behavior is easy to trace. If that user generated action needs to be aware of WordPress-specific things, it should come from the
I'm curious why you think this is a bad idea? It seems ,to me, to be the most reasonable way to handle things given the requirements of enabling the mode and the division of responsibilities for our packages. The I will say that the lines between |
I meant the exact opposite, that performing mode changes "from the block editor rendering one of its components" is a bad idea, and that refactoring out of that hook is a good idea 😁 |
Following the de-coupling of zoom out mode from the scaling of the canvas, the styles panel do not engage the mode anymore. |
Advances #50739
What problem does this address?
It doesn't make sense - for now - to engage zoom out mode when we're editing a template part or a single pattern. In these situations the detailed focused editing of a small amount of content makes no use of a bird's eye view.
However, currently when engaging Global Styles > Browse styles or Insert > Patterns > [any category], then zoom out mode is engage automatically.What is your proposed solution?
We should not engage zoom out mode if the editor is focused on an entity.
The text was updated successfully, but these errors were encountered: