-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Editor: Disable zoom out mode for non-iframe editor #71233
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
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: +44 B (0%) Total Size: 1.92 MB
ℹ️ View Unchanged
|
Flaky tests detected in 84990c9. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17033379511
|
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. |
Sorry, I haven't yet investigated the root cause of the issue, but can we fix this for non-iframe editors? The Zoom Out feature already has enough conditions to make it confusing when it can be used (example). Adding one more will make it even more confusing and complicated to debug, IMO. |
@Mamaduka Thanks for the review!
I'll look into why the zoom out mode doesn't work when the editor isn't iframed and whether we can fix that 👍 |
Related:
What?
This PR disables zoom out mode for the non-iframe editor.
Why?
I submitted #66789 before the WP 6.8 release to get the zoom out mode working in the non-iframe editor. At the time, the zoom out mode should have worked in the non-iframe editor, but for some reason, it appears to no longer work in the 6.8 release.
As I recall, there were a lot of changes to the zoom out mode in the 6.8 release, which might have caused it to stop working in the non-iframe editor.
How?
It's easier to disable zoom out mode than to try to get it to work in a non-iframe editor.
As mentioned in #70743, eventually the editor will always run as an iframe, so in the future we won't need to worry about non-iframe editors. The
isEditorIframed
prop can eventually be removed altogether.Testing Instructions
We need to activate a block theme to test this PR, but please note that with block themes and the Gutenberg plugin enabled, the editor always runs as an iframe, so this PR cannot be tested in the usual way:
gutenberg/packages/edit-post/src/components/layout/use-should-iframe.js
Lines 21 to 25 in 5b9c8dd
Therefore, please set
IS_GUTENBERG_PLUGIN
tofalse
before building.gutenberg/package.json
Line 22 in 5b9c8dd
wp.blocks.registerBlockType( 'test/v2', { apiVersion: '2', title: 'test' } );
Screenshots or screencast
Before
b4531c3396ff71f3e8a4069ae163cd53.mp4
After
d149f1d8b42e267acbbe76144b3d5baf.mp4