-
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
Try drill down for pattern inserter #61518
Conversation
Size Change: -416 B (-0.02%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
5b7a8a7
to
d87890a
Compare
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. |
This comment was marked as resolved.
This comment was marked as resolved.
Still to do:
|
Tested this out and the biggest pain point I found is getting back to all categories as once you start scrolling the back button disappears, along with the title of the category: drill.down.pattern.movSince it's a fairly small section to return to, it's cumbersome to have to scroll all the way back up to see more. |
ea6aa9c
to
acfb0d8
Compare
packages/block-editor/src/components/inserter/block-patterns-tab/pattern-category-previews.js
Outdated
Show resolved
Hide resolved
a098115
to
f1bca98
Compare
I'd be good to get this in as soon as possible, so it can be used in #61489. Even on its own this is a nice change for 6.6. Are there any blockers? |
It's a pretty big change; I'd like more input from @WordPress/gutenberg-design especially. |
In terms of UI there is a discrepancy between how the search box works and how it is displayed between tab panels. Since we moved it inside each tab panel these two are to be solved:
|
d2039da
to
8d1ce35
Compare
The main motivation is to free up space for the canvas to be visible when you're building with patterns, especially in context where the inserter stays open as you build. That's valid enough, and if those pieces come together, this drilldown mechanism can work for it. Here's trunk: Here's this branch: The issue Anne notes appears addressed. The main tradeoff here is that it's hard to quickly get a sense of all the patterns in the various categories. That's actually a biggish tradeoff, and it's not clear it's worth it to me. I do wonder, can we apply this drilldown pattern only to smaller viewport sizes? If we do move forward, the media tab needs some love too: |
Anecdotally, just today I went browsing to look for a nice pattern, and I had this branch checked out. I immediately switched to trunk because the clicking in and out was not a great way to browse. |
Imo, if we do this, the pattern category selector should be be a select box at the top vs a drill down. That would solve the problem @jasmussen is describing I think. We need to think data views more here? |
I'm not sure the dropdown would help. It's still two clicks and lacking the clear context of the category I'm already in. As noted, I don't know I'm suggesting this to be a blocker, it's ultimately a tradeoff, but at the moment I'm leaning towards finding ways to fit the inserter with the opened "tray" better on screen, than using the drilldown, or dropdown. |
@jameskoster The previews are probably a bit too small? |
Potentially yes, it will likely depend on the pattern/category. The number of columns could be easy to adjusted, even by the user (which is also something we want to add to data views: #60630). |
@jameskoster the previews in the data grid mockup you linked to are less than the two column previews from search results available in For what we assume is an seeking behaviour to complete a set (to assemble the page with good patterns) having many small previews in a constrained space is less useful than having few large previews because it's very easy and common and expected to just scroll. I think the argument above is correct, but I do concede that having more than one in a view could be useful so it's not perfect. Yet, it's a good tradeoff considering the UX we aim for should resemble assembling a stack rather than finding waldo so each one larger is better than many of them smaller IMO. |
427f5e0
to
436409e
Compare
@draganescu I think it's a bit more nuanced; we should be aiming to create UIs that can adapt contextually, rather than optimising only for one specific flow. When you're initially building a page I agree the pattern browsing experience is better when the previews are arranged into a single column. But when you're searching for a specific pattern you've used before, a multi-column layout (or even a list) might be easier to scan. The benefit of using data views is that it empowers both the consumer and the user to craft a UI that best suits any given activity. Anyway, I appreciate it's a rabbit hole, and way beyond the scope of this PR :D |
436409e
to
23a82e8
Compare
…l panel for patterns
…nt name that makes more sense, moving content outside of header wrappers
Todo: - not sure about the roles. I don't think tree is right, but menu didn't seem right either - Should probably pass an aria-label instead of fixing it as "categories" - CSS cleanup
The showPattern and showMedia and related constants were not needed in menu.js. Also, they were using children to render inner content which has also been removed.
23a82e8
to
bed82a3
Compare
I will close this PR because as it stands it showed both the opportunity and the limitations of the UX. Given that the overall page pattern assembly is still being developed as an experiment we should probably tackle this as part of that work connected with those flows - unless the current UX proves tweak-able enough to become just right (*)
|
What?
Enables on large viewports the same drill down navigation we have in the site editor sidebar and in the small viewport for inserter categories, and in the process removes the preview pane.
Why?
The preview pane is not very useful: it creates another content area to skip for focus management, and it uses a lot of viewport area which is quite precious for assembling patterns (e.g. it should be possible on a large viewport to have both the inserter and the inspector open and assemble patterns). All that just to keep the category list available.
How?
Testing Instructions
Testing Instructions for Keyboard
N/A
Screenshots or screencast
new-inserter-explorer.mp4
Known Issues