Skip to content

My Jetpack: migrate overview Button and Text to @wordpress/ui#48166

Draft
lezama wants to merge 1 commit intotrunkfrom
try/my-jetpack-overview-wp-ui
Draft

My Jetpack: migrate overview Button and Text to @wordpress/ui#48166
lezama wants to merge 1 commit intotrunkfrom
try/my-jetpack-overview-wp-ui

Conversation

@lezama
Copy link
Copy Markdown
Contributor

@lezama lezama commented Apr 18, 2026

Partial of #48160 — My Jetpack dashboard section.

Proposed changes

Per-page migration pass on the My Jetpack overview page (/wp-admin/admin.php?page=my-jetpack#/overview): swap safe Text and Button usages from @automattic/jetpack-components to @wordpress/ui v0.11.0. Adds @wordpress/ui to the my-jetpack package dependencies at the version already used by sibling packages (forms, newsletter, publicize, charts, components).

Files migrated (9)

Text → @wordpress/ui Text with variant mapping (bodybody-md, body-smallbody-sm, labelbody-sm, title-mediumheading-lg):

  • packages/my-jetpack/_inc/components/connected-product-card/index.tsx
  • packages/my-jetpack/_inc/components/product-card/status.tsx
  • packages/my-jetpack/_inc/components/connection-status-card/index.tsx
  • packages/my-jetpack/_inc/components/card/index.jsx
  • packages/my-jetpack/_inc/components/plans-section/index.tsx (Text only — Buttons left for follow-up)
  • packages/my-jetpack/_inc/components/product-cards-section/backup-card/index.jsx
  • packages/my-jetpack/_inc/components/product-cards-section/videopress-card/index.tsx
  • packages/my-jetpack/_inc/components/product-cards-section/contextual-card-info.jsx

Button → @wordpress/ui Button (variant="secondary""outline"):

  • packages/my-jetpack/_inc/components/product-card/recommendation-actions.tsx

Other information

  • Generate changelog entries for this PR (using AI).

Out of scope (follow-up PRs)

  • action-button/index.tsx + action-button/secondary-button.tsx — pervasive href/isExternalLink/weight — needs coordinated Link migration
  • plans-section/index.tsx Button usages — all variant="link" + href + isExternalLink + weight="regular" (inline TODO at top of file)
  • golden-token/tooltip/index.tsxvariant="link"
  • connection-status-card/index.tsx variant="link" Button — kept on @wordpress/components
  • Interstitial flow files — not on overview render path
  • Col/Container → Stack, Gridicon → @wordpress/icons, and per-component migrations (JetpackIcon, JetpackLogo, LoadingPlaceholder, Notice, Spinner, UpsellBanner, GlobalNotices, DotPager, ThemeProvider) — separate PRs per issue Jetpack UI Modernization #48160

Real-screen before / after

Both screenshots captured on a live Jurassic Ninja site with Jetpack connected. Before = clean trunk rebuild (54cb1b001a). After = this branch's build with the migrations applied.

Before (trunk, rebuilt) After (this PR)
before after

Both renders are pixel-identical (739,707 bytes each). DOM verification on the branch build: __body-md, __body-sm, __heading-lg, __is-neutral classes confirmed present — migration is live. No layout/visual regressions.

Investigated an earlier visual "regression" I thought I saw in the Views chart — turned out to be a transient Stats-widget render state in my very first trunk screenshot (chart bars displayed at a larger relative height during initial data load). Subsequent renders of both trunk and this branch are identical. My PR does not affect the Stats widget.

Notes on the migration

  1. Build order matters: pnpm jetpack build packages/my-jetpack --production must run before pnpm jetpack build plugins/jetpack --production — the plugin build bundles pre-built package outputs, so package changes need to be refreshed first.
  2. Version parity: pinned @wordpress/ui at 0.11.0 to match forms, newsletter, publicize, charts, and js-packages/components. A version mismatch would cause pnpm to resolve two copies and their CSS module hashes to differ.
  3. Text semantic change: @automattic/jetpack-components Text renders title-medium<h3>, body<p>, etc. @wordpress/ui Text always renders <span>. Callsites on the overview page do not rely on block-level defaults, so no layout impact observed, but this is a consideration for future migrations of files where the variant was carrying block-level styling.

Testing instructions

  • Visit My Jetpack overview (admin.php?page=my-jetpack#/overview).
  • Verify product cards, plan section, and connection status card render identically to trunk.
  • Confirm no console errors.
  • Spot-check Text typography and Button appearance in the admin.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 18, 2026

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the try/my-jetpack-overview-wp-ui branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack try/my-jetpack-overview-wp-ui
bin/jetpack-downloader test jetpack-mu-wpcom-plugin try/my-jetpack-overview-wp-ui

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 18, 2026

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.
  • ✅ Add a "[Status]" label (In Progress, Needs 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 🤖


🔴 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:

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

My PR adds *x* and *y*.

Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@github-actions github-actions bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Apr 18, 2026
@jp-launch-control
Copy link
Copy Markdown

jp-launch-control bot commented Apr 18, 2026

Code Coverage Summary

This 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. 🤷

Full summary · PHP report · JS report

@lezama lezama force-pushed the try/my-jetpack-overview-wp-ui branch 6 times, most recently from 843b226 to af92d08 Compare April 18, 2026 19:48
@lezama lezama force-pushed the try/my-jetpack-overview-wp-ui branch from af92d08 to f6e1037 Compare April 18, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] My Jetpack [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant