-
Notifications
You must be signed in to change notification settings - Fork 219
Create wc-all-block-styles chunk with all blocks stylesheet for classic themes #10543
Conversation
The release ZIP for this PR is accessible via:
TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. Script Dependencies ReportThe
This comment was automatically generated by the |
Size Change: +69 kB (+5%) 🔍 Total Size: 1.42 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.
I checked all of the blocks from the list: TT3 and Storefront. Except for the Sale badge (covered in woocommerce/storefront#2118) I didn’t spot anything weird and styles are loaded as expected:
- block specific CSS files on TT3
- wc-blocks-vendors-style.css and wc-all-blocks-style.css on Storefront
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 blocks and they all work as expected in Storefront and Twenty Twenty-Three!
Good work!
* Create wc-all-block-styles chunk with all the styles for classic themes (#10543) * add testing instructions and changelog * bump version to 10.8.3 * Empty commit for release pull request * add zip link * Fix the `on sale` badge for product blocks (#10550) * Fix the `on sale` badge for product blocks * Fix in the editor * Update changelog and testing instructions * update zip link * fix testing instructions --------- Co-authored-by: Luigi Teschio <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Alba Rincón <[email protected]>
This PR fixes woocommerce/woocommerce#39658. @Aljullu with #9831 introduces an optimization focuses on enhancing WordPress performance by selectively loading only the necessary block stylesheets that correspond to the blocks present on a given page. While this mechanism has been successfully implemented for block themes, it doesn't work on classic themes. This happens for the block themes, but not for the classic themes. Referencing the post titled Block-styles loading enhancements in WordPress 5.8:
Classic themes currently suffer from a deficiency in identifying the specific blocks within a page, resulting in the loading of the complete stylesheet for every block. To mitigate this, a temporary solution has been adopted, reinstating the previous behavior for classic themes. However, we acknowledge that this is not a permanent fix. Over the upcoming weeks, our efforts will be directed towards devising an appropriate optimization strategy for classic themes.
In technical terms, a Webpack chunk has been crafted with all necessary stylesheets. This specialized chunk will be enqueued and exclusively loaded with classic themes.
Fixes woocommerce/woocommerce#39658.
Accessibility
prefers-reduced-motion
Other Checks
[type]
label or a[skip-changelog]
label.Screenshots
Testing
Automated Tests
User Facing Testing
For classic theme ensure that is loaded only
wc-all-blocks-style.css
andwc-blocks-vendors-style.css
stylesheets.For block theme sure that is loaded only the stylesheets of blocks visible in the page.
WooCommerce Visibility
Performance Impact
Changelog