Skip to content
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

Pattern Inserter: Next #41379

Closed
2 of 4 tasks
Tracked by #38529
mtias opened this issue May 26, 2022 · 22 comments
Closed
2 of 4 tasks
Tracked by #38529

Pattern Inserter: Next #41379

mtias opened this issue May 26, 2022 · 22 comments
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Dev Note Requires a developer note for a major WordPress release cycle

Comments

@mtias
Copy link
Member

mtias commented May 26, 2022

Previously #21080 (comment)


With the focus on "building with patterns" and the expansion of the pattern directory there's a need to refine some flows around the discovery and insertion of patterns. The main things to accommodate are the growing sets of categories and provenance (theme, directory, eventually user); the drag and drop experience when building top level sections; quick browsing between categories; the ability to save, import, and manage.

One proposal from @SaxonF can be a good starting point to make improvements to these area.

To highlight the tasks that could be started:

There's also a few other ideas that can be separated, like the re-addition of a most used / quick blocks as a top row. This is something we can introduce in the main inserter as well. It's also time we make it configurable so you can set 1-4 blocks customized for quick access.

I think this iteration should be focused on patterns and exclude the presence of a "blocks" category. We can try it in the zoomed out view being introduced for the site editor.

See also: #44496


This issue was updated Sep. 28.

Initial explorations

169957234-20613edf-a7b0-4889-beef-0cc9854c508c

@mtias mtias added [Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Design Feedback Needs general design feedback. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels May 26, 2022
@mtias mtias mentioned this issue May 26, 2022
14 tasks
@pablohoneyhoney
Copy link

Exciting path! I like the scalability of this model. It's also a good example to explore in motion, and define how the second panel transitions between patterns smoothly as well as how they are dropped and rendered in the canvas.

A few granular notes on the above mock, to address when/where relevant:

  • The verbal context should perhaps avoid referring to you, and rather be more encompassing of many types of users (builders, admins, owners, editors). Like:
    Introduce the page or project with image and text. instead of Introduce yourself or your business. Or Manage the library instead of Manage your library.
  • I'm not sure what's the right proportion, but it'd be good to define a bit more tightly the width relationship between the two panels.
  • I think we are using custom scales and styles for certain components on the left panel, like the category list, selected/hover state height, and the greay area of the block icons. Same with the Search bar. And generally align further with examples like Global Styles as possible.
  • The pattern category title and subtext could potentially be more aligned with the search field, and the patterns previews having less padding in the second panel, perhaps patterns being larger. I like how visual it is but I guess we'd want to keep pattern titles?
  • Generally the radii feel a bit too rounded in relation to other editor cases (ie: toolbar), and conversely, it could be neat to try some radius in the site canvas itself (the black site are that now is squared).

@SaxonF
Copy link
Contributor

SaxonF commented Jun 1, 2022

Inserter
@pablohoneyhoney I've updated to utilise existing editor styles, including sidebar spacing of 16px. A couple of small exceptions is a softer border colour, a background colour for menu item hover states, and lighter chevron on menu items. Patterns sidebar could also just be white rather than slightly opaque grey.

sidebar-editor.mp4

Favourites
There is future potential to make favourites editable via drag interactions
image

Library
I just wanted to expand on the idea of the library as well. Your library represents everything you have available to you to craft your site and content. It would contain all block "types", possibly even templates, and allow people to build out and style the lego blocks of their site in isolation. It would live in the same space as the current templates page, eventually next to global styles, navigation etc. I know what's shown here uses light background instead of dark which is worth discussing.

There is room to simplify the mental model surrounding blocks, so the idea of reusable blocks would go away and just become a property of blocks/patterns (maybe all library items are synced by default). It should also differentiate between user created vs others e.g. via sections.

It has the potential to draw in new segments who are more systems focused (e.g. designers, enterprise etc).

You can read some earlier thoughts here.

library-waterfall.mp4

image

library.mp4

@pablohoneyhoney
Copy link

Nice!

The library itself could be a separate effort and issue all together. It also opens up a lot of other discussions and changing mental models (like the current synced blocks navigation and management versus being a property, which is interesting).

Re: the pattern inserter itself, I think we lost a bit of focus on the pattern insertion, instead of blocks' (which could remain as is for now). I also appreciated the clarity of the three panels distinguishing them via bg color (white for category listing, grey for pattern stacks, and site color for the canvas).

@SaxonF
Copy link
Contributor

SaxonF commented Jun 6, 2022

The library itself could be a separate effort and issue all together.

I'd be happy to setup a dedicated issue for this. There are a few separate threads like this and this that are worth pulling together.

the pattern inserter itself, I think we lost a bit of focus on the pattern insertion, instead of blocks

Any thoughts on how to do this without fragmenting the block inserter? I feel pretty strongly that we need to be designing in a way that minimises adding additional complexity to an already complex system/mental model/interface. For this reason I would hesitate to design a pattern insertion experience that differs from blocks, so I'd propose we make changes to the inserter as a whole.

The combination of generic canvas zoom settings, parent element selection on patterns, patterns absorbing child block settings, and removing tabs in the inserter as shown here feels like a great first start point for putting more emphasis on patterns without adding a dedicated mode. A lot of these changes have benefits beyond just patterns as well.

@SaxonF
Copy link
Contributor

SaxonF commented Jun 8, 2022

Not sold on this approach but you could split patterns out into their own panel so it becomes more of a "quickly access your library" type experience. I still prefer the single inserter approach above though, especially when considering search.

image

@jameskoster
Copy link
Contributor

jameskoster commented Jun 8, 2022

I think that's essentially how it would work in the mean time, if this feature were introduced as a part of the zoomed out view:

zoomed-out.mp4

@SaxonF
Copy link
Contributor

SaxonF commented Jun 8, 2022

I think it's important block and pattern insertion works the same regardless of how the canvas is presented, at least in core. Zoom to me is really just a zoom setting as opposed to a separate view. Eg I may want to insert blocks while zoomed out or insert patterns while zoomed in.

@jameskoster
Copy link
Contributor

Oh I agree. I was just highlighting that we can potentially try this (in the plugin) in that 'view' since it lends itself to working with patterns already.

@paaljoachim

This comment was marked as resolved.

@jasmussen

This comment was marked as outdated.

@jameskoster

This comment was marked as outdated.

@jasmussen
Copy link
Contributor

Definitely seeking an iterative approach here, just to see if any of the wonderful ideas can be extracted to land sooner. Even something like this which keeps the inserter exactly as it is, but adds the split-view & categorized panel could be a starting point:

Inserter, minimal

In saying that, I'm also not discounting any of your feedback on collabsible etc. — just: if we hustle, can we make the patterns tab contents happen for 6.1?

One minor point on the quick shortcuts: the grey backgrounds could make them look disabled. Do we have icon buttons with this styling elsewhere?

Good point. I think, and inspired by Saxon's instincts, that there's value in differentiating them somehow as "block shortcuts". This is another style we could explore:
Inserter, alt style shortcuts

It's a bit more bordered, which adds noise, but it does match the style of buttons we have for "Manage library", and the style switchers in the inspector.

Or maybe the animation that makes these appear (sliding in from the left behind the rotating Inserter → X icon) is sufficient to bring attention to that area changing, making it possible to work as just icon buttons?

Inserter, alt style shortcuts

@mtias
Copy link
Member Author

mtias commented Aug 18, 2022

I like this one:

I wouldn't want to touch how block are presented as that adds a lot more trouble. There's value in bringing the display and browsing improvements to the pattern section first.

The row of block shortcuts in the header is a nice thing to try because it can make quickly adding common items faster yet not intrusive. We need to figure out how we handle focus since right now we move to search first. That might still make the most sense for keyboard nav, with shortcuts being more of a secondary affordance.

@jasmussen
Copy link
Contributor

To those subscribed, this issue has been updated with the mockups to implement.

@kohheepeace
Copy link

kohheepeace commented Oct 5, 2022

First of all, sorry if this has already been discussed or requested. Just a request for this issue 👍

1: Hover is better than Select

I think it is better to “hover” each section than to “select” it in order to look for design inspiration.

2022-10-06 04 09 50

Ref: https://shuffle.dev demo page

2: Avoid reloading same pattern multiple times.
Is it possible to avoid re-loading a pattern that has already been loaded?

2022-10-06 04 44 42

[Just an idea to solve]

  • Redux store for patterns

@mtias mtias mentioned this issue Oct 7, 2022
57 tasks
@kevin940726
Copy link
Member

Is this now implemented in #44028? Should we close this now, or is there anything else left to implement?

@jameskoster
Copy link
Contributor

I think we can close. If anyone disagrees feel free to reopen 😁

@samiff
Copy link
Contributor

samiff commented Nov 7, 2022

Hi there 👋

In #44028 it looks like the pattern item title was visually hidden:

.block-editor-block-patterns-list__item-title {
display: none;
}

While that may work well for patterns with a lot of visual variation between them, I'm finding it a step back for patterns that are less visually striking. For example, text based patterns that look very similar to each other are a chore to locate now.

And for third-party pattern additions, I also wonder if it makes it harder in referencing those patterns for users without relying on search (e.g., Navigate to Patterns > Business Templates > ??? )

@annezazu
Copy link
Contributor

annezazu commented Nov 7, 2022

@samiff -- mind opening a new issue about this and sharing a few examples? Feel free to @ me in it and I can make sure to get the right labels on it.

@mtias
Copy link
Member Author

mtias commented Nov 10, 2022

@jameskoster I'd still like to try the shortcuts in the main header when the inserter is open for text, image, etc.

@jameskoster jameskoster reopened this Nov 10, 2022
@mtias
Copy link
Member Author

mtias commented Nov 10, 2022

We can still keep this close, it's a minor thing!

@jameskoster
Copy link
Contributor

Okay I'll open a separate issue.

@bph bph added the Needs Dev Note Requires a developer note for a major WordPress release cycle label Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Dev Note Requires a developer note for a major WordPress release cycle
Projects
Status: Done
Development

No branches or pull requests