-
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
BlockPatternsList with DataViews for inserter #68030
base: trunk
Are you sure you want to change the base?
Conversation
Probably related #39308. |
Thanks for putting this together, it's cool to see that everything works :) Though I noticed that some patterns show the title beneath the preview, while others show it only in a tooltip. Also that some titles include an icon where others do not. Do you think it would make sense to try to replicate the current experience as a first step? If so we should:
Depending on how far we want to take this, we could improve the experience a lot (imo) by adjusting the layout a bit when patterns are visible, e.g.: ![]() By increasing the width of the patterns panel there may even be scope to re-introduce the preview size option for single or two-column layouts. We still need to do something about filter chips in narrow spaces, but that's a separate issue (#59696). |
Personally I'd love if we had the same treatment for all of them and control the display of title through the config dialog. It will simplify things a bit and remove any possible user confusion like why some patterns have titles and other not, etc.. If we're up to try that and not stick to the current implementation about the icon and conditional tooltip, it would be my preference.
What do you mean by
|
This is a tricky one, as there are some considerations beyond the display of list items, for example the overall width of the inserter showing both categories and patterns is very big. This is reduced in Jay's mockup, which is a win. I also tried accomplishing the same in some mockups here. It's not clear any of them are solid, though. But perhaps it's a net win? To that end, it may be a bit of a dev-question. If Jay's mockup is implementable without too much complexity, then perhaps that's fine. |
I'm not sure without trying about the header expanding in both panels (from Jay's mockup). Besides that, do you suggest that the inserter's first panel width is reduced for every category (blocks, patterns, media) or just patterns. I'd expect to be reduced for everything. |
Currently I see this: ![]() Note how the preview container is much taller than the pattern leading to a lot of wasted space. We should improve this if possible.
The idea was that the entire inserter width expanded when you select Patterns. No more separate columns. The categories would be a vertical |
0c27165
to
aa44a80
Compare
aa44a80
to
c9fdc5a
Compare
What?
Related: #66549
This PR explores having a
BlockPatternsList
component powered by DataViews. This is a WIP and the PR aims to examine whether that would be a good fit design wise and what other challenges exist with the current DataViews components and the intended usage.For now I've hacked (incompletely - but enough to get going) the patterns list in the inserter.
Would the inserter be better design wise with DataViews (filters, etc..) ? --cc @WordPress/gutenberg-design
Notes
grid
layout implements an automatic handling ofpreview sizes
based on the viewport and it's obvious in this PR that this can't work well when we want to have aDataViews
instance in a specific container and not full screen.grid
layout is rough and we need to handle that there.Testing Instructions