Skip to content

Revert "Normalize admin page headers with unified AdminHeader wrapping @wordpress/admin-ui" - #47411

Closed
CGastrell wants to merge 1 commit into
trunkfrom
revert-47313-update/normalize-admin-page-headers
Closed

CGastrell wants to merge 1 commit into
trunkfrom
revert-47313-update/normalize-admin-page-headers

Conversation

@CGastrell

Copy link
Copy Markdown
Contributor

Reverts #47313

This is one of my "just in case" revert preps

@CGastrell CGastrell self-assigned this Mar 2, 2026
Copilot AI review requested due to automatic review settings March 2, 2026 17:35
@github-actions

github-actions Bot commented Mar 2, 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 or WordPress.com Site Helper), and enable the revert-47313-update/normalize-admin-page-headers branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack revert-47313-update/normalize-admin-page-headers
bin/jetpack-downloader test jetpack-mu-wpcom-plugin revert-47313-update/normalize-admin-page-headers

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 [Boost Feature] Image Guide [Feature] Contact Form [Feature] Publicize Now Jetpack Social, auto-sharing [JS Package] Components [JS Package] Webpack Config [Package] Backup [Package] Forms [Package] My Jetpack [Package] Newsletter [Package] Publicize [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] VideoPress [Plugin] Automattic For Agencies Client [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Classic Theme Helper Plugin [Plugin] CRM Moved to https://github.com/Automattic/jetpack-crm [Plugin] Inspect [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Paypal Payment Buttons [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. labels Mar 2, 2026
@github-actions github-actions Bot added [Plugin] Wpcloud Sso [Plugin] Wpcomsh [Tests] Includes Tests Admin Page React-powered dashboard under the Jetpack menu Bug When a feature is broken and / or not performing as intended E2E Tests RNA labels Mar 2, 2026
@github-actions

github-actions Bot commented Mar 2, 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 edit your PR description and explain what functional changes your PR includes, and why those changes are needed.


🔴 Action required: Please include detailed testing steps, explaining how to test your change, like so:

## Testing instructions:

* Go to '..'
*

🔴 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 Mar 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Reverts the earlier “unified admin header” work (#47313) by removing @wordpress/admin-ui integration and restoring/adjusting per-product headers, styles, and build/test configuration.

Changes:

  • Removes admin-ui CSS handling and unified header API surface from shared tooling (jest, webpack-config, jetpack-components).
  • Updates multiple product admin pages to use custom header slots/logos and moduleName rather than the previously unified header props.
  • Drops associated changelog entries and reverts several UI/CSS adjustments tied to the unified header rollout.

Reviewed changes

Copilot reviewed 87 out of 88 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/js-tools/jest/config.base.js Stops unignoring @wordpress/admin-ui CSS in Jest transforms.
projects/plugins/wpcomsh/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/wpcloud-sso/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/videopress/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/starter-plugin/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/social/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/search/tests/e2e/specs/search-dashboard.test.ts Updates expectations for Search header logo accessible name.
projects/plugins/search/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/protect/src/js/routes/setup/styles.module.scss Adds Protect setup header/button styles.
projects/plugins/protect/src/js/routes/setup/index.jsx Swaps to custom header slot w/ Protect logo in setup route.
projects/plugins/protect/src/js/components/admin-page/styles.module.scss Adjusts Protect admin page navigation spacing.
projects/plugins/protect/src/js/components/admin-page/index.jsx Uses custom header slot and containerized tabs layout.
projects/plugins/protect/changelog/update-protect-unified-header Removes reverted changelog entry.
projects/plugins/protect/changelog/update-normalize-admin-page-headers Removes reverted changelog entry.
projects/plugins/paypal-payment-buttons/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/mu-wpcom-plugin/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/jetpack/tests/jest.config.gui.js Stops unignoring @wordpress/admin-ui CSS in GUI Jest config.
projects/plugins/jetpack/changelog/update-jetpack-settings-lightweight-header Removes reverted changelog entry.
projects/plugins/jetpack/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/jetpack/changelog/pr-47313 Removes reverted changelog entry.
projects/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-admin-page.php Alters Jetpack masthead markup to remove page title and change wrapper.
projects/plugins/jetpack/_inc/client/scss/shared/admin-static.scss Restores bottom border styling.
projects/plugins/jetpack/_inc/client/scss/shared/_main.scss Restores border styling and changes top container layout constraints.
projects/plugins/jetpack/_inc/client/main.jsx Moves Masthead into the jp-top-inside container.
projects/plugins/jetpack/_inc/client/components/masthead/style.scss Refactors masthead styling for centered/max-width layout and logo sizing.
projects/plugins/jetpack/_inc/client/components/masthead/index.jsx Removes masthead title logic and changes wrapper element.
projects/plugins/jetpack/_inc/client/at-a-glance/stats/index.jsx Changes module name string usage for overridden banner.
projects/plugins/inspect/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/crm/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/classic-theme-helper-plugin/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/boost/changelog/update-boost-unified-header Removes reverted changelog entry.
projects/plugins/boost/changelog/pr-47388 Removes reverted changelog entry.
projects/plugins/boost/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/boost/app/modules/image-guide/class-image-guide.php Switches admin bar title string to i18n call.
projects/plugins/boost/app/assets/src/js/layout/header/header.tsx Removes unified header title/subtitle and swaps to inline SVG logo.
projects/plugins/boost/app/assets/src/js/layout/header/header.module.scss Adjusts header spacing and logo styling.
projects/plugins/boost/app/assets/src/css/main/wp-admin.scss Reverts layout clears/Hello Dolly overrides from Boost admin CSS.
projects/plugins/backup/changelog/pr-47361 Removes reverted changelog entry.
projects/plugins/automattic-for-agencies-client/changelog/pr-47361 Removes reverted changelog entry.
projects/packages/videopress/src/client/admin/components/edit-video-details/index.tsx Adds moduleName for VideoPress admin page.
projects/packages/videopress/src/client/admin/components/admin-page/index.tsx Switches VideoPress to custom header slot/logo + moduleName.
projects/packages/videopress/changelog/update-normalize-videopress-admin-header Removes reverted changelog entry.
projects/packages/search/src/dashboard/components/pages/upsell-page/styles.scss Adds upsell header/layout styles.
projects/packages/search/src/dashboard/components/pages/upsell-page/index.jsx Swaps upsell page to custom header component + moduleName.
projects/packages/search/src/dashboard/components/pages/upsell-page/header.jsx Adds Search upsell header component w/ logo and license link.
projects/packages/search/src/dashboard/components/pages/dashboard-page.scss Adds global resets and header layout tweaks for Search dashboard.
projects/packages/search/src/dashboard/components/pages/dashboard-page.jsx Replaces AdminPage wrapper with custom header/footer placement; adds footer moduleName.
projects/packages/search/changelog/update-normalize-search-admin-header Removes reverted changelog entry.
projects/packages/search/changelog/pr-47388 Removes reverted changelog entry.
projects/packages/publicize/changelog/update-normalize-admin-page-headers Removes reverted changelog entry.
projects/packages/publicize/_inc/components/admin-page/test/page-header.test.jsx Adds test coverage for new Publicize page header.
projects/packages/publicize/_inc/components/admin-page/page-header/styles.module.scss Adds styles for Publicize page header layout.
projects/packages/publicize/_inc/components/admin-page/page-header/logo.js Adds inline SVG logo component for Publicize header.
projects/packages/publicize/_inc/components/admin-page/page-header/index.jsx Adds Publicize AdminPageHeader component with license CTA logic.
projects/packages/publicize/_inc/components/admin-page/index.tsx Switches Social admin page to custom header component / hides default header when needed.
projects/packages/newsletter/src/settings/style.scss Removes global/admin-banner overrides from Newsletter settings styles.
projects/packages/newsletter/src/settings/index.tsx Switches Newsletter settings to custom header slot + moduleName constant.
projects/packages/newsletter/src/settings/components/header.tsx Adds Newsletter settings header component.
projects/packages/newsletter/src/settings/components/header.scss Adds Newsletter header styles.
projects/packages/newsletter/changelog/update-newsletter-unified-header Removes reverted changelog entry.
projects/packages/newsletter/changelog/pr-47388 Removes reverted changelog entry.
projects/packages/my-jetpack/changelog/update-my-jetpack-unified-header-v2 Removes reverted changelog entry.
projects/packages/my-jetpack/changelog/pr-47388 Removes reverted changelog entry.
projects/packages/my-jetpack/_inc/style.module.scss Reverts Hello Dolly z-index override.
projects/packages/my-jetpack/_inc/components/my-jetpack-tab-panel/styles.module.scss Adjusts tab panel padding/container mixin usage.
projects/packages/my-jetpack/_inc/components/my-jetpack-screen/index.jsx Removes title="Jetpack" prop from My Jetpack screen.
projects/packages/forms/src/dashboard/components/page/style.scss Adjusts admin-ui header selector and restores border behavior.
projects/packages/forms/changelog/pr-47313 Removes reverted changelog entry.
projects/packages/backup/src/js/components/Admin/style.scss Adds layout styles for Backup custom header area.
projects/packages/backup/src/js/components/Admin/index.js Switches Backup admin page to custom header component + moduleName and simplifies header logic.
projects/packages/backup/src/js/components/Admin/header.js Adds Backup header component (logo + actions + license CTA).
projects/packages/backup/changelog/update-normalize-backup-admin-header Removes reverted changelog entry.
projects/js-packages/webpack-config/src/webpack/css-rule.js Removes CSS-loader sideEffects override.
projects/js-packages/webpack-config/src/webpack.js Removes defaultRequestMap entry for admin-ui CSS subpath bundling.
projects/js-packages/webpack-config/changelog/centralize-admin-ui-css-bundling Removes reverted changelog entry.
projects/js-packages/components/tools/copy-scss-to-build.mjs Stops copying .css files; copies only .scss.
projects/js-packages/components/package.json Removes @wordpress/admin-ui dependency.
projects/js-packages/components/components/jetpack-footer/index.tsx Changes default moduleName to a translatable string.
projects/js-packages/components/components/admin-page/types.ts Removes unified header props and deprecation notes.
projects/js-packages/components/components/admin-page/style.module.scss Removes admin-ui-specific normalization overrides.
projects/js-packages/components/components/admin-page/index.tsx Removes admin-ui Page path and unified header logic; keeps classic header slot.
projects/js-packages/components/changelog/update-normalize-admin-page-headers Removes reverted changelog entry.
projects/js-packages/components/changelog/update-admin-header-normalization-css-override Removes reverted changelog entry.
projects/js-packages/components/changelog/pr-47388 Removes reverted changelog entry.
projects/js-packages/components/changelog/pr-47361 Removes reverted changelog entry.
projects/js-packages/components/changelog/pr-47345 Removes reverted changelog entry.
projects/js-packages/components/changelog/centralize-admin-ui-css-bundling Removes reverted changelog entry.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (5)

projects/plugins/jetpack/_inc/client/components/masthead/index.jsx:1

  • The masthead wrapper changed from a semantic <header> landmark to a plain <div>, which reduces navigability for assistive tech. Prefer keeping the semantic <header> element (e.g., <header className="jp-masthead">) and adjust styling as needed rather than changing the element type.
    projects/plugins/boost/app/assets/src/js/layout/header/header.module.scss:1
  • The header logo is interactive (clickable + focusable in the JSX) but the focus styling was removed; this can leave keyboard users without a visible focus indicator. Add a :focus-visible (or :focus) treatment on the focusable element (e.g., outline/box-shadow) so keyboard navigation remains perceivable.
    projects/plugins/protect/src/js/routes/setup/styles.module.scss:1
  • This removes the focus indicator (box-shadow: none) for the “get started” button, which can make keyboard focus hard/impossible to see. Instead of removing focus styling, replace it with an accessible focus-visible treatment (outline/box-shadow) that meets contrast guidelines.
    projects/packages/search/src/dashboard/components/pages/dashboard-page.scss:1
  • These are global CSS resets/selectors (*, body, #wpcontent) that will affect the entire wp-admin page whenever this stylesheet is loaded, making regressions hard to localize. Scope these rules under a page root class or body class specific to the Search dashboard (e.g., .jp-search-dashboard-page / .jetpack_page_...) to constrain side effects.
    projects/plugins/boost/app/modules/image-guide/class-image-guide.php:1
  • This string previously had an explicit “product name, do not translate” note; switching it to __() makes the product/brand name translatable. If the intent is to preserve brand naming, revert to the literal product name and keep the translator guidance; if translation is desired, please remove/adjust any conflicting “do not translate” guidance to avoid inconsistency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 26 to 31
test: new RegExp(
'\\.(?:' + exts.map( ext => ext.replace( /[.*+?^${}()|[\]\\]/g, '\\$&' ) ).join( '|' ) + ')$',
'i'
),
// CSS imports are always side effects (they inject styles into the DOM),
// so override any package.json "sideEffects: false" declarations.
sideEffects: true,
use: [
MiniCssExtractLoader( options.MiniCssExtractLoader ),

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

Removing the sideEffects: true override on the CSS rule can cause CSS imports to be tree-shaken when a package declares "sideEffects": false, resulting in missing styles in production builds. Re-introduce sideEffects: true on this rule (or otherwise ensure CSS imports are always treated as side effects) so CSS assets are reliably included.

Copilot uses AI. Check for mistakes.
*/
const JetpackFooter: FC< JetpackFooterProps > = ( {
moduleName = 'Jetpack' /** "Jetpack" is a product name, do not translate. */,
moduleName = __( 'Jetpack', 'jetpack-components' ),

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

This changes the default moduleName from an explicitly non-translatable product name (per the prior inline comment) to a translatable string. If “Jetpack” is intended to remain a brand/product name, keep it non-translated and rely on translator comments where needed; otherwise the UI may end up showing localized brand text inconsistently across products.

Suggested change
moduleName = __( 'Jetpack', 'jetpack-components' ),
moduleName = 'Jetpack',

Copilot uses AI. Check for mistakes.
@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 7 files. Only the first 5 are listed here.

File Coverage Δ% Δ Uncovered
projects/packages/search/src/dashboard/components/pages/dashboard-page.jsx 0/53 (0.00%) 0.00% 3 ❤️‍🩹
projects/packages/publicize/_inc/components/admin-page/index.tsx 17/17 (100.00%) 0.00% 0 💚
projects/plugins/jetpack/_inc/client/components/masthead/index.jsx 6/11 (54.55%) -5.45% -1 💚
projects/packages/search/src/dashboard/components/pages/upsell-page/index.jsx 0/45 (0.00%) 0.00% -3 💚
projects/js-packages/components/components/admin-page/index.tsx 1/11 (9.09%) 2.42% -4 💚

4 files are newly checked for coverage.

File Coverage
projects/packages/backup/src/js/components/Admin/header.js 0/22 (0.00%) 💔
projects/packages/search/src/dashboard/components/pages/upsell-page/header.jsx 0/5 (0.00%) 💔
projects/packages/publicize/_inc/components/admin-page/page-header/index.jsx 3/3 (100.00%) 💚
projects/packages/publicize/_inc/components/admin-page/page-header/logo.js 2/2 (100.00%) 💚

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

@CGastrell

Copy link
Copy Markdown
Contributor Author

No issues, closing

@CGastrell CGastrell closed this Mar 4, 2026
@github-actions github-actions Bot 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 Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Page React-powered dashboard under the Jetpack menu [Boost Feature] Image Guide Bug When a feature is broken and / or not performing as intended E2E Tests [Feature] Contact Form [Feature] Publicize Now Jetpack Social, auto-sharing [JS Package] Components [JS Package] Webpack Config [Package] Backup [Package] Forms [Package] My Jetpack [Package] Newsletter [Package] Publicize [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] VideoPress [Plugin] Automattic For Agencies Client [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Classic Theme Helper Plugin [Plugin] CRM Moved to https://github.com/Automattic/jetpack-crm [Plugin] Inspect [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Paypal Payment Buttons [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Plugin] Wpcloud Sso [Plugin] Wpcomsh RNA [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants