-
Notifications
You must be signed in to change notification settings - Fork 219
Remove opinionated styles from Button component on block themes that define button styles #8478
Conversation
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: +6 B (0%) Total Size: 1.1 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.
Awesome! I'm approving the PR since it works as expected, but I have a question regarding testing the Storefront theme because I cannot use the Site Editor when this theme is active. Is it possible to change the Theme Styles when using this theme or for this test the idea is only test that the default button style appears?
Thanks for the review, @thealexandrelara!
This: "only test that the default button style appears". Basically, making sure this PR doesn't introduce regressions in Storefront. I updated the testing steps to make it more clear. |
This PR is a second part of #7992. In that PR, we removed button styles from the Button component in Twenty Twenty-Three and Zaino themes. In this new PR, we do the same but with all block themes which define custom button styles in
theme.json
. In order to achieve this, we use the.woocommerce-block-theme-has-button-styles
class introduced in WC core in woocommerce/woocommerce#36225.Testing
User Facing Testing
Preparation:
Test different themes:
Twenty Twenty Three:
1.1. Install it from here: https://wordpress.org/themes/twentytwentythree/
1.2. Go to the pages created in step 0 and verify the Mini Cart, Cart and Checkout buttons follow the theme styles.
1.3. Go to Appearance > Editor > Styles > Browse Styles and change between style variations. Verify the buttons follow the styles in all of them.
Pixl or another block theme with custom button styles but which is not TT3 or Zaino:
2.1. Install it from here: https://wordpress.org/themes/pixl/
2.2. Go to the pages created in step 0 and verify the Mini Cart, Cart and Checkout buttons follow the theme styles.
3.1. Install it from here: https://wordpress.org/themes/storefront/
3.2. Go to the pages created in step 0 and verify the Mini Cart, Cart and Checkout buttons don't follow the theme styles. Instead, they have opinionated styles.
WooCommerce Visibility
Performance Impact
Changelog