Bundle @wordpress/components to avoid styling incompatibilities #571
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.
Changes proposed in this Pull Request
Follows WooCommerce Admin's lead in bundling the @wordpress/components package and pinning to major version 8, rather than depending on the externally loaded instance.
This change avoids missing styles due to changes in WP 5.4 – in particular a breaking change in WordPress/gutenberg#19058 to remove the
is-button
class – in combination (I think) with style overrides in WooCommerce Admin.Addresses #508 (comment) and other undesirable button styling such as on this entry point:
Compatibility with the external package can likely be addressed in a future PR, but I believe the most favorable outcome would be for WooCommerce Admin to solve compatibility with version 9 of the package, perhaps by generalizing the selectors or just removing overrides (see woocommerce/woocommerce-admin#3897).
Testing instructions
With a dispute needing review, navigate to dispute evidence screen.
Force disconnected view and navigate to onboarding screen.
Verify proper colors, margins, and border radius for buttons on all screens.
(Requires re-running build/watch.)