Extensible Site Editor: Make canvas previews full height#76201
Conversation
|
Size Change: +29 B (0%) Total Size: 6.87 MB
ℹ️ View Unchanged
|
|
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. |
|
Flaky tests detected in bfa91fe. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22730040051
|
| styles: [ | ||
| ...( editorSettings.styles ?? [] ), | ||
| ...( settings?.isPreviewMode | ||
| ? [ { css: 'body{min-height:100vh;}' } ] |
There was a problem hiding this comment.
I'm not sure this is a "lazy-editor" concern. Why would the lazy-editor be full height by default? How is this solved in other places?
There was a problem hiding this comment.
I see that it's based on canvas mode, why didn't we do the same here (I guess in "boot" package)
There was a problem hiding this comment.
Ah, I see what you mean. Looking at it now.

Follow-up to #75741
What?
Fixes the navigation being stuck to the top of the page in the preview canvas instead of centered.
Why?
UX
How?
The current site editor adds height: 100vh when the canvas is in "view" mode. The Extensible Site Editor doesn't include this, which causes the navigation preview to be stuck to the top of the page instead of centered.
I added a 100vh height to the Extensible Site Editor version of the canvas as well. I did not bring the pointer style over, as it doesn't seem needed since there's a full size button covering the canvas preview which has the pointer hand.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast