From 8c1b0256abdf2d504c374811bc378cc42cc32146 Mon Sep 17 00:00:00 2001 From: Christian Gastrell Date: Wed, 9 Sep 2026 14:37:41 -0300 Subject: [PATCH 1/3] Remove CSS dead code left by the SimpleNotice/@wordpress/ui migration PR #52015 rewrote SimpleNotice to render the @wordpress/ui Notice and dropped the dops-notice class family from every React notice. After that PR, the only remaining producer of dops-notice* markup is components/admin-notices/index.jsx, which rebuilds server-rendered VaultPress, WooCommerce and core notices with jQuery and prepends them into #jp-admin-notices. That container renders as a sibling of the page content (main.jsx renderMainContent), so any rule scoped under a page-content selector can never match it. Removed: - dash-item/style.scss: the .dops-notice margin rule under .jp-dash-item .dops-section-header__actions, and the &.is-working/&.is-premium-inactive block under .jp-dash-item .dops-section-header. DashItem never passes a className to SectionHeader, so that selector never matched. - at-a-glance/style.scss: a.dops-notice__action rule under .dops-card.is-compact. - traffic/style.scss: both a.dops-notice__action rules under .jp-stats-odyssey-disabled-notice. - settings/style.scss: the two &.dops-notice__action rules under .jp-settings-container. - components/notice/style.scss: .dops-notice__text-no-underline and .dops-notice__button. No producer nests either class under a .dops-notice__text ancestor, which both selectors require. Left untouched: the .dops-notice chassis in components/notice/style.scss, _main.scss's .dops-notice__text a rule, jetpack-notices/style.scss, and all of admin-notices/style.scss. The jQuery path still styles its rebuilt markup with these. Verified with stylelint on the changed files and pnpm run test-gui in projects/plugins/jetpack (56 suites / 498 tests passing). Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SWVs5oUDimen1FeGJhJAkx --- .../jetpack/_inc/client/at-a-glance/style.scss | 9 --------- .../_inc/client/components/dash-item/style.scss | 13 ------------- .../_inc/client/components/notice/style.scss | 9 --------- .../plugins/jetpack/_inc/client/settings/style.scss | 8 -------- .../plugins/jetpack/_inc/client/traffic/style.scss | 11 ----------- .../changelog/update-prune-dead-dops-notice-css | 5 +++++ 6 files changed, 5 insertions(+), 50 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/update-prune-dead-dops-notice-css diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/style.scss b/projects/plugins/jetpack/_inc/client/at-a-glance/style.scss index 409cef273ba5..9f6cc6911cb5 100644 --- a/projects/plugins/jetpack/_inc/client/at-a-glance/style.scss +++ b/projects/plugins/jetpack/_inc/client/at-a-glance/style.scss @@ -431,15 +431,6 @@ .dops-card.is-compact { flex-grow: 0; - - a.dops-notice__action { - margin-left: 0; - padding-left: 0; - - @include breakpoints.breakpoint( "<480px" ) { - text-transform: none; - } - } } } diff --git a/projects/plugins/jetpack/_inc/client/components/dash-item/style.scss b/projects/plugins/jetpack/_inc/client/components/dash-item/style.scss index 26db1a08b4c5..1d0bec23c7d5 100644 --- a/projects/plugins/jetpack/_inc/client/components/dash-item/style.scss +++ b/projects/plugins/jetpack/_inc/client/components/dash-item/style.scss @@ -24,11 +24,6 @@ a:hover { text-decoration: underline; } - - .dops-notice { - margin-top: rem.convert(-1px); - margin-bottom: rem.convert(-1px); - } } } @@ -125,14 +120,6 @@ .dops-button { font-style: normal; } - - &.is-working, - &.is-premium-inactive { - - .dops-section-header__actions { - color: colors.$gray-text-min; - } - } } // conditional styles for content when items are inactive diff --git a/projects/plugins/jetpack/_inc/client/components/notice/style.scss b/projects/plugins/jetpack/_inc/client/components/notice/style.scss index bbee6552a659..8cc698d7e881 100644 --- a/projects/plugins/jetpack/_inc/client/components/notice/style.scss +++ b/projects/plugins/jetpack/_inc/client/components/notice/style.scss @@ -113,10 +113,6 @@ .dops-notice__text { - a.dops-notice__text-no-underline { - text-decoration: none; - } - a, a:visited { text-decoration: underline; @@ -148,11 +144,6 @@ } } -.dops-notice__button { - cursor: pointer; - margin-left: 0.428em; -} - // "X" for dismissing a notice .dops-notice__dismiss { flex-shrink: 0; diff --git a/projects/plugins/jetpack/_inc/client/settings/style.scss b/projects/plugins/jetpack/_inc/client/settings/style.scss index 5aad1da719d6..d7b40d40e2e5 100644 --- a/projects/plugins/jetpack/_inc/client/settings/style.scss +++ b/projects/plugins/jetpack/_inc/client/settings/style.scss @@ -18,20 +18,12 @@ a:visited { color: var(--jp-black-80); text-decoration: underline; - - &.dops-notice__action { - color: var(--jp-gray-20); - } } a:hover, a:active { color: var(--jp-black); text-decoration-thickness: var(--jp-underline-thickness); - - &.dops-notice__action { - color: var(--jp-white); - } } a.dops-banner, diff --git a/projects/plugins/jetpack/_inc/client/traffic/style.scss b/projects/plugins/jetpack/_inc/client/traffic/style.scss index d5999adc3a24..cfaee0ef8c04 100644 --- a/projects/plugins/jetpack/_inc/client/traffic/style.scss +++ b/projects/plugins/jetpack/_inc/client/traffic/style.scss @@ -258,17 +258,6 @@ $twitter-pofile-image-padding: 17px; .jp-stats-odyssey-disabled-notice { - @include breakpoints.breakpoint("<480px") { - - a.dops-notice__action { - white-space: initial; - } - - a.dops-notice__action .gridicon { - display: none; - } - } - @include breakpoints.breakpoint(">480px") { width: calc(100% - 26px); } diff --git a/projects/plugins/jetpack/changelog/update-prune-dead-dops-notice-css b/projects/plugins/jetpack/changelog/update-prune-dead-dops-notice-css new file mode 100644 index 000000000000..439d8a3d702d --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-prune-dead-dops-notice-css @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Remove CSS rules left dead by the notice migration + + From 8c93190644742a52844cc38f09930e9e765c9658 Mon Sep 17 00:00:00 2001 From: Christian Gastrell Date: Wed, 9 Sep 2026 16:06:27 -0300 Subject: [PATCH 2/3] Jetpack notices: finish the two dead things review found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `.jp-stats-odyssey-disabled-notice` is emitted nowhere in the repo — the only hit is this stylesheet — so the container rule goes with the two action rules inside it. That block was dead because nothing renders it, not because the selector could not reach the jQuery notices. `pro-status` still set `dops-notice__text-no-underline` on its action link. Nothing styles that class now, and the rule it was named for required a `dops-notice__text` ancestor the component never had. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SWVs5oUDimen1FeGJhJAkx --- projects/plugins/jetpack/_inc/client/pro-status/index.jsx | 6 +----- projects/plugins/jetpack/_inc/client/traffic/style.scss | 7 ------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/pro-status/index.jsx b/projects/plugins/jetpack/_inc/client/pro-status/index.jsx index 3dba0f998eaa..b141868cc789 100644 --- a/projects/plugins/jetpack/_inc/client/pro-status/index.jsx +++ b/projects/plugins/jetpack/_inc/client/pro-status/index.jsx @@ -151,11 +151,7 @@ class ProStatus extends Component { <> { message } { action && ( - + { action } ) } diff --git a/projects/plugins/jetpack/_inc/client/traffic/style.scss b/projects/plugins/jetpack/_inc/client/traffic/style.scss index cfaee0ef8c04..d18f7482e916 100644 --- a/projects/plugins/jetpack/_inc/client/traffic/style.scss +++ b/projects/plugins/jetpack/_inc/client/traffic/style.scss @@ -256,13 +256,6 @@ $twitter-pofile-image-padding: 17px; top: 1em; } -.jp-stats-odyssey-disabled-notice { - - @include breakpoints.breakpoint(">480px") { - width: calc(100% - 26px); - } -} - .jp-stats-odyssey-toggle { margin-bottom: 20px; } From 5ecb49876f1f574df6c5b82e7dc40ff55a3c093c Mon Sep 17 00:00:00 2001 From: Christian Gastrell Date: Thu, 10 Sep 2026 12:38:46 -0300 Subject: [PATCH 3/3] Traffic stylesheet: drop three rules the Odyssey removal orphaned The "Drop Legacy Stats experience" change (#40384) removed the markup that carried `.jp-stats-odyssey-toggle`, its `.components-base-control` child and `.jp-stats-odyssey-badge`, the same removal that stranded the `.jp-stats-odyssey-disabled-notice` block this branch already deletes. No `jp-stats-odyssey` class is left anywhere under `projects/`. `.jp-stats-form-fieldset` sits between those rules and is still rendered by `_inc/client/traffic/site-stats.jsx`, so this removes three rules rather than a range. `.jp-stats-odyssey-badge` also carried a physical `margin-left`, so the deletion retires an RTL wart with it. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SWVs5oUDimen1FeGJhJAkx --- .../jetpack/_inc/client/traffic/style.scss | 20 ------------------- .../update-prune-dead-dops-notice-css | 4 +--- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/traffic/style.scss b/projects/plugins/jetpack/_inc/client/traffic/style.scss index d18f7482e916..e75d17eacb04 100644 --- a/projects/plugins/jetpack/_inc/client/traffic/style.scss +++ b/projects/plugins/jetpack/_inc/client/traffic/style.scss @@ -256,26 +256,6 @@ $twitter-pofile-image-padding: 17px; top: 1em; } -.jp-stats-odyssey-toggle { - margin-bottom: 20px; -} - -.jp-stats-odyssey-toggle > .components-base-control { - margin-bottom: 0; -} - .jp-stats-form-fieldset { margin-bottom: 20px; } - -.jp-stats-odyssey-badge { - color: #008710; - background-color: #d0e6b8; - border-radius: 3px; - font-size: 10px; - line-height: 18px; - margin-left: 8px; - padding: 0 6px; - text-transform: uppercase; - display: inline-block; -} diff --git a/projects/plugins/jetpack/changelog/update-prune-dead-dops-notice-css b/projects/plugins/jetpack/changelog/update-prune-dead-dops-notice-css index 439d8a3d702d..4dea94312b66 100644 --- a/projects/plugins/jetpack/changelog/update-prune-dead-dops-notice-css +++ b/projects/plugins/jetpack/changelog/update-prune-dead-dops-notice-css @@ -1,5 +1,3 @@ Significance: patch Type: other -Comment: Remove CSS rules left dead by the notice migration - - +Comment: Remove CSS rules left dead by the notice migration and the Legacy Stats removal