Skip to content

Migrate search upsell page to unified AdminHeader - #47332

Merged
CGastrell merged 5 commits into
update/normalize-admin-page-headersfrom
update/normalize-search-admin-header
Feb 27, 2026
Merged

CGastrell merged 5 commits into
update/normalize-admin-page-headersfrom
update/normalize-search-admin-header

Conversation

@CGastrell

@CGastrell CGastrell commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

Part of JETPACK-1355

Summary

  • Migrates the search upsell page from the deprecated header prop to the new title/subTitle/actions props on AdminPage
  • Moves the license activation link from the custom Header component into the actions prop
  • Removes the wrapping <div> around AdminPage
  • Updates dashboard-page.scss to scope padding reset with :not(:has(.uses-new-admin-ui))

Depends on #47313.

Before After
image image
image image

Then there's this screen which seems unreachable (old pricing 2022-08), and it's completely broken. We should remove it entirely:

image

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

No. Presentational change only.

Testing instructions:

  • jetpack build packages/search passes
  • jetpack test js packages/search passes
  • Visual check: search upsell page renders header with Jetpack bolt icon + "Search" title + subtitle

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

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 update/normalize-search-admin-header branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/normalize-search-admin-header

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 github-actions Bot added the [Package] Search Contains core Search functionality for Jetpack and Search plugins label Feb 25, 2026
@github-actions

github-actions Bot commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

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: Please add missing changelog entries for the following projects: projects/plugins/search

Use the Jetpack CLI tool to generate changelog entries by running the following command: jetpack changelog add.
Guidelines: /docs/writing-a-good-changelog-entry.md


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!


Search 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.

@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 Feb 25, 2026
@CGastrell CGastrell added [Status] In Progress [Package] Forms 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 Feb 25, 2026
@CGastrell CGastrell self-assigned this Feb 25, 2026
@CGastrell CGastrell removed the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Feb 25, 2026
@jp-launch-control

jp-launch-control Bot commented Feb 25, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

No summary data is available for parent commit a0c9da1, so cannot calculate coverage changes. 😴

If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for a0c9da1 is available.

Full summary · PHP report · JS report

Coverage check overridden by Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR .

@github-actions github-actions Bot added [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Tests] Includes Tests E2E Tests labels Feb 26, 2026
@CGastrell
CGastrell force-pushed the update/normalize-search-admin-header branch from 3c39044 to 7497b58 Compare February 27, 2026 04:18
CGastrell and others added 5 commits February 27, 2026 01:55
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…eader.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CGastrell
CGastrell force-pushed the update/normalize-search-admin-header branch from 7497b58 to 49a9318 Compare February 27, 2026 04:55
@CGastrell
CGastrell merged commit 3152cef into update/normalize-admin-page-headers Feb 27, 2026
67 of 68 checks passed
@CGastrell
CGastrell deleted the update/normalize-search-admin-header branch February 27, 2026 15:40
CGastrell added a commit that referenced this pull request Mar 2, 2026
* Migrate search upsell page header to unified AdminHeader via title prop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entry for search package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Migrate search dashboard page header to AdminPage with unified AdminHeader.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Delete unused search upsell header component and styles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update logo locator for e2e

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
CGastrell added a commit that referenced this pull request Mar 2, 2026
…ress/admin-ui (#47313)

* Add AdminHeader component to jetpack-components for unified admin page headers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add unified header props to AdminPage with backward-compatible legacy fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Migrate publicize admin page to use unified AdminHeader via title prop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Refactor AdminHeader to use VStack/HStack/Heading matching @wordpress/admin-ui pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Rename tagline prop to subTitle across AdminPage and publicize for admin-ui alignment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add @wordpress/admin-ui dependency to jetpack-components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Refactor AdminHeader to wrap @wordpress/admin-ui Page component.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove unused AdminHeader style.module.scss, styles come from admin-ui.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Delete unused publicize AdminPageHeader, replaced by unified AdminHeader.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entries for jetpack-components and publicize.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Address review feedback: fix deprecated prop name, export types, remove redundant props and comments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* add subtitle as in design MVP

* Bundle @wordpress/admin-ui CSS via proxy file to avoid DependencyExtractionPlugin externalization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Centralize admin-ui CSS bundling in jetpack-webpack-config

Replace the proxy CSS file hack with proper webpack configuration:

- Add @wordpress/admin-ui/build-style/style.css to defaultRequestMap
  with external: false to prevent DependencyExtractionPlugin from
  incorrectly externalizing the CSS subpath import (the BUNDLED_PACKAGES
  check is exact-match only, so subpaths fall through).

- Add sideEffects: true to the shared CssRule so CSS imports are never
  tree-shaken by packages declaring sideEffects: false.

- Delete the admin-ui-styles.css proxy file and use a direct import.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entries for webpack-config and components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove AdminHeader, use admin-ui Page directly in AdminPage

Delete the AdminHeader wrapper component and inline its logic into
AdminPage. When `title` is provided, AdminPage now wraps the full
page content (header, tabs, children, footer) inside admin-ui's
Page component instead of delegating to a separate header-only wrapper.

This addresses review feedback:
- Page is used for full page contents, not just as a header wrapper
- No unnecessary intermediate component wrapping an existing component
- Title composition (HStack + logo) lives directly in AdminPage

The inner Heading wrapper around title is retained as a workaround
for a known admin-ui bug with non-string titles (gutenberg#75899).
A TODO comment marks it for removal once the upstream fix lands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Jest failing to parse @wordpress/admin-ui CSS import.

The direct import of @wordpress/admin-ui/build-style/style.css in
AdminPage resolves to a path inside node_modules/.pnpm/ which Jest
ignores by default (transformIgnorePatterns). Without being transformed
by the asset stub, Jest tries to parse raw CSS as JavaScript and fails.

Expand the transformIgnorePatterns exception to also match admin-ui CSS
files, using a .* prefix to handle the nested node_modules path created
by pnpm hoisted structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Jest transformIgnorePatterns for @wordpress/admin-ui CSS in all configs.

The direct CSS import in AdminPage needs to be allowed through Jest
transforms in every config that overrides transformIgnorePatterns.
The base config and the jetpack plugin gui config both need the
admin-ui exception to handle pnpm nested node_modules paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Migrate search upsell page to unified AdminHeader (#47332)

* Migrate search upsell page header to unified AdminHeader via title prop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entry for search package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Migrate search dashboard page header to AdminPage with unified AdminHeader.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Delete unused search upsell header component and styles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update logo locator for e2e

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Migrate backup admin page header to unified AdminHeader component. (#47368)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Migrate VideoPress main admin page header to unified AdminHeader (#47370)

* Migrate videopress main admin page header to unified AdminHeader.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entry for videopress admin header migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Protect: Migrate admin page header to unified header pattern (#47361)

* Protect: Migrate admin page header to use unified header pattern

Replace the JetpackProtectLogo header with the new AdminPage `title` prop
on both the main admin page and the setup/interstitial route.

- Main admin page: swap `header={<JetpackProtectLogo />}` for `title="Protect"`
- Setup route: move the "activate license" link from the custom header into
  the `actions` prop; delete the now-unused styles.module.scss

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Protect: Fix header/tabs overlap, add subtitle, move tabs to tabs prop

- Move tabs from children into the `tabs` prop so they render between the
  admin-ui header and the content area (fixes overlap with sticky header)
- Add subtitle: "Automated malware scanning and firewall protection."
- Remove the negative margin-top hack on `.navigation` (was compensating
  for the old legacy header layout)
- Remove unused `Container` import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Protect: Add 24px horizontal padding to tabs row

Match the admin-ui header's 24px horizontal padding so tabs align with
the title text rather than sitting flush against the left edge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove admin-ui header border in AdminPage component

The :global(.admin-ui-page__header) border-bottom: none rule was present
on the My Jetpack branch but missing from the parent normalize branch.
This adds it to the shared AdminPage styles so all products using the
unified header pattern get the borderless look.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Protect: Add subtitle to setup/interstitial page

The main admin page had the subtitle but the upsell/setup route was
missing it. Add the same "Automated malware scanning and firewall
protection." subtitle for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entries.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Changelog Bot <changelog-bot@automattic.com>

* My Jetpack: Migrate admin page header to unified admin-ui Page layout (#47345)

* My Jetpack: Migrate admin page header to use unified AdminHeader component

Add title prop to AdminPage so it routes through the new AdminHeader,
giving My Jetpack the standardized bolt icon + "Jetpack" text header.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove admin-ui header border in AdminPage

Override the admin-ui Page header border-bottom within AdminPage's
scoped CSS module. The :global selector is nested inside .admin-page
so it only applies within our component, not globally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entries.

* My Jetpack: Left-align tabs with header (24px padding)

The tabs row was centered via max-width + margin: 0 auto from the
full-width-container mixin, causing them to float in the middle
instead of aligning with the header text. Replace the centered
container with a simple 24px left padding to match the admin-ui
header padding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Changelog Bot <changelog-bot@automattic.com>

* Forms: Remove admin-ui header border

Forms uses @wordpress/admin-ui Page directly (not the shared AdminPage
wrapper), so the border-bottom: none override from AdminPage styles
doesn't apply. Add the override with higher specificity in Forms' own
page styles, and remove the dead .has-tabs block which was never
triggered since Forms renders tabs via DataViews, not admin-ui tabs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Newsletter: Migrate admin page header to use unified header pattern (#47359)

Replace the custom Header component with the new AdminPage `title` and
`subTitle` props from the unified header system. This renders the standard
admin-ui Page header with the Jetpack bolt logo, "Newsletter Settings" title,
and the existing tagline.

Delete the now-unused Header component and its stylesheet.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Update/admin header normalization css override (#47397)

* changelog

* use global selector to change admin-ui-page__header position to relative

* Boost: Migrate header to lightweight unified pattern (#47392)

* Boost: Migrate header to lightweight unified pattern

Replace the large custom Jetpack Boost SVG logo with the compact unified
header: small Jetpack icon + "Boost" title + subtitle. This matches the
pattern used across Protect, My Jetpack, and Settings for consistent
product identity.

- Swap Logo SVG for JetpackLogo from @automattic/jetpack-components
- Add "Boost" title heading and descriptive subtitle
- Update styles: compact padding (16px 24px), flex gap, proper focus state
- Remove jb-container centering from masthead for left-aligned layout
- Hide subtitle on subpages where breadcrumb provides context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entry for Boost header migration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Modules page: Migrate PHP-rendered header to unified pattern (#47398)

Replace the large inline Jetpack wordmark SVG with the bolt icon + dynamic
title text ("Modules" on the modules page, "Jetpack" elsewhere). Uses the
same jp-masthead markup and classes as the React Masthead component.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entries.

* Apply suggestion from @simison

Jetpack product name doesn't need to be translated.

Co-authored-by: Mikael Korpela <mikael@ihminen.org>

* Apply suggestion from @simison

Product name doesn't need to be translated.

Co-authored-by: Mikael Korpela <mikael@ihminen.org>

* Apply suggestion from @simison

Co-authored-by: Mikael Korpela <mikael@ihminen.org>

* Properly fix product names being translated

* Apply suggestion from @Copilot

Fix grammatical error.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Jetpack Settings: Migrate header to unified pattern and left-align tabs (#47388)

* Lightweight header for Jetpack Settings page

Replace the full JetpackLogo masthead with a compact bolt icon + route-aware
title, matching the admin-ui Page header style. Move the Masthead outside
.jp-top-inside so its background spans full width while the inner content
uses left-aligned padding. Update SCSS to use sticky positioning and clean
typography consistent with admin-ui.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Jetpack Settings: Left-align navigation tabs with header

The navigation tabs were centered via max-width + margin: 0 auto on
.jp-top-inside, while the Masthead header uses full-width 24px padding.
Replace the centered container with padding-inline: 24px to align
tabs with the header text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entry for Jetpack Settings header migration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* add about page title

* rollback some css changes

* Hello Dolly compatibility fixes for Jetpack admin pages

Clear floated #dolly element so it doesn't overlap admin-ui headers,
and set its background to white so it blends with the page.

- AdminPage: clear: both on .admin-ui-page, white background on #dolly
- My Jetpack: z-index: 2 on #dolly so it stays above the header
- Boost: clear: both on .jb-dashboard, white background on #dolly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Search: Remove unnecessary global style resets and move JITM notices

Remove global *, body, and #wpcontent resets from dashboard-page.scss
that were not adding value. Move JITM notices div inside AdminPage
content area alongside the connection error container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Newsletter: Add scoped box-sizing and #dolly positioning

Scope box-sizing: border-box to #newsletter-settings-root and
position #dolly to align with the newsletter settings page layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entries.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Christian Gastrell <cgastrell@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Boost: Fix header bottom padding and use untranslated product name

- Change padding from `16px 24px 0` to `16px 24px` to match the bottom
  spacing used by other products (Social, Protect) via admin-ui Page
- Use plain string for "Boost" title since it's a product name that
  should not be translated (per review feedback on #47313)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Boost: Match header spacing with admin-ui Page layout

Add flex column layout with 8px gap to match admin-ui Page header's
spacing between title and subtitle. Also add padding-block-end: 8px
on subtitle to match the admin-ui-page__header-subtitle style. This
brings the total header height to 96px, matching Social, Backup, etc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Boost: Add white background to mount point for Hello Dolly compatibility

The #jb-admin-settings React mount point had a transparent background,
so the area behind the floated #dolly element showed the gray wp-admin
background instead of white. Give the mount point a white background
to match how AdminPage-based products handle this.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Settings: Remove Hello Dolly border-bottom to match unified header

The existing #dolly style had a border-bottom that created a visible
horizontal line between the Hello Dolly text and the Jetpack header.
Remove it so the dolly area blends seamlessly with the header below.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Settings: Also fix Hello Dolly border in admin-static.scss

The previous commit fixed border-bottom in _main.scss (.jetpack-pagestyles
#dolly), but admin-static.scss has a duplicate .wp-admin #dolly rule that
loads later in the CSS bundle, overriding the fix via cascade order.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Stop translating product names across all admin pages

Product names (Boost, Protect, Search, Social, Backup, VideoPress, Jetpack,
etc.) are brand names and should not be wrapped in translation functions.

- Remove moduleName props from AdminPage/JetpackFooter callers so the
  default "Jetpack" kicks in for footers
- Change translated title props to plain strings with do-not-translate
  comments
- Fix default moduleName in AdminPage and JetpackFooter components to
  use plain strings instead of __()
- Fix translated product names in Boost image-guide PHP and Jetpack
  Stats banner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix remaining translated product names flagged in review

- Newsletter: remove moduleName prop and MODULE_NAME constant so the
  default "Jetpack" footer kicks in
- Jetpack admin page PHP: use plain echo for "Jetpack" product name
  instead of esc_html_e()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: William Viana <vianasw@gmail.com>
Co-authored-by: Changelog Bot <changelog-bot@automattic.com>
Co-authored-by: GitHub Actions <github-actions@github.com>
Co-authored-by: Mikael Korpela <mikael@ihminen.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR E2E Tests [Package] Forms [Package] Search Contains core Search functionality for Jetpack and Search plugins [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant