-
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
Add "theme" category and better present template parts in the inserter #30020
Conversation
Size Change: +35 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
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.
Nice! Tested and works as expected. Code looks good and the failing test is unrelated to this PR (I'm about to submit another one to fix those) so this looks good to merge 👍
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.
The exposure to Inserter
needs more stuff (haven't thought of yet) because this is a special case of block variation where the isActive
variation is implemented with the area
property, that is not in block's attributes.
So by inserting a Header
or Footer
now, doesn't change anything anywhere and doesn't even set the area
on clicking Create new Template Part
.
I think we can skip the exposure here and do that in a follow up, or do it here.
@ntsekouras agreed, I mentioned it to @Addison-Stavlo and @david-szabo97 that it should probably be an attribute. |
8fad4b0
to
352f409
Compare
934ded3
to
1d82324
Compare
Core ticket created: https://core.trac.wordpress.org/ticket/52883. |
I added some changes to improve integration for the new category: #30089. |
Related: WordPress/gutenberg#30020. Introduces a new "theme" category to the default set to use with template-parts and other FSE blocks. Props matveb. Fixes #52883. git-svn-id: https://develop.svn.wordpress.org/trunk@50564 602fd350-edb4-49c9-b593-d223f7449a82
Related: WordPress/gutenberg#30020. Introduces a new "theme" category to the default set to use with template-parts and other FSE blocks. Props matveb. Fixes #52883. git-svn-id: https://develop.svn.wordpress.org/trunk@50564 602fd350-edb4-49c9-b593-d223f7449a82
Related: WordPress/gutenberg#30020. Introduces a new "theme" category to the default set to use with template-parts and other FSE blocks. Props matveb. Fixes #52883. Built from https://develop.svn.wordpress.org/trunk@50564 git-svn-id: http://core.svn.wordpress.org/trunk@50177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Related: WordPress/gutenberg#30020. Introduces a new "theme" category to the default set to use with template-parts and other FSE blocks. Props matveb. Fixes #52883. Built from https://develop.svn.wordpress.org/trunk@50564 git-svn-id: https://core.svn.wordpress.org/trunk@50177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Related: WordPress/gutenberg#30020. Introduces a new "theme" category to the default set to use with template-parts and other FSE blocks. Props matveb. Fixes #52883. Built from https://develop.svn.wordpress.org/trunk@50564 git-svn-id: http://core.svn.wordpress.org/trunk@50177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Closes #30016.
This introduces a new "theme" category to the default set and applies it to template-parts and their variations. It also exposes Header and Footer in the inserter and updates the default icon.
Later we should determine if other blocks also belong here (like Navigation).