-
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: Show style preview when hovered or focused #33933
Comments
I like the way this feels - it appears more functional while also feeling a bit more modern when handling the preview. |
I agree. This makes styles still be featured - but take up a lot less space in the sidebar. |
I tried this out using a Popover. I had to rely on a Popover SlotFill at the outer, Post Editor level since the sidebar hides any overflow. On mouseover, rendering the preview is not entirely reliable as you can see from the screen capture above. Often there's not enough time for the preview container to calculate the correct height, something it does on the fly. My guess the Popover animation and the bevy of nested iframes don't help much. Still, this happens sometimes in the block inserter previews as well. Also, for mobile (and if the popovers prove too unruly/inaccessible) I thought maybe we could reduce the preview to the currently selected (no previews) Also were there any preferences for the Default Style dropdown? Thanks! |
@shaunandrews have you thought about the "default style" dropdown and how it'd fit? It's even more pronounced now with the smaller footprint of the style selectors and seems off. Might make sense to think of a panel ellipsis menu to handle reset and setting a new default instead, like "set current option as default". |
Worked on in #34522 |
Block Styles appear in both the block's toolbar and in the editor's sidebar. Currently, styles are shown with both a rendered preview and a name. The previews are a little too small to be helpful, but also add to the overall height of the sidebar accordion. Here's how it look when a plugin adds just a few styles to the Button block:
The overall height of the accordion in the screenshot above is about 570px. It ends up pushing down more important controls like Typography and Color.
Lets move the previews so they only appear when the style is hovered or has keyboard focus. This reduces the overall footprint, and also puts more emphasis on the style's name.
The text was updated successfully, but these errors were encountered: