Skip to content

Scan & Backup upsell pages: Migrate headers to admin-ui Page - #109567

Closed
CGastrell wants to merge 15 commits into
trunkfrom
update/jetpack-page-migrations
Closed

CGastrell wants to merge 15 commits into
trunkfrom
update/jetpack-page-migrations

Conversation

@CGastrell

@CGastrell CGastrell commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

Part of JETPACK-1361

Proposed Changes

  • Migrates Scan upsell pages (wpcom-upsell.tsx and wpcom-scan-upsell.tsx) from NavigationHeader to @wordpress/admin-ui Page component
  • Migrates Backup upsell pages (wpcom-upsell.tsx, wpcom-backup-upsell.tsx, and wpcom-backup-upsell-placeholder.tsx) from NavigationHeader to Page
  • Uses JetpackTitle component for the page title on all pages
  • Adds admin-ui CSS import and responsive layout overrides for both scan and backup sections
  • Switches Main from wideLayout to fullWidthLayout to let admin-ui handle content width

Follows the pattern established in the Subscribers migration (PR #109520).

Scan

Before:
image

After:

image image

Backup

Before:
image

After:

image image

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.

Testing Instructions

Scan

  • Navigate to /scan/<site-slug> on a WP.com site without Scan (should show the upsell page)
  • Verify the Jetpack logo appears next to "Scan" in the header
  • Verify the subtitle and upsell content display correctly
  • Test at different viewport widths (desktop and mobile)

Backup

  • Navigate to /backup/<site-slug> on a WP.com site without Backup (should show the upsell page)
  • Verify the Jetpack logo appears next to "Backup" in the header
  • Verify the subtitle and upsell content display correctly
  • Test at different viewport widths (desktop and mobile)

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 self-assigned this Mar 25, 2026
@matticbot

matticbot commented Mar 25, 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

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

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

@CGastrell
CGastrell marked this pull request as ready for review March 25, 2026 16:41
Comment thread client/my-sites/scan/style.scss Resolved
@simison

simison commented Mar 25, 2026

Copy link
Copy Markdown
Member

Let's keep the existing spacing, although not super critical since we'll update footer right next to another one:

image

@CGastrell CGastrell changed the title Scan upsell pages: Migrate headers to admin-ui Page Scan & Backup upsell pages: Migrate headers to admin-ui Page Mar 25, 2026
CGastrell and others added 5 commits March 25, 2026 16:11
Replace NavigationHeader with Page component from @wordpress/admin-ui
on both Scan upsell pages (wpcom-upsell.tsx and wpcom-scan-upsell.tsx).
Add admin-ui CSS import and layout overrides for the scan section.

Part of the Jetpack header unification effort (JETPACK-1361).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace NavigationHeader with Page component from @wordpress/admin-ui
on all three Backup upsell pages (wpcom-upsell.tsx, wpcom-backup-upsell.tsx,
wpcom-backup-upsell-placeholder.tsx). Add admin-ui CSS import and layout
overrides for the backup section.

Part of the Jetpack header unification effort (JETPACK-1361).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ght reset

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Create reusable admin-ui-page-layout mixin at
client/components/jetpack-page-layout/_admin-ui-page.scss for pages
migrating to @wordpress/admin-ui Page component. Replaces duplicated
CSS in scan and backup stylesheets.

Usage: @include admin-ui-page-layout inside a body.is-section-* selector.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace duplicated admin-ui layout CSS with the shared mixin from
client/components/jetpack-page-layout/_admin-ui-page.scss.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CGastrell
CGastrell force-pushed the update/jetpack-page-migrations branch from d6a407c to 29b1408 Compare March 25, 2026 19:12
Use margin-left/margin-right instead of margin shorthand to avoid
resetting vertical margins (e.g. what-is-jetpack section spacing).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CGastrell

Copy link
Copy Markdown
Contributor Author

Let's keep the existing spacing, although not super critical since we'll update footer right next to another one:

Fix was simple enough to get it back. Done at 48ef0d8

Comment on lines +6 to +7
// Must be called inside a `body.is-section-<name>` selector.
@mixin admin-ui-page-layout {

@simison simison Mar 25, 2026 •

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.

Wondering if something like this would be valid?

@mixin admin-ui-page-layout( $section ) {
  body.is-section-#{ $section } {
    // ...
  }
}

@simison

simison commented Mar 25, 2026 •

Copy link
Copy Markdown
Member

Would be important for the whole page to become same color, so we'll need to adjust this to either take full height, or match background colors:

Screenshot 2026-03-25 at 22 01 41

Depends a bit if we want the footer to be sticky-bottom, and assuming we do, then full height might be better? That would also avoid syncing colors when component bg color is adjusted.

@simison

simison commented Mar 25, 2026 •

Copy link
Copy Markdown
Member

Let's use the original width for this content — the 660px is meant for settings cards, not other content. To use 660px we might need some variable in mixin, or using is-constraind class for example somewhere. Later that will be part of Page component.

Screenshot 2026-03-25 at 22 17 20

Current version is both too narrow, and ends up rendering left-aligned:
Screenshot 2026-03-25 at 22 15 21

Note also placement of the banner and how it looks visually broken. It should render as part of Page contents I think but you can confirm with designers how it should look in final version. It's fine to do in a follow up.

* Scan & Backup main pages: Migrate headers to admin-ui Page

Replace NavigationHeader with Page component from @wordpress/admin-ui
on Scan main, Scan history, and Backup main pages.

Environment-conditional rendering preserved: Page component only renders
on WP.com; Jetpack Cloud and A8C for Agencies paths are unchanged.

Backup's BackupActionsToolbar moves from NavigationHeader children to
the Page actions prop.

Part of the Jetpack header unification effort (JETPACK-1361).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Atomic transfer & scan placeholder: Migrate headers to admin-ui Page

Replace FormattedHeader with Page component from @wordpress/admin-ui
in WPCOMBusinessAT (shared by Scan and Backup activation flows) and
the Scan upsell placeholder.

Shorten product names in headers: 'Jetpack VaultPress Backup' -> 'Backup',
'Jetpack Scan' -> 'Scan' (JetpackTitle component provides the Jetpack logo).
Add subTitle prop to AtomicContentSwitch interface for consistent subtitles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CGastrell and others added 2 commits March 26, 2026 12:44
* Monetize: Migrate header to @wordpress/admin-ui Page

Replace NavigationHeader with Page component from @wordpress/admin-ui
on the Monetize page. Header conditionally hidden on single paid
subscription sub-pages (same behavior as before).

Override the shared mixin's 660px max-width for the earn section, as
Monetize content (cards, tables, payment plans) needs full width.

Part of the Jetpack header unification effort (JETPACK-1361).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Move tabs closer to header

* Fix mobile

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Mikael Korpela <mikael@ihminen.org>
Both sections have full-width content (backup cards, scan results)
that should not be constrained to 660px. The constrained content
mixin is only appropriate for settings-style pages (Podcasting).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CGastrell
CGastrell force-pushed the update/jetpack-page-migrations branch from 505b5d6 to abd6460 Compare March 26, 2026 15:55
CGastrell and others added 3 commits March 26, 2026 13:13
The admin-ui-page-layout-constrained-content mixin now accepts an
optional $scope selector to limit the 660px constraint to specific
page variants (e.g. upsell pages only).

Scan and Backup use scoped constraint for upsell pages while keeping
full width for the active dashboard. Podcasting uses unscoped (always
constrained) which still works via the null default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change backup__main-wrap margins from 'initial' to 'auto' on WP.com
so the content centers within the admin-ui Page container. The wrapper
has its own width management via negative margins for JPC, but on
WP.com it should use auto margins for proper centering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fixed desktop height caused content overflow within the admin-ui
Page container. Let content determine its own height.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CGastrell and others added 2 commits March 26, 2026 15:05
* Traffic: Migrate header to @wordpress/admin-ui Page

Replace NavigationHeader with Page component from @wordpress/admin-ui
on the Traffic settings page. Add admin-ui-page-layout mixin for the
marketing section.

Part of the Jetpack header unification effort (JETPACK-1361).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Traffic: Add constrained content width

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add padding-top override for mobile focus-content layout to prevent
content sitting under the masterbar on small screens. Remove unnecessary
calc() wrappers around single CSS custom properties.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@simison

simison commented Mar 26, 2026

Copy link
Copy Markdown
Member

Backup upsell still differs quite a bit from prod:

  • Very wide
  • Cloud doesn't float anymore to the left

Prod:
Screenshot 2026-03-26 at 20 33 58

PR:
Screenshot 2026-03-26 at 20 33 44

@CGastrell

Copy link
Copy Markdown
Contributor Author

Backup upsell still differs quite a bit from prod:

  • Very wide
  • Cloud doesn't float anymore to the left

Prod: Screenshot 2026-03-26 at 20 33 58

PR: Screenshot 2026-03-26 at 20 33 44

Let me see if I forgot to push some commit, but this is what I see here:

image

@simison

simison commented Mar 26, 2026

Copy link
Copy Markdown
Member

Header button should be compact (not a blocker for merging):

Now:
Screenshot 2026-03-26 at 20 47 06
Compact:
Screenshot 2026-03-26 at 20 47 14

The notice banner is still in the wrong spot above header; it should be in the content instead. I pushed a change (41822bc) to move it for backup, and I see it's also in Scan and Activity Log. However, now it's still too wide compared to the rest of the content:

Screenshot 2026-03-26 at 20 46 46

@CGastrell

Copy link
Copy Markdown
Contributor Author

This PR was split into multiple, lighter changes

@CGastrell CGastrell closed this Mar 31, 2026
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.

3 participants