-
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
Backport to 6.7: Position scaled html within available container space (#66034) #66131
Backport to 6.7: Position scaled html within available container space (#66034) #66131
Conversation
* Positions the iframed HTML canvas via translateX rather than margin-left on the iframe in order to have the scrollbar for the iframe available instead of hidden off canvas. This also fixes issues with the vertical toolbar and inserters not rerendering to their new positions. * Renames prevContainerWidthRef to initialContainerWidth so it's clearer that this is the point when zoom out was initialized, then renames the CSS vars prev-container-width to outer-container-width, using the larger value of containerWidth or initialContainerWidth so it can be more consistently named. * Force largest available window size to scale from If you started with a sidebar open, then entered zoom out, then closed the sidebar, your scaled canvas would be too large. It should match the same size as if you start with no sidebars open, then enter zoom out. This also fixes an issue where scaling could be larger than 1. * Only animate scaling on entry and exit of zoom out mode to improve animations when opening and closing sidebars. * Known divergence: When starting from a smaller canvas (sidebars open), entering zoom out, then closing sidebars, there will be reflow on the canvas. --------- Co-authored-by: jeryj <[email protected]> Co-authored-by: ajlende <[email protected]> Co-authored-by: stokesman <[email protected]> Co-authored-by: ciampo <[email protected]> Co-authored-by: MaggieCabrera <[email protected]> Co-authored-by: draganescu <[email protected]> Co-authored-by: getdave <[email protected]> Co-authored-by: dhruvang21 <[email protected]> Co-authored-by: AhmarZaidi <[email protected]> Co-authored-by: kevin940726 <[email protected]>
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: +77 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
Closing in favor of #66182 |
What?
Backports on top of #66129. Once that is merged, we can change this target branch to wp/6.7
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast