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
Product Price: support for background color, line height, font family, letter spacing, and padding. #8906
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
This commit adds additional typography and spacing support to the Product Price block. The following changes have been made: 1. In `assets/js/atomic/blocks/product-elements/price/block.tsx`, the `typographyProps.className` has been added to the `classNames` function to apply the typography styles. 2. In `assets/js/atomic/blocks/product-elements/price/supports.ts`, the following support attributes have been added to the `typography` object: - `lineHeight` - `__experimentalFontFamily` - `__experimentalLetterSpacing` Additionally, the `padding` attribute has been added to the `spacing` object. 3. In `src/BlockTypes/ProductPrice.php`, the `StyleAttributesUtils::get_classes_and_styles_by_attributes` function has been updated to receive all attributes instead of a predefined list.
This commit enables the background color support for the Product Price block in the WooCommerce Blocks plugin. The following change has been made: 1. In `assets/js/atomic/blocks/product-elements/price/supports.ts`, the `background` property within the `color` object has been changed from `false` to `true`, allowing users to set the background color for the Product Price block.
imanish003
changed the title
Add/7954 product price global styles review
Product Price: support for background color, line height, font family, letter spacing, and padding.
Mar 30, 2023
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +28 B (0%) Total Size: 1.07 MB
ℹ️ View Unchanged
|
imanish003
added
block-type: product-query
Issues related to/affecting all product-query variations.
type: enhancement
The issue is a request for an enhancement.
focus: blocks
Specific work involving or impacting how blocks behave.
labels
Mar 30, 2023
woocommercebot
requested review from
a team and
thealexandrelara
and removed request for
a team
March 30, 2023 09:23
thealexandrelara
approved these changes
Mar 31, 2023
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! I tested and it is working as expected! Thank you!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block-type: product-query
Issues related to/affecting all product-query variations.
focus: blocks
Specific work involving or impacting how blocks behave.
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.
This Pull Request enhances the styling capabilities of the Product Price block by introducing additional support for background color, line height, font family, letter spacing, and padding. This improvement provides users with more flexibility when customizing the appearance of the Product Price block.
Part of #8692 & #7954
Testing
Test using blocks sidebar
Test using blocks sidebar
Screen.Recording.2023-03-30.at.2.17.57.PM.mov
- In the editor, inspect Product Price block & ensure it matches the value set in the Global styles UI.
- Save the post & publish it. On frontend, inspect Product Price block & ensure it matches the value set in the Global styles UI.
WooCommerce Visibility
Changelog