Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Replace deprecated isPrimary, isSecondary, isTertiary, isLink Button props with variant #8340

Closed
wants to merge 2 commits into from

Conversation

chihsuan
Copy link
Member

@chihsuan chihsuan commented Feb 22, 2022

Fixes #8313

This PR updates the deprecated isPrimary, isSecondary, isTertiary, isLink Button props.

isPrimary, isSecondary, isTertiary and isLink props in Button have been deprecated. Use variant instead (WordPress/gutenberg#31713).

Document Reference: https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/button#variant

Screenshots

Screen Shot 2022-02-22 at 14 57 27

primary, link

Screen Shot 2022-02-22 at 14 40 39

primary, secondary, tertiary

Detailed test instructions:

  1. Checkout this branch
  2. Go to the setup wizard
  3. Oberse that the "Skip setup store details" button is shown as a link
  4. Go to the Theme step
  5. Observe that buttons are shown properly with the different variants

Review the other code changes

Copy link
Contributor

@moon0326 moon0326 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @chihsuan 👍

Onboarding steps worked as expected.

I also smoke-tested other WCA pages and also looked good. 🚢 🚀

@chihsuan
Copy link
Member Author

@moon0326 Thanks for the review! 🙇‍♂️

I just found this is not compatible with WP 5.8. 😞 And this is why the e2e test failed. I'm going to close this for now since our min support version is 5.6.

@chihsuan chihsuan closed this Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some props in @wordpress/components <Button> are deprecated
2 participants