This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add global style support to Mini Cart (button) #5100
Add global style support to Mini Cart (button) #5100
Changes from 14 commits
088bd91
00dd641
6bbe4ae
4bbb63a
2659c9f
ee7772c
003c632
8fff470
226a04a
cd853d4
27a2584
980bde3
c5fe9f4
c323f21
a6c5b34
04cca3c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Everything seemed to work fine for me when I removed these lines. Why was it needed? 🤔
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.
If you remove this, the global style doesn't work correctly. Without this, Gutenberg will add global style to
.wp-block-woocommerce-mini-cart
instead of the above selectors. This is fine for text color (by inheriting the parent element) but doesn't work for background color.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.
Is the GB team aware that we're using this experimental supports property and why we need to use it? If not, it might be handy to make sure they know somehow so there's awareness of it's usefulness for other projects when it comes time to evaluate graduating it.
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.
@nerrad I'm not sure if they know about it or not. I will add comments explaining why we need them.
Edit: added comments for
__experimentalSelector
and__experimentalSkipSerialization
.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.
Given the discussion in p1637141712378200-slack-C02FL3X7KR6, I think we can go ahead using those
__experimental
features for now, given that the Mini Cart block is gated to the Feature Plugin.In the future, while we research global styles in a bigger scale for all blocks, we can get a list of all experimental features we need to use and get in contact with Gutenberg devs to know their plans with them.