-
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
Block Styles: Remove preview from inspector panel #63039
Conversation
I've left this PR in draft status for the moment until I can confirm whether it makes sense to still remove the previews from the native editor too. |
Size Change: -470 B (-0.03%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
The native block styles UI still uses the inline preview approach and wasn't updated to the web's popover preview in #34522. I think it makes sense to address the native UI in a dedicated follow-up. |
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.
LGTM - if in doubt, chuck it out.
Before
2024-07-03.11.28.31.mp4
After
2024-07-03.11.29.34.mp4
I think we shouldn't remove the preview but instead improve the contents of the group example source—add a nicer layout with a heading, text, maybe an image or button, that better represents groups as layout units. |
Thanks for this. Let's also try an alternate approach, to see if we can get a bit closer to the request.
Perhaps something as simple as updating the group block's |
I have an alternate PR (draft only at this stage) which updates the Group block example to include a heading, paragraph, image, and button. Previously, all the Group block variations (Row, Stack, and Grid) share the same example. In the new PR, I've kept the old example content for those variations. If have any suggestions on exactly what content each variation should display, please drop a comment over on #63114 and I'll tweak it? |
Closing this in favour of #63114 |
Yea, we'd want to leverage viewportSize to maintain a "desktop" view for the preview. As well as allowing for a max height of the preview (though perhaps it's scrollable vertically). |
Fixes: #63035
What?
Removes preview popover for block styles in the block inspector sidebar.
Why?
A block style's preview is generated from the selected block type's example content. This results in some less-than-helpful previews that are also disconnected from the selected block.
This PR trials removing these previews entirely given their limited value and the ease at which a user can toggle between the available block styles to see them in action and in the real context of their page.
How?
Testing Instructions
Screenshots or screencast