-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update alignment of preview contents in Patterns and Templates data views #61190
Update alignment of preview contents in Patterns and Templates data views #61190
Conversation
This looks like a substantial step forward, nice work. Question: what happens when a pattern is much taller than the available space, does it stick to the top and the bottom is elided? Or is it elided in both top and bottom? |
Size Change: -1 B (0%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
The former. |
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. |
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.
Let's try this.
Flaky tests detected in bf6f030. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8877259735
|
It's tricky to find a solution that works perfectly given the diverse arrangements that can exist in block patterns / templates. But the current implementation feels backwards. Templates which tend to be longer are centrally aligned which can result in previews where the header isn't flush with the top of the container. The top alignment applied to patterns suggest an inaccurate height.
This PR flips the treatments:
Patterns
Before (top aligned)
After (centrally aligned)
Templates
Before (centrally aligned)
After (top aligned)
While this is a small improvement, ideally consumers are offered more expressive display options (#60891) in the future.