-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Note
Expanding on #60021
Over the past couple years we’ve been iterating on a series of related systems with the hope of arriving at a more streamlined editing experience of composite blocks and design patterns.
The block editor began as a writing tool and evolved around blocks as the basic compositional primitive. When it comes to page building, this is a design system optimized for flexibility at the expense of broader usability. The block editor’s nested block architecture enables beautiful, complex layouts. But that same architecture can make simple editing complex for regular users.
Through iterations on the pattern mechanics we have been building towards a complementary model in which multiple blocks can be subsumed by these higher level abstractions—offering at the same time predefined layouts, easier editing, and preserving the integrity of designs.
To achieve that we cannot take shortcuts as we need to checkmark the following requirements:
- Patterns are not custom blocks, they don't have custom functionality, but are always made out of simpler and more basic blocks.
- Basic editing needs to be restricted to certain attributes (
role: content), achieving separation of content and design. - They need to support
theme.jsonstructures to govern the local look and allow for a degree of style expression. - Interacting with them should feel closer to interacting with a single block from a UX perspective while still leveraging all the block tree affordances.
The process to get there also allowed us to reconcile and share the basic mechanics between three important initiatives:
- Patterns as design sections for page building, including zoom-out.
- Transformations between patterns.
- Data bindings to connect to external data sources and meta fields.
- Partially synced patterns to allow reusing a design and layout with different content.
All these work by relying on the same basic mechanisms, which is that blocks that compose patterns expose content attributes for editing and retain other attributes locked.
Improving contentOnly
Now a last piece that remains to be improved is the simplification of the interaction layer. Both contentOnly and partially synced patterns expose its building blocks as a selection list in the sidebar.
This is a crude first version that only allows selecting the individual blocks that make a pattern. The proposal here is to expand this presentation and expose the editable fields coming from the content role of the blocks contained in the pattern directly in the inspector:
This would allow the pattern to feel even more like a single object with a series of attributes (that happen to be blocks).
- Inspector split between “content” and “styles”. No “settings”.
- Styles should render the visual style cards we use in global styles, not the buttons.
- In Content, all blocks are listed with its role “content” attributes present as fields.
- We show block icon and block name.
- When we have more than one editable attribute (like alt text or captions on images) we collapse into an item group with a flyout menu or drilldown.
- Text fields should be rich text powered but not show toolbars (shortcuts like command+b should still work).
- Content blocks that are also wrappers (List, Quote, Gallery) could also be presented as a single item and open in a flyout or drilldown. Maybe we need some heuristics on number of children there.
- Bonus: we could include toggles to hide a block from a pattern like we do with block hooks, maybe only on hover or behind an ellipsis menu to not pollute too much. This would allow users to slightly customize how things look but with easy access to restore.
Use contentOnly as the default editing mode for patterns
Instead of introducing Write/Design modes (#71340), or perhaps complementary to it, we could then make pattern editing default to contentOnly always. This would afford the simpler editing experience that we know is needed, without adding more complexity or modes to switch between—it’s just a function of a pattern.
To fully edit the contents of a pattern permanently the user would "detach" it, essentially exposing all its building blocks normally. If editing the content globally they would edit the pattern in isolation like it happens today.

