New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Experimental] Utilize WP generated class names to style rating filter block. #44072
Conversation
… inside block any more.
Hi @dinhtungdu, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
@import "../../../shared/styles/style"; | ||
|
||
.wc-block-rating-filter { | ||
.wp-block-woocommerce-product-filter-rating { | ||
&.is-loading { |
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.
Actually not convinced we need this but it does target the class on the empty loading state in the editor. I've left it as is for now, but happy to remove it because after removing it I didn't notice anything looking wrong in the styles.
…mmerce-blocks, woocommerce
Test Results SummaryCommit SHA: a05eaf3
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
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 was gonna comment only, not approve.
@dinhtungdu thanks good spotting of the count bug. I've fixed it here |
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 the update, this is LGTM now.
Changes proposed in this Pull Request:
@dinhtungdu and I agreed that we don't need to create our own unique class names or use bem style syntax, its overly verbose and doesn't add anything.
Instead we scope all styles to the class name generated for the block by WP, and also remove the BEM style prefix from any scoped class names. (To keep PR's small and testable I'm addressing one block at a time.)
Additionally, I noticed a lot of copy pasted styles from the old block that we don't use or need.
This is part of #43167
How to test the changes in this Pull Request:
Changelog entry
Significance
Type
Message
[Experimental] Utilize WP generated class names to style rating filter block.
Comment