Skip to content

Patterns should be discoverable from block editor #28309

@tellyworth

Description

@tellyworth

What problem does this address?

There should be a UI flow that makes it easy to discover patterns that contain a given block.

If I'm adding a Buy Now button to content, it should be easy for me to discover that my e-commerce plugin already has some patterns for product layouts that contain the Buy Now button, to save me doing it all manually.

What is your proposed solution?

An issue has been created in the Pattern Directory repo to support this on the back-end, by creating APIs for searching patterns by block: WordPress/pattern-directory#33

The UI flow for how this should work in the editor is very much an open question. This issue is intended as a place to discuss those ideas and figure out a solution.

As an example, when a block is selected in the inserter, there could be a secondary menu or selector that suggests some patterns containing that block. It would probably need to exclude the most common core blocks, since they might appear in almost any pattern. The remote pattern directory might offer some kind of relevancy or ranking to the sort order, to help display only the more useful patterns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Pattern DirectoryThe Pattern Directory, a place to find patterns[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions