-
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
Block Patterns: Add category for banners #44203
Conversation
cc @ryelle as I'm not sure what might be needed from the pattern directory POV :) Edited to add: sorry, I totally was behind on the comments in the original issues and see you've chimed in there. Thank you! |
In terms of naming, seems in the original issues we're leaning more towards "Banners". I'd personally shy away from "Hero" as I don't know if that will translate well. I do think it'll help to distinguish if we stay away from Headings since that still feels so similar to Headers. |
// Register categories used for block patterns. | ||
$pattern_category_registry = WP_Block_Pattern_Categories_Registry::get_instance(); | ||
if ( ! $pattern_category_registry->is_registered( 'heading' ) ) { | ||
register_block_pattern_category( 'heading', array( 'label' => __( 'Headings & Titles', 'gutenberg' ) ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this Hero or Banner instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Anne points out, "Banners" might work better across locales, and — to me — feels less like jargon than "Hero". But I don't feel strongly about this. You?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super
As for the reclassification of existing patterns: from what I can see, none of the new core patterns bundled in #43157 apply. The applicable patterns I see in my sandbox all come from the directory:
I'll defer to perhaps @ryelle for those. |
Fixes #40116 With this new category, we can clariy the classification of patterns as "Headers". Category "Headers" pertains to global patterns meant to sit at the top of a page, while category "Headings & Titles" pertains to typically visually distinctive elements that help structure the contents of a page.
790b97c
to
8b4c879
Compare
We can create the same category in the Pattern Directory when this merges, and move those patterns. I think that will make them "uncategorized" on older WordPress installs though, will that be a problem? |
I think that will be fine. The alternative that I can think of is to add both categories to those patterns, which IMO beats the purpose of the new category. |
* Block Patterns: Add category for Headings & Titles Fixes #40116 With this new category, we can clariy the classification of patterns as "Headers". Category "Headers" pertains to global patterns meant to sit at the top of a page, while category "Headings & Titles" pertains to typically visually distinctive elements that help structure the contents of a page. * Rename to "Banners"
I just cherry-picked this PR to the wp/6.1 branch to get it included in the next release: 53b0f84 |
Fixes #40116
What?
Register a new category for block patterns named
"Headings & Titles""Banners".Why?
See the parent issue. With this new category, we can clarify the categorisation of patterns as "Headers". Category "Headers" pertains to global patterns meant to sit at the top of a page ("the header of the site"), while category "Banners" pertains to typically visually distinctive elements that help structure or contrast the contents of a page (including headings and "hero" elements).