This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Global Styles support for Product Price block #5950
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tomasztunik
added
focus: global styles
Issues that involve styles/css/layout structure.
block-type: product elements
Issues related to Product Element blocks.
focus: FSE
Work related to prepare WooCommerce for FSE.
labels
Feb 25, 2022
Size Change: -384 B (0%) Total Size: 863 kB
ℹ️ View Unchanged
|
gigitux
suggested changes
Feb 25, 2022
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.
Thanks for working on this block 🚀
I saw a PHP error:
Block type "woocommerce/product-price" is already registered.
We need to remove product-price
from this array
I left a couple of small comments, but overall looking good 💪
- This comes sat a cost of losing control over regular vs sale price - This includes refactor of attribute from align to textAlign which is a reserved supports feature attribute and textAlign is used across the Gutenberg project
This is required to make the GlobalStyles work inside of the InnerContent block. Ie. All Products block.
tomasztunik
force-pushed
the
add/global-styles-product-elements-price
branch
from
February 28, 2022 10:57
c301ebd
to
d031690
Compare
gigitux
approved these changes
Feb 28, 2022
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.
Great job! LGTM
Confirmed regression of possible user customisation via controls with @vivialice. |
frontdevde
added
the
type: enhancement
The issue is a request for an enhancement.
label
Feb 28, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block-type: product elements
Issues related to Product Element blocks.
focus: FSE
Work related to prepare WooCommerce for FSE.
focus: global styles
Issues that involve styles/css/layout structure.
type: enhancement
The issue is a request for an enhancement.
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.
Adds Global Styles support for Product Price element block.
supports
is a reserved supports feature attribute and textAlign is
used across the Gutenberg project when text-align css is used
I’ve noticed that we are using align attribute in couple of places in a wrong way. Since introduction of supports: { align } Gutenberg uses context based align attributes for anything that is not align. IE. css text-align should be
textAlign
and so on. Apart of that it seemed like it might be causing conflicts when using these “reserved” attributes in other contexts (ie. product title align which doesn't use the supports property stopped working on front-end and works just fine if changed to another name).Fixes #5672
Accessibility
Screenshots
Manual Testing
How to test the changes in this Pull Request:
Changelog