Skip to content

Hello Dolly: normalize centrally, drop per-page duplicates#48472

Merged
CGastrell merged 3 commits into
trunkfrom
update/normalize-hello-dolly-styling
Jun 2, 2026
Merged

Hello Dolly: normalize centrally, drop per-page duplicates#48472
CGastrell merged 3 commits into
trunkfrom
update/normalize-hello-dolly-styling

Conversation

@CGastrell
Copy link
Copy Markdown
Contributor

@CGastrell CGastrell commented May 2, 2026

Part of #49285.

Rebased on trunk. The two PRs this was stacked behind — #48410 (admin-ui 2.0.0) and companion #48471 (AI page mixin) — have both merged, so this is ready for review.

Proposed changes

The AdminPage mixin already shipped a partial Hello Dolly normalize rule (just background-color: #fff, anchored on the jetpack-admin-page body class added server-side by Jetpack's admin menu registration). This PR expands it to the full visual treatment so individual plugin dashboards no longer need per-page overrides.

  • js-packages/components/components/admin-page/style.module.scss: expand :global(.jetpack-admin-page #dolly) from one line (background-color: #fff) to the full normalize set:
    • float: none (break out of Hello Dolly's default float: right)
    • padding: 10px, background: #fff
    • italic, color: #87a6bc, text-align: right
    • border-bottom: none
    • hidden at <660px
  • plugins/boost/app/assets/src/css/main/wp-admin.scss: remove .jetpack_page_jetpack-boost #dolly { background: #fff } (covered by the central rule now).
  • packages/newsletter/src/settings/style.scss: remove .jetpack_page_jetpack-newsletter #dolly { width: 100%; text-align: right } (covered by the central rule now).

The broad rules in plugins/jetpack/_inc/client/scss/shared/_main.scss (.jetpack-pagestyles #dolly) and admin-static.scss (.wp-admin #dolly) are intentionally left in place — they cover pages that load Jetpack's main admin CSS bundle but not the AdminPage component CSS (e.g. the React Settings/Dashboard pages via wrap_ui).

Why no position / top / left / right in the central rule

Inert offsets like position: relative; left: 0; right: 0; top: 0; on a normal-flow <p> element do nothing visible. But they become active on any per-page rule that flips Dolly to position: absolute (e.g. My Jetpack's body.jetpack_page_my-jetpack p#dolly { position: absolute; inset-inline-end: 0; z-index: 2 }). Combined with the offsets, Dolly stretches to the full container width and pins to top, covering the page title. We tested this — see screenshots. The central rule deliberately omits those properties so My Jetpack's absolute-position rule composes cleanly.

Related product discussion/links

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

No

Testing instructions

Hard-refresh wp-admin and visit:

  1. My Jetpack (?page=my-jetpack): Dolly should appear at top-right corner via My Jetpack's position: absolute rule, not as a full-width strip covering the page title.
  2. Boost (?page=jetpack-boost): Dolly normalized — italic, gray, right-aligned, white bg.
  3. Newsletter (?page=jetpack-newsletter): same — italic, gray, right-aligned, white bg.
  4. AI (?page=ai): Dolly normalized.
  5. Mobile (<660px): Dolly hidden everywhere.

Screenshots

This branch
cg5 jurassic tube_wp-admin_admin php_page=jetpack-activity-log
cg5 jurassic tube_wp-admin_admin php_page=jetpack
cg5 jurassic tube_wp-admin_admin php_page=jetpack-search
cg5 jurassic tube_wp-admin_admin php_page=jetpack-ai
cg5 jurassic tube_wp-admin_admin php_page=jetpack-backup
cg5 jurassic tube_wp-admin_admin php_page=jetpack-protect
cg5 jurassic tube_wp-admin_admin php_page=jetpack-social
cg5 jurassic tube_wp-admin_admin php_page=jetpack-boost
cg5 jurassic tube_wp-admin_admin php_page=my-jetpack

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown
Contributor

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

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 May 2, 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!


Boost 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 May 2, 2026
@jp-launch-control
Copy link
Copy Markdown

jp-launch-control Bot commented May 2, 2026

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 self-assigned this May 4, 2026
@CGastrell CGastrell added [Status] Needs Review This PR is ready for review. and 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 May 4, 2026
@CGastrell CGastrell marked this pull request as ready for review May 4, 2026 03:56

// We deliberately do NOT set `position`/`top`/`left`/`right` here:
// those would become active on any per-page rule that flips Dolly to
// `position: absolute` (e.g. My Jetpack), causing it to stretch to its
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.

Do we necessarily need those My Jetpack custom styles for this or can it also share what we have here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's indended, My Jetpack page is gonna be either migrated to use AdminPage (and the mixin) or deleted, but it's a follow up I'll be dealing with next

float: none;
padding: 10px;
text-align: right;
background: #fff;
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.

Let's use the color variable of the header here?

Comment on lines +78 to +79
font-size: 12px;
font-style: italic;
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.

These seem reduntant as they're already in Hello Dolly.

background: #fff;
font-size: 12px;
font-style: italic;
color: #87a6bc;
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.

Good to use DS token here too

CGastrell added 3 commits May 29, 2026 16:32
The AdminPage mixin already shipped a partial Hello Dolly normalize rule
(`background-color: #fff` only, anchored on the `jetpack-admin-page` body
class). Expand it to the full visual treatment so individual plugin
dashboards don't need their own per-page overrides.

What's covered by the centralized rule now:

- float: none (break out of Hello Dolly's default float: right)
- padding 10px, white background
- italic, gray text (#87a6bc), right-aligned
- border-bottom: none
- hidden under 660px

We deliberately do NOT set position/top/left/right offsets in the central
rule — those would become active on any per-page rule that flips Dolly to
position: absolute (e.g. My Jetpack), causing it to stretch full-width and
pin to top, covering the page title.

Per-page rules removed (their content is a subset of the central rule):

- plugins/boost: `.jetpack_page_jetpack-boost #dolly { background: #fff }`
- packages/newsletter: `.jetpack_page_jetpack-newsletter #dolly { width: 100%; text-align: right }`

The broad rules in `plugins/jetpack/_inc/client/scss/shared/_main.scss`
(`.jetpack-pagestyles #dolly`) and `admin-static.scss`
(`.wp-admin #dolly`) are intentionally left in place — they cover pages
that load Jetpack's main admin CSS bundle but not the AdminPage component
CSS (e.g. the React Settings/Dashboard via wrap_ui).

My Jetpack's own `position: absolute` rule is unaffected; it composes
cleanly with the central rule now that no inert position offsets are set.
Address review feedback on the centralized normalize rule:

- Drop `font-size: 12px` and `padding: 10px` — Hello Dolly already sets
  `font-size: 12px` and `padding: 5px 10px` (close enough to ours).
  Letting Hello Dolly's defaults stand keeps our rule focused on the
  bits we actually need to differ.
- Switch hardcoded `#fff` and `#87a6bc` to WPDS design tokens
  (`--wpds-color-bg-surface-neutral-strong` and
  `--wpds-color-fg-content-neutral-weak`) with the original hex as
  `var()` fallback. Falls back to the previous look until the tokens
  resolve at body level (admin-ui's ThemeProvider scope), then auto-
  tracks the surrounding page chrome.

Italic stays — not in Hello Dolly defaults, but a Jetpack-side decoration
for the song-lyric vibe. Out-of-scope per the review.
@CGastrell CGastrell force-pushed the update/normalize-hello-dolly-styling branch from 982830a to b360c03 Compare May 29, 2026 20:17
@CGastrell CGastrell merged commit a9bae73 into trunk Jun 2, 2026
95 checks passed
@CGastrell CGastrell deleted the update/normalize-hello-dolly-styling branch June 2, 2026 12:42
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[JS Package] Components [Package] Newsletter [Plugin] Boost A feature to speed up the site and improve performance. RNA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants