-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Plugin patterns appear under "Theme patterns" heading #52498
Comments
Possible solutions:
|
Hard vote for #2. |
@jameskoster I've been thinking about this for templates as well. I think clarity is the most important thing, so I would want to know where a pattern is coming from/sourced. My vote would be for #2 as well. |
Could probably just be “Theme” and “Plugin” headings, as “Patterns” is already declared above. |
In relation to option 2 I had a quick look and I am not sure how we would reliably identify plugin patterns as separate to theme patterns as it seems like both just use We could potentially try and filter out theme patterns by matching the first part of the slug against the theme name, but that seems a little unreliable. I may be missing some other way of identifying that a pattern came from a plugin as apposed to a theme though. |
An optional
It doesn't seem to be used within the Gutenberg codebase as of yet, but I'd imagine we can:
|
I was overlooking the fact that theme patterns are actually registered from the |
@vcanales @glendaviesnz thank you for looking into this. Do you think it's possible this gets done in time for 6.3? If not we may need to go with option 1, or another equally simple idea. Perhaps we could remove the "Theme patterns" heading entirely, and move template parts beneath them: |
There are many older patterns in themes that were registered before the patterns folder was an option. |
Yeah, that would work I think? Now that "My patterns" always show. |
Good point; I wasn't aware.
How about changing it to "Included patterns" for now? Created #52568 to get things rolling. |
As someone who reads things literally, "my patterns" and "included patterns" read strange to me, like, "What do you mean, are my patterns not included?" |
@jameskoster are you ok with punting this one given RC1 is later today? Or will this be considered closed once #52568 is merged? |
Ah I think this is already closed via #52570. Thanks for the ping. |
In the Site Editor Pattern library, patterns added by plugins appear under the "Theme patterns" heading which is inaccurate:
The text was updated successfully, but these errors were encountered: