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

Button: Update deprecated props #11933

Merged
merged 6 commits into from
Dec 8, 2023

Conversation

arsanyjoseph
Copy link
Contributor

@arsanyjoseph arsanyjoseph commented Nov 24, 2023

What

Fixes #11855

Why

This PR updates the deprecated isPrimary, isSecondary, isTertiary and isLink props to the variant prop.

Testing Instructions

Please consider any edge cases this change may have, and also other areas of the product this may impact.

  1. Create a new page
  2. Add test blocks from the file: testblocks
  3. Make sure that all the updated buttons work/appear correctly.
  • Do not include in the Testing Notes
  • Should be tested by the development team exclusively

WooCommerce Visibility

Required:

  • WooCommerce Core
  • Feature plugin
  • Experimental
  • N/A

Checklist

Required:

  • This PR has either a [type] label or a [skip-changelog] label.
  • This PR is assigned to a milestone.

Conditional:

  • This PR has a UI change and has been cross-browser tested at different viewport sizes on both the frontend and in the editor.
  • This PR has a changelog description (if [skip-changelog] label is not present).
  • This PR adds/removes a feature flag & I've updated this doc.
  • This PR adds/removes an experimental interfaces, and I've updated this doc.
  • This PR has been accessibility tested.
  • This PR has had any necessary documentation added/updated.

Changelog

Add suggested changelog entry here.

PR description updated by @danieldudzic

@arsanyjoseph
Copy link
Contributor Author

@nielslange
Not sure how to fill in the report

@nielslange nielslange requested review from a team and danieldudzic and removed request for a team November 24, 2023 14:26
@nielslange
Copy link
Member

Not sure how to fill in the report

Thanks for asking and, especially, thanks for your contribution, @arsanyjoseph! 🙌

As for filling in the PR, allow me to briefly walk you thought the sections and give you examples.

  • What: Here you mention the corresponding issue, in this case Replace deprecated button props isPrimary, isSecondary, isTertiary and isLink #11855. You can also mention what you adjusted, but mentioning the issue is the most important part.
  • Why: This section explains why this PR is needed. In this particular case because the button props isPrimary, isSecondary, isTertiary and isLink re deprecated, meaning they will stop working in the future.
  • Testing Instructions: This is another crucial section, as this helps the person, that is reviewing the PR, to understand what to look for. Your articular PR affects the styling of the buttons. Therefore, it would be helpful to point out the various sections/buttons, that are affected by your change so that a reviewer can verify that the PR works as expected and did not break existing styles.
  • Screenshots or screencast: This section is usually used to show the before and after screenshots or a screencast. In your case, both before and after screenshots should look identical, as you replaced deprecated functionality with a newer one.
  • WooCommerce Visibility: You PR will land in WooCommerce Core so you can select this checkbox. Some changes are "guarded" behind the featured or experimental gate. On https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md?plain=1 you can learn more about that. For now, don't worry too much about this, though. N/A is used for changes that are not visible such as changing in the tooling, e.g. Upgrade webpack to version 5 #8013.
  • Checklist: Don't worry too much about this section, either. It helps the development team to ensure that nothing falls though the cracks.
  • Changelog: This section is used to highlight the change in the changelog when shipping a new release that contains the change. You can find an example in https://developer.woo.com/2023/11/23/woocommerce-blocks-10-6-0-release-notes-2/. Everything that's mentioned in Changelog » Enhancements and Changelog » Bug Fixes is coming from that changelog section. It's great if you can add a speaking changelog message, but don't worry too much if you don't know how to phrase your changes properly.

I hope this helps. If you have any further questions, feel free to ask anytime!

Copy link
Contributor

github-actions bot commented Dec 3, 2023

This PR has been marked as stale because it has not seen any activity within the past 7 days. Our team uses this tool to help surface pull requests that have slipped through review.

If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Dec 3, 2023
@nielslange nielslange added type: enhancement The issue is a request for an enhancement. team: Kirigami & Origami and removed status: stale Stale issues and PRs have had no updates for 60 days. labels Dec 4, 2023
@danieldudzic
Copy link
Contributor

@arsanyjoseph, do you need any further assistance? Were @nielslange's suggestions helpful?

@danieldudzic
Copy link
Contributor

As we are migrating to the WooCommerce monorepo this weekend I'm taking over this PR so that we can get it merged before the migration.

@danieldudzic danieldudzic changed the title replace old props with variant prop Button: Update deprecated props Dec 8, 2023
Copy link
Contributor

@danieldudzic danieldudzic left a comment

Choose a reason for hiding this comment

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

I have now updated the PR description and tested it. Buttons are working fine with the updated props.

@danieldudzic danieldudzic mentioned this pull request Dec 8, 2023
14 tasks
@danieldudzic danieldudzic enabled auto-merge (squash) December 8, 2023 16:42
@danieldudzic
Copy link
Contributor

All tests have passed on the copy of this PR here: #12099

I'm merging.

@danieldudzic danieldudzic disabled auto-merge December 8, 2023 23:30
@danieldudzic danieldudzic merged commit 7b3bafe into woocommerce:trunk Dec 8, 2023
26 of 30 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace deprecated button props isPrimary, isSecondary, isTertiary and isLink
3 participants