My Jetpack: Adopt jetpack-admin-page-layout mixin#48310
Conversation
Brings the My Jetpack admin page in line with the 8 other Jetpack admin pages migrated in the layout-unification series (Network admin, Boost, Search, Newsletter, Backup, VideoPress, Publicize, Protect). Scopes the shared `jetpack-admin-page-layout` mixin under `body.jetpack_page_my-jetpack` in the package's global stylesheet. No local layout compensation needed to remove — My Jetpack never carried the per-package height-calc / wp-admin reset hacks the other packages had. `ScrollToTop` (`_inc/admin.jsx`) and the delayed scroll in `use-connect-site` are left untouched to match the precedent commits; `window.scrollTo( 0, 0 )` becomes a no-op on this page once the inner `#wpbody-content` becomes the scroll container. If tall interstitial routes regress on hash change, both spots would switch to scrolling `#wpbody-content` directly.
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryThis 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. 🤷 |
The tab panel previously wrapped all content in a constrained inner container, then used `100vw` / `-50vw` math to break separators and footers out to full width. That math equates `100vw` with the container's content area, which only holds when no page scrollbar is present — when the parent admin layout introduces a vertical scrollbar, the breakout overshoots by the scrollbar's width and produces a horizontal scrollbar of its own. Restructure the panel so the inverse is true: each content component emits its full-width pieces (separator, footer) as direct siblings of the unconstrained tab-content area, and re-applies a constrain only to the inner blocks that need it. The separator collapses to a plain `width: 100%` border, and both Overview and Help footers drop their viewport-width math along with the 1288px hardcoded media-query fallback. Replaces the previously-flagged horizontal-scroll regression on this branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Close in favor of #48503 |
Proposed changes
Adopts the shared
jetpack-admin-page-layoutSCSS mixin (from@automattic/jetpack-base-styles) for the My Jetpack admin page, bringing it in line with the 8 other Jetpack admin pages migrated in the prior layout-unification series (Network admin, Boost, Search, Newsletter, Backup, VideoPress, Publicize, Protect).After this change the My Jetpack page has a fixed Jetpack header, an internally-scrolling middle section, and a
JetpackFooterpinned to the bottom of the viewport — no window-level scroll, consistent with the other migrated pages.Removes the per-package layout compensation that the mixin now handles (wp-admin padding/margin counters, any local
#wpfooteroverrides or height-calc workarounds — see the diff for specifics).ScrollToTopupdated to scroll the internal#wpbody-contentcontainer rather thanwindow, since the window no longer scrolls on this page.Tab panel restructure (second commit). Reworks
MyJetpackTabPanelso its full-width children — the under-tabs separator, the in-tab separators in Overview/Help, and the Overview/Help white footers — are rendered as direct, naturally-full-width siblings of the tab-content area instead of being broken out of a constrained inner with100vw/-50vwmath. The viewport-width math equates100vwwith the container's content area, which only holds when the page itself has no scrollbar; under the new admin-page-layout (which introduces an internal scroll container) the breakout overshot by the scrollbar's width and produced a horizontal scrollbar of its own. The new structure exposes two composable utilities (.constrained-sectionand.tab-content-wrapper) that each content component applies to its own constrained blocks, while full-width pieces sit outside them. Both Overview and Help footers also drop the 1288px hardcoded media-query fallback that was tied to the old breakout.Before / After
Desktop (1440×900)
Mobile (390×844)
Does this pull request change what data or activity we track or use?
No. This is layout/CSS only. No data collection, no new tracks events, no permission changes.
Testing instructions
admin.php?page=my-jetpack).JetpackFooteris pinned to the bottom of the viewport (not floating mid-page on tall content, not missing on short content).document.documentElement.scrollWidthshould equalclientWidth..folded) — confirm layout adjusts.--max-container-widthconstraint.ScrollToTopstill works when navigating between internal routes — the content area should scroll to the top, not stay where the previous route left it.