-
Notifications
You must be signed in to change notification settings - Fork 37
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
Search and/or group patterns by block #33
Comments
Related WordPress/gutenberg#27575. |
Block patterns can have a We should add some (optional) way of flagging patterns as related to block types, and on the validation side, make sure the pattern can be transformed from the chosen block. It seems like patterns can be related to more than one block type, but I think in practice, it's usually just one. The API & proxy API will also need to be updated to allow a "blockTypes" parameter for fetching patterns. |
There is a PR on the Gutenberg side to use the We still need to create a flow for setting the blockType value when creating a pattern. |
We can set The unanswered question here is how that should work (in the UI) when creating a pattern. Since we still don't have a design here, and the gutenberg API has no traction (so it won't make 5.9), I've pulled this out of the pattern creation v1 milestone. We can revisit it post-beta or post-launch. |
The blockTypes field did merge (WordPress/gutenberg#47677), and there's also a way to filter by allowed blocks (#540). We don't expose any UI for this in the w.org Pattern Directory but I think filters for template type (#616) will be more useful than block filters specifically. If a block filter in the site UI makes sense, we can reopen this or add a new issue for it. |
It's likely that the editor UI will have a flow where users could discover patterns that contain a particular block.
As a hypothetical example, 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.
That suggests some things would be required on the back end:
This is still a feature idea in progress so it's not clear exactly how it might pan out and what the final flow and requirements might be.
The text was updated successfully, but these errors were encountered: