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
Add product query support for Sale badge block #7709
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
The release ZIP for this PR is accessible via:
|
TypeScript Errors ReportFiles with errors: 429
assets/js/atomic/blocks/product-elements/sale-badge/index.ts
assets/js/blocks/cart/cart-cross-sells-product-list/cart-cross-sells-product.tsx |
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the |
imanish003
added
skip-changelog
PRs that you don't want to appear in the changelog.
type: refactor
The issue/PR is related to refactoring.
block-type: product elements
Issues related to Product Element blocks.
block-type: product-query
Issues related to/affecting all product-query variations.
labels
Nov 18, 2022
Size Change: +13 B (0%) Total Size: 971 kB
ℹ️ View Unchanged
|
Aljullu
approved these changes
Nov 23, 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.
Everything is working well and code looks good. 👌 I left one minor comment but LGTM.
On the client side, when the Sale badge block is used within the product query block, the markup will be rendered on the server side - No javascript related to Sale badge block will be rendered.
ADDITIONAL CSS CLASS(ES)(available in advanced toggle in sidebar) should be added to the container div
We are getting padding value in preset format like this: "var:preset|spacing|50" Therefore I added a function to convert it to CSS variable like this: "var(--wp--preset--spacing--50)" i.e. "var:preset|spacing|50" -> "var(--wp--preset--spacing--50)"
imanish003
force-pushed
the
add/7331-sale-badge-block-pq-support
branch
from
November 23, 2022 11:25
dba4570
to
f859dcd
Compare
tarunvijwani
pushed a commit
that referenced
this pull request
Nov 24, 2022
* Add product query support for Sale badge block On the client side, when the Sale badge block is used within the product query block, the markup will be rendered on the server side - No javascript related to Sale badge block will be rendered. * Add support for additional CSS class(es) ADDITIONAL CSS CLASS(ES)(available in advanced toggle in sidebar) should be added to the container div * Convert preset to css variable for padding We are getting padding value in preset format like this: "var:preset|spacing|50" Therefore I added a function to convert it to CSS variable like this: "var(--wp--preset--spacing--50)" i.e. "var:preset|spacing|50" -> "var(--wp--preset--spacing--50)" * Add reference for preset to css variable conversion logic
This was referenced Nov 24, 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.
block-type: product-query
Issues related to/affecting all product-query variations.
skip-changelog
PRs that you don't want to appear in the changelog.
type: refactor
The issue/PR is related to refactoring.
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 Product Query support for the atomic Sale badge block
On the client side, when the Sale badge block is used within the product query block, the markup will be rendered on the server side - No javascript related to Sale badge block will be rendered.
Fixes #7331
Testing
Sale Badge
block to Post Template of product query block as shown in video below:https://user-images.githubusercontent.com/16707866/202644003-ee85857b-a01f-4b4f-819a-ec910b630dd5.mov
product-sale-badge-frontend.js
showing before the changes made in this PR. This shouldn't be visible in network tab anymore.ADDITIONAL CSS CLASS(ES)
(available in advanced toggle in sidebar) should be added to the container divWooCommerce Visibility