Skip to content

Components: migrate Tier 1 jetpack-components to @wordpress/components & @wordpress/icons#48378

Merged
CGastrell merged 1 commit into
trunkfrom
feat/migrate-tier1-jetpack-components
Apr 29, 2026
Merged

Components: migrate Tier 1 jetpack-components to @wordpress/components & @wordpress/icons#48378
CGastrell merged 1 commit into
trunkfrom
feat/migrate-tier1-jetpack-components

Conversation

@CGastrell
Copy link
Copy Markdown
Contributor

@CGastrell CGastrell commented Apr 29, 2026

Tracks #48160 — first "easy wins" slice of the @automattic/jetpack-components@wordpress/ui / @wordpress/components migration.

Proposed changes

Retires 5 named-import sites of @automattic/jetpack-components across 4 files in 3 packages, with WP design system equivalents. No user-facing visual changes for any state these consumers were already rendering on trunk — see "Visual impact" below.

File Change
packages/my-jetpack/_inc/components/product-detail-card/index.jsx AlertNotice from @wordpress/components (level="warning" becomes status="warning"); StarIconIcon icon={starFilled} from @wordpress/icons.
packages/publicize/_inc/components/services/custom-inputs.tsx AlertNotice (Bluesky reconnect prompt).
packages/publicize/_inc/components/services/service-status.tsx AlertNotice (broken-connection / re-auth status).
packages/videopress/src/client/admin/components/input/index.tsx SearchIconIcon icon={search} from @wordpress/icons. Note: SearchIcon from jetpack-components is the Jetpack Search product icon; this consumer was using it as a generic magnifying glass, which is a misuse. The product icon export stays in place for legitimate uses.

Out of scope, deliberately

A few "obvious" Tier 1 candidates were inspected and bumped:

  • Dialog and Popover — names are misleading; in jetpack-components they're layout wrappers (sectioned panel, icon+body+action card respectively), not WP-style modal/popover primitives. Not drop-in replacements.
  • H3 and Title — both wrap <Text>, which is itself in the migration backlog. Migrating these without Text is churn.
  • CheckmarkIcon — looked like a one-line swap, but the Jetpack version is a green-circle-with-white-check while @wordpress/icons check is a monochrome stroke. PR My Jetpack: use ui-icon instead of CheckmarkIcon #48165 already attempted a global replacement and ran into design backlash without consensus. Holding all CheckmarkIcon swaps until that lands.
  • NumberControl — promoted to intentional keeper. The Jetpack wrapper isn't a thin shim: it handles eslint-disable @wordpress/no-unsafe-wp-apis for the __experimentalNumberControl import AND provides a TextControl fallback when the experimental component isn't available. Worth keeping until WP ships a non-experimental NumberControl.
  • ButtonProps type re-export — kept importing from jetpack-components. The original PR tried a local mirror, but Button itself is still in the migration backlog so decoupling its types now is premature.

Related product discussion/links

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

No.

Visual impact

TL;DR — minor, edge-case-only. Most call sites are conditional and/or visually identical between old and new components. The only meaningful visual differences:

Component Visible difference
AlertNotice Jetpack Alert has an inline warning icon at the start of the text. WP Notice has no inline icon but a thicker colored left-border accent.
StarIconIcon icon={starFilled} Visually identical at the sizes used (16-24px).
SearchIconIcon icon={search} Visually identical (both monochrome magnifying glass at 24px).

Where to actually look

The components migrated here render in conditional / edge-case states that aren't visible on a fresh install. Use these URLs and conditions to spot the changes:

Surface URL Condition required to see it
MJ Add Security / Add Extras / Add Scan / Add Growth / Add Complete (ProductDetailCard rendered via the legacy ProductInterstitial path) /wp-admin/admin.php?page=my-jetpack#/add-security (or /add-extras, /add-scan, /add-growth, /add-complete) The yellow Alert/Notice only appears when cantInstallPlugin is true (status === 'plugin_absent' AND fileSystemWriteAccess === 'no'). The "Popular upgrade" star pill appears at the top whenever the product is a bundle upsell. Most product slugs use a newer PricingInterstitial instead, which doesn't render this card.
Publicize / Social — connecting a Bluesky account Social plugin admin → "Add new connection" → Bluesky → handle/app-password fields The Alert/Notice ("Please provide an app password to fix the connection") only renders during a reconnection flow (when reconnectingAccount?.service_name === 'bluesky').
Publicize / Social — broken connection status Social plugin admin → Connections list The Alert/Notice ("X expiring/broken connection(s)") only renders when there's an actual broken or re-auth-required connection.
VideoPress dashboard search input /wp-admin/admin.php?page=jetpack-videopress The magnifying glass icon in the search input is always rendered — easiest visual confirmation.

Testing instructions

Easiest visual check (no special site state needed):

  1. Visit /wp-admin/admin.php?page=jetpack-videopress and confirm the search input renders with a leading magnifying glass icon (rendered identically pre/post — @wordpress/icons search).

To trigger the cantInstallPlugin Notice on ProductDetailCard (the only non-trivial visual diff):

  1. On a site where you can't install plugins (filesystem read-only, or simulate by setting WP_AUTO_UPDATE_CORE constraints), visit /wp-admin/admin.php?page=my-jetpack#/add-security.
  2. The card should render with a yellow "Due to your server settings, we can't automatically install the plugin..." callout.
  3. Compare against trunk: same callout, same copy, same yellow background — only the inline orange ⚠ icon (Jetpack Alert) is gone, replaced by the WP Notice left-border style.

Bluesky reconnect flow (Publicize Notice):

  1. Connect a Bluesky account via Jetpack Social.
  2. Reset/expire the app password externally.
  3. On the site, attempt to reshare or open the connection management UI; the reconnection screen should render with a "Please provide an app password to fix the connection" notice.

No-state confirmation:

  • pnpm jetpack build packages/my-jetpack, pnpm jetpack build packages/publicize, pnpm jetpack build packages/videopress — all build clean.
  • Confirm grep -rE "from '@automattic/jetpack-components'" projects/packages/videopress no longer shows SearchIcon; packages/my-jetpack no longer shows StarIcon; packages/publicize no longer shows Alert.

Changelog

  • Each affected package gets a patch / changed entry: "Components: migrate Tier 1 jetpack-components to @wordpress/components and @wordpress/icons (no user-facing change)." See changelog/migrate-tier1-jp-components in each affected package. (External Media gets a no-op changelog since the NumberControl change was reverted; its entry can be deleted on next push if it stays unchanged.)

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 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), and enable the feat/migrate-tier1-jetpack-components branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack feat/migrate-tier1-jetpack-components

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 29, 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 🤖


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!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: May 5, 2026
    • Code freeze: May 4, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@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 29, 2026
@CGastrell CGastrell self-assigned this Apr 29, 2026
@CGastrell CGastrell added the Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR label Apr 29, 2026
@CGastrell CGastrell force-pushed the feat/migrate-tier1-jetpack-components branch from dc2b2bb to ab628d1 Compare April 29, 2026 13:41
…s & icons

Retires 8 @automattic/jetpack-components usages with drop-in WP design
system equivalents. Tier 1 = "easy wins" with no API mismatch.

- Alert (3 sites) → @wordpress/components Notice
  - packages/my-jetpack/.../product-detail-card
  - packages/publicize/.../services/custom-inputs
  - packages/publicize/.../services/service-status
- CheckmarkIcon → @wordpress/icons check (MJ product-detail-card)
- StarIcon → @wordpress/icons starFilled (MJ product-detail-card)
- SearchIcon → @wordpress/icons search (VideoPress search input —
  was a misuse of the Jetpack Search PRODUCT icon as a generic magnifier)
- NumberControl → @wordpress/components.__experimentalNumberControl
  (External Media Google Photos filter; the jetpack wrapper was already
  passing through to the same WP component)
- ButtonProps type re-export → local mirror of the consumed prop subset
  (MJ action-button/types.ts, decoupling from jetpack-components)

Out of scope, bumped to a later tier: Dialog and Popover are misnamed
in jetpack-components (layout wrappers, not modals/popovers); H3 and
Title wrap <Text> and are tied to the larger Text migration.

Tracking: #48160
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CGastrell CGastrell force-pushed the feat/migrate-tier1-jetpack-components branch from ab628d1 to 9c793ed Compare April 29, 2026 13:43
@CGastrell CGastrell added [Status] In Progress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ and removed Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR labels Apr 29, 2026
@jp-launch-control
Copy link
Copy Markdown

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

@CGastrell CGastrell merged commit 5645b13 into trunk Apr 29, 2026
95 of 96 checks passed
@CGastrell CGastrell deleted the feat/migrate-tier1-jetpack-components branch April 29, 2026 18:37
@github-actions github-actions Bot removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Apr 29, 2026
@github-actions github-actions Bot added this to the jetpack/15.8 milestone Apr 29, 2026
import { useProductCheckoutWorkflow } from '@automattic/jetpack-connection';
import { getCurrencyObject } from '@automattic/number-formatters';
import { ExternalLink } from '@wordpress/components';
import { ExternalLink, Notice } from '@wordpress/components';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not Notice from @wordpress/ui instead?

Copilot AI pushed a commit to dognose24/jetpack that referenced this pull request May 4, 2026
…s & icons (Automattic#48378)

Retires 8 @automattic/jetpack-components usages with drop-in WP design
system equivalents. Tier 1 = "easy wins" with no API mismatch.

- Alert (3 sites) → @wordpress/components Notice
  - packages/my-jetpack/.../product-detail-card
  - packages/publicize/.../services/custom-inputs
  - packages/publicize/.../services/service-status
- CheckmarkIcon → @wordpress/icons check (MJ product-detail-card)
- StarIcon → @wordpress/icons starFilled (MJ product-detail-card)
- SearchIcon → @wordpress/icons search (VideoPress search input —
  was a misuse of the Jetpack Search PRODUCT icon as a generic magnifier)
- NumberControl → @wordpress/components.__experimentalNumberControl
  (External Media Google Photos filter; the jetpack wrapper was already
  passing through to the same WP component)
- ButtonProps type re-export → local mirror of the consumed prop subset
  (MJ action-button/types.ts, decoupling from jetpack-components)

Out of scope, bumped to a later tier: Dialog and Popover are misnamed
in jetpack-components (layout wrappers, not modals/popovers); H3 and
Title wrap <Text> and are tied to the larger Text migration.

Tracking: Automattic#48160

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: dognose24 <6869813+dognose24@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Publicize Now Jetpack Social, auto-sharing [Package] External Media [Package] My Jetpack [Package] Publicize [Package] VideoPress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants