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

Pattern Directory: Add an option to filter by author and author collections #549

Open
annezazu opened this issue Jan 23, 2023 · 3 comments
Labels
[Component] Pattern Directory The backend of the pattern directory: submission, management, etc [Type] Discussion Proposed idea, needs input from others before actionable

Comments

@annezazu
Copy link
Collaborator

In talking with @elmastudio, she brought up the desire to have the ability to filter patterns by author. This would help in terms of offering both ways of seeing patterns that might go together and in terms of offering collections. More here: WordPress/gutenberg#44611 (comment)

In some cases though, a pattern author might not intentionally have patterns that go together, instead creating one off options. However, when thinking about block themes and interoperability, it does make sense for future mixing and matching to have collections used within a block theme that can be fully snagged for use on a site separate from a theme.

@ryelle
Copy link
Contributor

ryelle commented Jan 23, 2023

Authors

It is already possible to view patterns by an author on the pattern directory, for example, patterns by WordPress.org. This view can be found by clicking the author name on a pattern.

author_name is also exposed in the API, so for example, this returns the WordPress.org patterns: https://api.wordpress.org/patterns/1.0/?author_name=wordpressdotorg&locale=en_US. This can be used in the editor (though to use it, the key will need to be added here in GB).

The exception here seems to be search requests, where we encounter this bug again: #547

Author collections

Author collections would be harder to manage, because we would probably create them as custom tags and I could see people easily misusing them for keyword spam - they already do that for the open text for pattern descriptions.

Themes can already define a set of patterns used in the theme.json, so that kind of works as a collection in reverse. I see this would be "for use on a site separate from a theme," but I'm not sure why that would be needed?

I'm not against the idea, but I'd like to figure out a way to do it with guardrails against spam.

@ryelle ryelle added [Type] Discussion Proposed idea, needs input from others before actionable [Component] Pattern Directory The backend of the pattern directory: submission, management, etc labels Jan 23, 2023
@annezazu
Copy link
Collaborator Author

It is already possible to view patterns by an author on the pattern directory, for example, patterns by WordPress.org. This view can be found by clicking the author name on a pattern.

Yes! I recognize this is the main way you can view patterns by author. In this case, I think it's a matter of being able to search by author, bundle those, and then perhaps connect them somehow to block themes potentially (in the future).

The exception here seems to be search requests, where we encounter this bug again: #547

Noted. Thank you for connecting those dots.

Themes can already define a set of patterns used in the theme.json, so that kind of works as a collection in reverse. I see this would be "for use on a site separate from a theme," but I'm not sure why that would be needed?

In this case, it would be to offer something comparable to things like https://elementor.com/library/template-kit/marketing-studio-website-kit/ or https://webflow.com/templates/html/sulu-portfolio-website-template

@sereedmedia
Copy link

sereedmedia commented Jun 7, 2023

I think being able to offer pattern collections make a lot of sense.

What if it wasn't "creating a collection" (another CPT or taxonomy that needs a name) so much as relating individual patterns together? Creating a custom "related pattern" field of sorts? This is something I do often on client sites using "relationship" custom fields.

Then pattern collections wouldn't be available to "search by collection" in the Pattern Directory, but a user could "find all the linked patterns" when viewing a pattern, which would return a query of that related patterns field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Pattern Directory The backend of the pattern directory: submission, management, etc [Type] Discussion Proposed idea, needs input from others before actionable
Projects
None yet
Development

No branches or pull requests

3 participants