-
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
Zoom out: keep original viewport width (single scale) #61424
Conversation
Size Change: +1.75 kB (+0.1%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
? scaleProp( { | ||
containerWidth, | ||
windowInnerWidth, | ||
} ) |
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.
The signature of this function changed, but the old function didn't make it into 6.5, so I think it's okay, but it might be a good idea to make the scale as a function a private API before the 6.6 release. We might want to move some of the logic elsewhere.
packages/edit-site/src/components/block-editor/editor-canvas.js
Outdated
Show resolved
Hide resolved
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. |
Conflicts: packages/edit-site/src/components/block-editor/editor-canvas.js packages/editor/src/components/editor-canvas/utils.js
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 this is a good alternative to #61422, but I noticed that the preview is no longer centered - there seems to be more spacing on the right side compared to the left. Maybe this could be addressed in a follow-up:
Trunk | This PR |
---|---|
![]() |
![]() |
Conflicts: packages/block-editor/src/components/iframe/index.js
This seems resolved to me |
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.
LGTM!
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 love it!
I think this PR broke the "height" prop of the BlockCanvas component and a few other things. I'll try to see if I can fix it. |
Alternative to #61422
What?
Makes the zoom out view show a full-width page.
Why?
This avoids layout shifting when you zoom out.
How?
100vw
.100vw
and the container width.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast