-
Notifications
You must be signed in to change notification settings - Fork 219
Fix: load blocks style separately for classic themes #10758
Conversation
Requesting a review from @woocommerce/rubik as this PR affects the style of Cart and Checkout blocks. |
The release ZIP for this PR is accessible via:
Script Dependencies ReportThe
This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: -69.8 kB (-5%) ✅ Total Size: 1.37 MB
ℹ️ View Unchanged
|
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.
Hi @dinhtungdu looks like styles aren't loading correctly in the editor, I added this block and a few others and noticed it was missing for them all.
No errors in the console though. Also I made a suggestion to make the comment a little better.
Pressed the wrong button! Just meant to leave a comment
Co-authored-by: Thomas Roberts <[email protected]>
@opr Thanks for the review and suggestion. I fixed the style loading in the editor, can you please take another look at this? |
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.
The changes seem to work OK and styles for the blocks are loading fine in the Cart and Checkout, and on Storefront and Twenty Twenty-Three!
Just to note, the build still takes ~40s when changing `assets/js/blocks/cart/block.js.
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 tested the list of our blocks on Storefront and smoke-tested a good handful of them in TT3 as well.
All of the styles appeared to load as expected in the Editor and on the frontend of both themes.
What
Fixes #10546
For better review experience, you can review only https://github.com/woocommerce/woocommerce-blocks/pull/10758/files/8d0dddb4821ac4a44cf13ba37e1d2ef1699a1dcd..9ad4b0eb0e10f2a10fd9f9a006952203b5950f90.
Why
Because we shouldn't load the unnecessary styles.
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
Testing this PR means making sure there are no styling regressions in existing blocks for classic themes.
Screenshots or screencast
N/a
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog