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

Patterns: iterate on experience of registering patterns from pattern directory for themers #55109

Open
annezazu opened this issue Oct 5, 2023 · 1 comment
Labels
[Feature] Pattern Directory The Pattern Directory, a place to find patterns [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.

Comments

@annezazu
Copy link
Contributor

annezazu commented Oct 5, 2023

With block themes increasing and patterns continuing to play an important role, I want to return to the efforts to allow for patterns to be registered from the pattern directory via theme.json in #38323.

In that PR, a discussion was had around categories since there is no parity between pattern directory categories and core categories. Without going into iterating on pattern categories #47847, I wanted to open an issue around the experience of registering patterns from the pattern directory for themes, how we can filter those patterns, and the expected experience for categorizing these patterns. A few points:

  • When filtering, patterns are shown as provided by the directory rather than the theme.
  • Patterns that don't match core categories are marked as uncategorized with no way to adjust that resulting in a poor experience.
  • Patterns aren't visible in the Patterns section of the Site Editor, like you'd expect with other theme patterns.

Here's a quick video showing some of this:

pattern.experience.register.themejson.mov

Ideally, theme authors could use the pattern directory as a main way to reference patterns (which would benefit the larger ecosystem with more patterns to pull from) and even reuse across different themes if they wanted. Before doing this though, these kinks needed to be sorted out, particularly with controlling categorization and filtering. Is there a way we could auto add a category or register a new category for patterns registered for a theme in this way? This was briefly discussed in the original PR #38323 (comment)

This also touches on this broader issue of having a "theme source" for patterns in the pattern directory which I could imagine would make the experience more tightly coupled and clear WordPress/pattern-directory#573

cc @WordPress/block-themers for more insights and feedback :)

@annezazu annezazu added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Pattern Directory The Pattern Directory, a place to find patterns labels Oct 5, 2023
@richtabor
Copy link
Member

Is there a way we could auto add a category or register a new category for patterns registered for a theme in this way? This was briefly discussed in the original PR #38323 (comment)

Just to confirm, this is for when a pattern from the WordPress Patterns directory is in a category that is not locally available on the site, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Pattern Directory The Pattern Directory, a place to find patterns [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants