Protect: migrate firewall upgrade prompt button to @wordpress/ui#48151
Protect: migrate firewall upgrade prompt button to @wordpress/ui#48151
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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 🤖 🔴 Action required: We would recommend that you add a section to the PR description to specify whether this PR includes any changes to data or privacy, like so: Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Protect plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
85d701e to
486465a
Compare
Part of #48160
Proposed changes
Buttonfrom@automattic/jetpack-componentsforButtonfrom@wordpress/uiin the firewall upgrade prompt.classNameandonClick, and the default variant maps cleanly to@wordpress/ui'svariant="solid"default.@wordpress/uito the Protect plugin's direct dependencies.Other information
First of a safe batch migrating Jetpack custom Button consumers to
@wordpress/uiButton. Mechanical prop map only (noisLoading,isDestructive,isExternalLink,href,icon,weight,fullWidthinvolved — those cases will be addressed in separate, deliberate PRs).Real-screen before / after
Captured on a live Jurassic Ninja site with Jetpack + Jetpack Protect installed, on the Firewall tab of the Protect admin (
/wp-admin/admin.php?page=jetpack-protect#/firewall) on a free site (automatic rules not enabled → upgrade prompt renders).@automattic/jetpack-componentsButton@wordpress/uiButtonButton classes went from
components-button dops-button is-primary(Jetpack wrapper) to…__button …__is-brand …__is-solid(@wordpress/uiprimitive). The second "Upgrade to enable…" button further down the page is a separateContextualUpgradeTriggercomponent (not touched by this PR).Isolated Storybook comparison
Testing instructions
@wordpress/uisolid style vs. the old@automattic/jetpack-componentsprimary).