Commit 2ddb7d5
Admin pages: unify layout under jetpack-admin-page-layout mixin (#48109)
* base-styles: Add jetpack-admin-page-layout mixin
Introduces @automattic/jetpack-base-styles/admin-page-layout, a SCSS mixin
that standardizes Jetpack wp-admin pages: a viewport-pinned content column
with the Jetpack header pinned at the top, a middle that scrolls internally,
and JetpackFooter pinned at the bottom. No window-level scroll.
Key mechanics:
- Override WP core's "#wpbody-content { width: 100% }" (common.css) with
"width: auto" so position: fixed + left + right: 0 can size the column
correctly. Without this, width: 100% resolves to 100vw under fixed
positioning and pushes the column past the viewport.
- Honor the .folded body class unconditionally (user's persistent
"Collapse menu" preference) and gate .auto-fold to (max-width: 960px),
mirroring WP's own wp-admin.css scoping. This keeps a stale auto-fold
class from mis-offsetting the column after a narrow to wide viewport
resize.
- The mobile media query matches #wpbody-content, .folded #wpbody-content,
and .auto-fold #wpbody-content explicitly so "left: 0" wins via
equal-specificity source order over the desktop fold rules.
- Sidebar widths and viewport breakpoints live in SCSS variables; the
admin-bar height stays as var(--wp-admin-bar-height, default) to keep
the documented runtime-override path open.
Exports the mixin via package.json so consumers can
@use "@automattic/jetpack-base-styles/admin-page-layout" as *;
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* jetpack-components: Add stable jp-admin-page class to AdminPage
Adds "jp-admin-page" as a second, non-CSS-Modules-hashed className on
the AdminPage root in addition to the existing hashed styles["admin-page"]
token. This gives global stylesheets and shared mixins (notably
jetpack-admin-page-layout from @automattic/jetpack-base-styles) a stable
selector to target without coupling to the hashed module name.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Protect: Adopt jetpack-admin-page-layout mixin
Scopes the shared admin-page layout to body.jetpack_page_jetpack-protect
so Protect uses the standard header-pinned / middle-scrolling /
footer-pinned layout. No other visual changes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Publicize: Adopt jetpack-admin-page-layout mixin
Scopes the shared admin-page layout to body.jetpack_page_jetpack-social
(the Social menu page is served by the Publicize package) so Social uses
the standard header-pinned / middle-scrolling / footer-pinned layout.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* VideoPress: Adopt jetpack-admin-page-layout mixin
Scopes the shared admin-page layout to body.jetpack_page_jetpack-videopress.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Backup: Adopt jetpack-admin-page-layout mixin
Scopes the shared admin-page layout to body.jetpack_page_jetpack-backup.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Newsletter: Adopt jetpack-admin-page-layout mixin
Adds @automattic/jetpack-base-styles as a workspace dep and scopes the
shared admin-page layout to body.jetpack_page_jetpack-newsletter. Keeps
the existing dataviews imports in place.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Search: Drop inline JetpackFooter, adopt jetpack-admin-page-layout mixin
Search rendered JetpackFooter twice: once via AdminPage's built-in slot,
once as a sibling inside the dashboard. It suppressed the built-in slot
with showFooter={false}, which conflicted with the shared mixin's
footer-pinning rules.
Drops the showFooter={false} flag and the inline <JetpackFooter /> so
the footer lives inside AdminPage's flex column where the mixin can pin
it. Adds dashboard/scss/admin-layout.scss to scope the mixin to
body.jetpack_page_jetpack-search and imports it from dashboard/index.jsx.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Boost: Drop inline JetpackFooters, adopt jetpack-admin-page-layout mixin
Boost rendered JetpackFooter directly inside each page (BoostAdminPage,
card-page, settings-page, cache-debug-log, getting-started) and
suppressed AdminPage's built-in footer with showFooter={false}. That
left the footer outside AdminPage's flex column, so the shared mixin
could not pin it.
Drops the inline <JetpackFooter /> imports/renders and removes
showFooter={false} so the footer lives inside AdminPage where the mixin
pins it. Adds the body.jetpack_page_jetpack-boost scope in
admin-style.scss.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Jetpack: Adopt jetpack-admin-page-layout mixin for network admin
Scopes the shared admin-page layout to both network-admin body classes:
toplevel_page_jetpack-network-sites (Sites, the default view)
jp-network_page_jetpack-network-settings (Settings submenu)
Both share #jp-network-admin-root and branch on data-page.
The Settings class prefix is derived from the menu *title* ("JP Network")
sanitized to "jp-network", so it does NOT follow the usual
"toplevel_page_*" convention — see the
admin_print_scripts-jp-network_page_jetpack-network-settings hook in
tools/docker/mu-plugins/0-sandbox.php for the canonical reference.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* changelog: Add entries for admin-page-layout work
Covers all ten projects touched by the admin-page-layout mixin
introduction and per-page adoption:
- base-styles (new public mixin + export — minor, added)
- components (AdminPage stable class — patch, changed)
- protect (patch, changed)
- publicize (patch, changed)
- videopress (patch, changed)
- backup (patch, changed)
- newsletter (patch, changed; also adds workspace dep)
- search (patch, changed; drops inline footer)
- boost (patch, changed; drops inline footers)
- jetpack (patch, enhancement — network admin)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 6821c60 commit 2ddb7d5
31 files changed
Lines changed: 310 additions & 16 deletions
File tree
- projects
- js-packages
- base-styles
- changelog
- components
- changelog
- components/admin-page
- packages
- backup
- changelog
- src/js/components/Admin
- newsletter
- changelog
- src/settings
- publicize
- _inc/components/admin-page
- changelog
- search
- changelog
- src/dashboard
- components/pages
- scss
- videopress
- changelog
- src/client/admin
- plugins
- boost
- app/assets/src
- css
- js
- layout
- boost-admin-page
- card-page
- settings-page
- pages
- cache-debug-log
- getting-started
- changelog
- jetpack
- _inc/client
- changelog
- protect
- changelog
- src/js
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
0 commit comments