-
Notifications
You must be signed in to change notification settings - Fork 219
Sale Product Block: Enable global style #5565
Conversation
…products-block into add/4965-product-title
Featured Category block: Add support for global style
…products-block into add/4965-featured-category
Size Change: +923 B (0%) Total Size: 814 kB
ℹ️ View Unchanged
|
Sale Product block: enable global style #4965
8386b5c
to
d33c181
Compare
…oocommerce-gutenberg-products-block into add/4965-sale-product
d33c181
to
19f5f54
Compare
0f57f3e
to
0d69454
Compare
…products-block into add/4965-sale-product
0d69454
to
9711034
Compare
…products-block into add/4965-sale-product
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.
This is look good to me. Even the block registration looks a little bit confusing, I think we can always address that issue later when we have another atomic block that needs __experimentalSelector
support. __experimentalSelector
, by its name, is experimental, so it can be changed in the future Gutenberg release, so it isn't worth addressing it now.
@@ -178,6 +178,7 @@ protected function get_block_types() { | |||
'ProductTitle', | |||
'ProductSummary', | |||
'ProductStockIndicator', | |||
'ProductSaleBadge', |
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.
I think a comment here explaining why we register an atomic block here will be helpful.
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.
Good point! I added a @todo comment
. In this way, in the end, I will re-organize the order of the elements in the array (maybe we can move down the atomic blocks and add a comment that explains why)
Add a comment why some atomic blocks are included in this...Add a comment why some atomic blocks are included in this array. https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/19c03410409ac44660859d81d30cdcc60b4a3f8e/src/BlockTypesController.php#L156-L159🚀 This comment was generated by the automations bot based on a
|
This PR is blocked by #5542This PR adds support for global style for the
Sale Product block
. This code registers the block on the PHP side. This is necessary for using the__experimentalSelector
from Global Styles API.Now, the user can edit the style for:
#4965
Screenshots
without global style
with global style
Testing
Manual Testing
Check out this branch:
Twenty Twenty-Two
theme.All Product Block
to a post.Styles
icon on the right-top corner.Sale Product block
is shown under theBlocks
section. Click on the label. Personalize the block.Changelog