Skip to content
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

Open
Tracked in #31153
kjellr opened this issue Oct 5, 2021 · 0 comments
Open
Tracked in #31153

Allow themes to surface specific patterns from the Patterns Directory #35364

kjellr opened this issue Oct 5, 2021 · 0 comments

Comments

@kjellr
Copy link
Contributor

@kjellr kjellr commented Oct 5, 2021

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:

Screen Shot 2021-10-05 at 1 56 50 PM

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:

  • Cut down considerably on theme code.
  • Make theme patterns far easier to update, test, and review.
  • Encourage theme authors to seed the pattern directory with even more patterns.
  • Reduce pattern redundancy in the Pattern Directory by letting multiple themes reference the same simple patterns.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant