-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Allow themes to surface specific patterns from the Patterns Directory #35364
Comments
@ryelle how do you think this would be best implemented in patterns directory? I guess people would need to create/select their own category and also maybe have a way to get the data needed for fetching individual patterns(like an Do you have any info about the roadmap of opening the patterns submission there? This issue needs some work on pattern directory first and the implementation in GB would be match simpler by adding some fields in |
I don't think we've discussed this, but the pattern slug (ex,
Could patterns defined in the |
I'm not sure about the nuances of the Could the patterns have a new |
Ah, true. I was still thinking we would want them also grouped under a "Theme" label. They could be all of the above, since patterns can have multiple categories. You could find a pattern under "Theme Name" and also under "Header" and "Text".
Do you mean on the Pattern Directory side? |
I meant in their definition in general, but if we register a theme's category in their patterns, we will fetch them all by this specific category. So the question was more whether we store the theme's category in patterns or in a separate field and is probably about if this matters with how |
I may not be following this correctly, but in general, I don't think we want to be tagging patterns for a specific theme in the pattern directory, since an individual pattern could (theoretically at least) be used for more than one theme. |
In issue #41282 you'll find a suggested way on how to implement a curated list of patterns from the pattern directory. |
With the launch of the pattern directory (and the upcoming ability for folks to submit their own patterns to it), we should consider building a route through which themes can highlight specific patterns to their users.
Traditionally, themes have bundled their own proprietary patterns directly via PHP, and tend to highlight them in a category named after the theme:
This is fine, but it locks those patterns into that one specific theme. What if (for example) a theme could place all of those patterns directly in the Pattern Directory itself, and then reference them from within
theme.json
. These referenced patterns could either be highlighted in the inserter via a "Theme Name" category, or bubbled up to the top of the list and given a special "theme" badge of some kind.This would:
If a theme's pattern relied on special block styles, then the theme would still be free to register them the traditional way.
Related to #33046, #35115
This should maybe be part of #31153?
The text was updated successfully, but these errors were encountered: