Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button Component: update to use non-deprecated attributes #23242

Merged
merged 11 commits into from
Mar 7, 2022

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Mar 4, 2022

Changes proposed in this Pull Request:

The Button component has changed a bit in the past few years, for example in WordPress/gutenberg#31713 Let's update all parts of Jetpack accordingly, this should avoid warnings such as:

Button isDefault prop is deprecated since version 5.4 and will be removed in version 6.2. Please use variant="secondary" instead.
Warning: React does not recognize the `isLarge` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `islarge` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Jetpack product discussion

  • N/A

Does this pull request change what data or activity we track or use?

  • No

Testing instructions:

Block editor

  • Start with a site connected to WordPress.com.
  • Go to Posts > Add New
  • Open the browser console; you should not see the warnings above.

You can repeat the same steps with other elements touched by this PR. All in all it should be a fairly straightforward change imo.

This should warnings such as:

```
Button isDefault prop is deprecated since version 5.4 and will be removed in version 6.2. Please use variant="secondary" instead.
```
@jeherve jeherve added [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Pri] Normal [Status] In Progress [Type] Janitorial labels Mar 4, 2022
@jeherve jeherve self-assigned this Mar 4, 2022
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello jeherve! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D76075-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@github-actions github-actions bot added [Block] Paid Content aka Premium Content [Block] Revue [Block] VideoPress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Mar 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: April 5, 2022.
  • Scheduled code freeze: March 29, 2022.

Backup plugin:

  • Next scheduled release: April 5, 2022.
  • Scheduled code freeze: March 28, 2022.

jeherve added 2 commits March 4, 2022 11:08
This should get us rid of warnings such as:

```
Warning: React does not recognize the `isLarge` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `islarge` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
```
@jeherve jeherve changed the title Blocks: update secondary buttons to use non-deprecated attribute. Blocks: update buttons to use non-deprecated attributes Mar 4, 2022
@jeherve jeherve requested a review from a team as a code owner March 4, 2022 11:40
@github-actions github-actions bot added [JS Package] Connection [JS Package] Components [JS Package] IDC [JS Package] Licensing [JS Package] Partner Coupon [Package] Connection UI This package no longer exists in the monorepo. [Package] Identity Crisis This package no longer exists in the monorepo. It was merged into [Package] Connection. [Package] My Jetpack [Package] Search Contains core Search functionality for Jetpack and Search plugins [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. Admin Page React-powered dashboard under the Jetpack menu RNA [Feature] Widget Visibility labels Mar 4, 2022
@jeherve jeherve changed the title Blocks: update buttons to use non-deprecated attributes Button Component: update to use non-deprecated attributes Mar 4, 2022
@jeherve jeherve requested a review from a team March 4, 2022 11:57
@jeherve jeherve added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] In Progress labels Mar 4, 2022
oskosk
oskosk previously approved these changes Mar 4, 2022
Copy link
Contributor

@oskosk oskosk left a comment

Choose a reason for hiding this comment

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

LGTM!

@oskosk
Copy link
Contributor

oskosk commented Mar 7, 2022

Pushed a rebased version. My Jetpack's product-detail-card was conflicting

@oskosk oskosk merged commit 88413da into master Mar 7, 2022
@oskosk oskosk deleted the update/buttons-deprecated-isdefault branch March 7, 2022 11:32
@github-actions github-actions bot removed the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Mar 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2022

Great news! One last step: head over to your WordPress.com diff, D76075-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@jeherve
Copy link
Member Author

jeherve commented Mar 7, 2022

r241235-wpcom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [Block] Amazon [Block] Anchor Fm Anchor.fm integration [Block] Business Hours [Block] Button [Block] Calendly [Block] Contact Form Form block (also see Contact Form label) [Block] Conversation [Block] Dialogue [Block] Eventbrite [Block] GIF [Block] Google Calendar [Block] Latest Instagram Posts [Block] Mailchimp [Block] Map [Block] OpenTable [Block] Paid Content aka Premium Content [Block] Payment Button aka Recurring Payments [Block] Pinterest [Block] Podcast Player [Block] Revue [Block] VideoPress [Extension] Publicize Block editor plugin [Feature] Widget Visibility [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [JS Package] Components [JS Package] Connection [JS Package] IDC [JS Package] Licensing [JS Package] Partner Coupon [Package] Connection UI This package no longer exists in the monorepo. [Package] Identity Crisis This package no longer exists in the monorepo. It was merged into [Package] Connection. [Package] My Jetpack [Package] Search Contains core Search functionality for Jetpack and Search plugins [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal RNA Touches WP.com Files [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants