Calculate viewport based on iframe size in resizable editor.#75156
Calculate viewport based on iframe size in resizable editor.#75156tellthemachines merged 1 commit intotrunkfrom
Conversation
|
Size Change: +8 B (0%) Total Size: 3 MB
ℹ️ View Unchanged
|
talldan
left a comment
There was a problem hiding this comment.
LGTM! Tests exactly as expected.
|
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. |
|
Thanks for the fix! |
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org>
|
Hello! It appears this PR may have had an unintended side-effect. Before this PR, the site editor animated smoothly, like so: gb22-5.mp4In trunk, and after this PR, the animation for entering the editor is extremely choppy: trunk.mp4I used git bisect to narrow it into this PR, which is not something I have a ton of experience with, so it is very possible I've made some errors. But nevertheless, the commit before this one works just fine for me, any theme, and after this commit, always choppy. I've chatted with a few others that were not able to reproduce this, even if it's completely consistent for me (open site editor, any theme, click to edit the full editor). So let me know if I can help debug this. CC: @tellthemachines |
What?
Fixes this bug.
Hiding blocks for a specific viewport isn't working as expected in the resizable editor, because
useViewportMatchis looking at the window size instead of the editor iframe size.This PR fixes that by wrapping the resizable editor in a
ViewportWidthProvidersouseViewportMatchcan use the actual editor size.Testing Instructions
hidden_blocks.mp4