Skip to content

Subscribers: Migrate header to @wordpress/admin-ui Page component - #109520

Merged
simison merged 12 commits into
trunkfrom
update/subscribers-page-migration
Mar 25, 2026
Merged

simison merged 12 commits into
trunkfrom
update/subscribers-page-migration

Conversation

@CGastrell

@CGastrell CGastrell commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Resolves JETPACK-1361

Proposed Changes

  • Adds @wordpress/admin-ui@^1.10.0 as a dependency, matching the version used in Jetpack
  • Pins the full TanStack package family to Dashboard-compatible versions via resolutions (see below)
  • Migrates the Subscribers page from NavigationHeader to @wordpress/admin-ui's Page component
  • Uses JetpackTitle component for the page title (consistent with other Jetpack pages)
  • Removes the separate SubscribersHeader component — header logic is now inline in SubscriberDataViews
  • Removes unused imports and fixMe() translation wrappers

Based on @simison's work from PR #108876.

Why are these changes being made?

Aligning Jetpack pages in Calypso with the @wordpress/admin-ui Page component, consistent with the Jetpack monorepo header unification and the direction WordPress admin is heading.

Dependency resolution

@wordpress/admin-ui transitively depends on @tanstack/react-router via @wordpress/route. Without pinning, yarn dedupe upgrades TanStack Router to versions that are incompatible with:

  • React 18 — newer versions use React.use() (React 19 only), breaking the Webpack build
  • Dashboard tests — newer versions have breaking API changes that fail 20+ test suites

The fix is to pin the full TanStack family to the versions Dashboard already uses:

"resolutions": {
    "@tanstack/history": "1.114.29",
    "@tanstack/react-router": "1.114.34",
    "@tanstack/react-store": "0.7.7",
    "@tanstack/router-core": "1.114.33",
    "@tanstack/store": "0.7.7"
}

This ensures a single copy of each package at Dashboard-compatible versions. See PR #109505 for the initial dependency analysis.

Long-term, these pins can be removed when:

  • @wordpress/admin-ui makes @wordpress/route optional (upstream Gutenberg fix), or
  • Dashboard upgrades its TanStack Router version, or
  • Calypso migrates to React 19

Testing Instructions

  • Navigate to /subscribers/<site-slug> on WP.com
  • Verify the Jetpack logo appears next to "Subscribers" in the header
  • Verify subtitle, "Add subscribers" button, and popover menu work
  • Test subscriber detail panel (click a subscriber)
  • Verify the same page via Jetpack Cloud — logo should NOT appear there

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@CGastrell
CGastrell marked this pull request as ready for review March 24, 2026 17:20
@matticbot

matticbot commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/subscribers-page-migration on your sandbox.

@CGastrell
CGastrell force-pushed the update/subscribers-page-migration branch from bf5652f to 92641f4 Compare March 24, 2026 17:23
@CGastrell CGastrell self-assigned this Mar 24, 2026
@CGastrell
CGastrell force-pushed the update/subscribers-page-migration branch from 92641f4 to 5caadc7 Compare March 24, 2026 17:39
Comment on lines +222 to +226
.subscriber-data-views__title {
display: flex;
align-items: center;
gap: 8px;
}

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.

This bit can be removed; it was used for the manually composed heading+logo.

Comment thread package.json Outdated
@@ -196,6 +196,7 @@
"@vgs/collect-js": "^0.7.2",
"@vgs/collect-js-react": "^2.0.0",
"@visx/glyph": "^3.12.0",
"@wordpress/admin-ui": "^1.8.0",

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.

This is old; new one is ^1.10.0

@CGastrell
CGastrell force-pushed the update/subscribers-page-migration branch from e90c40f to 7898f79 Compare March 24, 2026 18:24
CGastrell and others added 12 commits March 24, 2026 16:07
Adding @wordpress/admin-ui as a dependency to verify whether CI tests
pass when the package is properly installed with yarn dedupe.

This is a test PR — do not merge.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adding @wordpress/admin-ui as a dependency. Pin @tanstack/react-router
to 1.114.34 via resolutions to prevent yarn dedupe from upgrading it
to 1.162.8+ which has breaking changes for Dashboard tests.

The resolution forces @wordpress/route (admin-ui's transitive dep) to
use the same TanStack Router version Dashboard already uses, avoiding
both the version incompatibility and the React.use() issue in 1.168.3+.

This is a test PR — do not merge.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace manual JetpackLogo + span with JetpackTitle component for
consistency with other Jetpack pages. Also remove unused useDispatch
import.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Bump @wordpress/admin-ui from ^1.8.0 to ^1.10.0
- Remove .subscriber-data-views__title CSS — was used for the manual
  logo+title span, no longer needed with JetpackTitle component

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pin all @TanStack packages to the versions Dashboard currently uses,
preventing yarn dedupe from upgrading them when @wordpress/admin-ui
brings in newer requirements via @wordpress/route:

- @tanstack/history: 1.114.29
- @tanstack/react-router: 1.114.34
- @tanstack/react-store: 0.7.7
- @tanstack/router-core: 1.114.33
- @tanstack/store: 0.7.7

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CGastrell
CGastrell force-pushed the update/subscribers-page-migration branch from 7898f79 to c54e0c5 Compare March 24, 2026 19:07
@simison
simison merged commit 1aaa97d into trunk Mar 25, 2026
14 checks passed
@simison
simison deleted the update/subscribers-page-migration branch March 25, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants