-
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 Zoom out: fix scaling issues (#65998) to WP 6.7 #66047
Conversation
.block-editor-iframe__container { | ||
width: 100%; | ||
height: 100%; | ||
overflow-x: hidden; | ||
} | ||
|
||
.block-editor-iframe__scale-container { | ||
height: 100%; | ||
} | ||
|
||
.block-editor-iframe__scale-container.is-zoomed-out { | ||
$container-width: var(--wp-block-editor-iframe-zoom-out-container-width, 100vw); | ||
$prev-container-width: var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw); | ||
width: $prev-container-width; | ||
// This is to offset the movement of the iframe when we open sidebars | ||
margin-left: calc(-1 * (#{$prev-container-width} - #{$container-width}) / 2); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaggieCabrera This file appears to have been deleted on wp/6.7
branch. But your PR includes it. Do you know what's going on there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is we are missing this PR #65977
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to backport #65977 too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. Asked there. The dependencies here are getting really hard to follow what with work moving forward in Gutenberg Plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While #65977 isn't strictly necessary for 6.7, the risks from backporting are low and bugfixes like this are being made in the CSS that was moved. So I'd say we should backport it just to make this one easier.
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: +15 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
* changed from using borders to use pseudo elements * added comments * Include frame size in the scaling calculation Instead of adding the frame size as a border (which causes reflow issues), include the frame size in the scaling calculation so there's always a left/right gutter of the frame size. * Account for scaling in the frame height * Calculation in CSS * Revert "Calculation in CSS" This reverts commit 38de9fc. * Add comment about why the calculation for scaling needs to happen in the JS * Force px value for frameSize * Restore previous frameSize var setting * Add back line break * Use padding top/bottom instead of before/after for top/bottom frame * Remove more before/after css since we are using padding --------- Co-authored-by: Jerry Jones <jones.jeremydavid@gmail.com> Co-authored-by: Alex Lende <alex+github.com@lende.xyz> Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org> Co-authored-by: jeryj <jeryj@git.wordpress.org> Co-authored-by: ajlende <ajlende@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> Co-authored-by: ndiego <ndiego@git.wordpress.org> Co-authored-by: getdave <get_dave@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> # Conflicts: # packages/block-editor/src/components/iframe/style.scss
b8e2f85
to
ece23b4
Compare
Flaky tests detected in ece23b4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11320740158
|
Backport of #65998