-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
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.