Repository navigation
Admin page layout: clip Boot's stage so it can't add a second scrollbar - #52507
Conversation
The layout scrolls the page's middle, and `#wpbody-content` used to clip anything outside it. wp-build puts Boot's stage inside that boundary with `overflow-y: auto`, so absolutely positioned content anchored above the middle overflows the stage instead of being clipped. On the Search dashboard, two screen-reader elements in the record meter did that and gave the Overview tab a second scrollbar. The wp-build mixin now clips the stage, restoring the old boundary. No other wp-build dashboard overflows its stage today, so none of them changes. Search's route never imported its `route.scss`, which is the file that includes the wp-build mixin: wp-build only bundles styles the entry imports. It imported the legacy entry's base-mixin stylesheet instead, so the stage now imports `route.scss`, a superset of it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
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! |
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
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 dashboard now always renders through wp-build. The `search-wp-build` flag, its registration in Initializer::init(), and every branch on it are removed, along with the legacy webpack entry (`src/dashboard/index.jsx`) and its config, so the dashboard no longer ships twice. `src/dashboard/scss/admin-layout.scss` goes too: since #52507 the route imports `route.scss`, so only the legacy entry used it. The initial state keeps riding the script-less data handle the wp-build path already used. No other plugin depends on the retired `jp-search-dashboard` handle. Where the package was never built, the page now renders nothing, as My Jetpack's does since #52446. Nothing else in the package uses automattic/jetpack-feature-flags, so the requirement is dropped; the Jetpack and Search plugin locks lose only that edge, since My Jetpack still requires the package. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
) * Search: retire the wp-build flag and the legacy dashboard bundle The dashboard now always renders through wp-build. The `search-wp-build` flag, its registration in Initializer::init(), and every branch on it are removed, along with the legacy webpack entry (`src/dashboard/index.jsx`) and its config, so the dashboard no longer ships twice. `src/dashboard/scss/admin-layout.scss` goes too: since #52507 the route imports `route.scss`, so only the legacy entry used it. The initial state keeps riding the script-less data handle the wp-build path already used. No other plugin depends on the retired `jp-search-dashboard` handle. Where the package was never built, the page now renders nothing, as My Jetpack's does since #52446. Nothing else in the package uses automattic/jetpack-feature-flags, so the requirement is dropped; the Jetpack and Search plugin locks lose only that edge, since My Jetpack still requires the package. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Changelog Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Changelog: drop the flag-era tail from the package entry Nothing released described the dashboard without the frame, so "on every site" pointed at a state no reader saw. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Fixes #
Proposed changes
Fixes a second scrollbar inside the frame on the Search dashboard's Overview tab when it's served through wp-build. Needed before the flag is retired in #52506.
jetpack-admin-page-layout-wp-buildnow clips Boot's stage (overflow: clip). It only applies to stages that contain.jp-admin-page, and it matches both stage class shapes (boot-layout__stageand the hashed__stage) the same way the existing flex guard does.route.scss. wp-build only bundles styles that the entry imports, and Search'sstage.tsxnever importedroute.scss. So the wp-build mixin was never applied to Search at all. It imported the legacy entry'sadmin-layout.scssinstead, which only has the base mixin.route.scssis a superset of it. Search renders no Breadcrumbs nav, so the clip is the only rule that changes anything.Why the stage scrolled
The layout mixin scrolls the page's middle, and says
#wpbody-contentis "the ultimateoverflow: hiddenboundary". wp-build puts Boot's stage inside that boundary withoverflow-y: auto. The middle has noposition, so an absolutely positioned element in it anchors to.jp-admin-page__pageand escapes the middle's clipping. With the old layout,#wpbody-contentclipped these elements. Under wp-build, they overflow the stage instead.On Search, two screen-reader elements at the bottom of the Overview tab do this: the record meter's "More info"
<span>andRecordMeterBar's summary<table>. A<table>ignoresheight: 1px, so the "hidden" table is still 123px tall. The stage overflowed by exactly its bottom edge: 299px on a 988px-tall viewport.Why not the other fixes
position: relativeon the middle also removes the stage scrollbar. But it moves Boost's absolutely positioned "Your site got faster" card 80px down, since the card is anchored to.jp-admin-page__page. It also gives Search 42px of blank scroll from the table.hiddeninstead ofclip: ahiddenstage is still a scroll container, so focusing clipped content could scroll it and shift the whole page.Effect on other dashboards
None. Measured live: My Jetpack, Social, Backup, VideoPress, Newsletter, SEO, Forms and Boost all overflow their stage by 0px, so clipping it changes nothing on them. Search's wp-build dashboard is still behind the default-off
search-wp-buildflag on trunk, which is why neither changelog entry is user-facing.The window scrollbar that can appear beside the frame is unrelated. It shows when the admin menu is taller than the viewport, which the mixin accepts deliberately.
Related product discussion/links
admin-layout.scssDoes this pull request change what data or activity we track or use?
No.
Testing instructions
Build:
jp build packages/search.Enable the flag:
wp companion feature-flag enable search-wp-build, oradd_filter( 'jetpack_feature_flag_enabled_search-wp-build', '__return_true' );.Size the browser window so the Overview tab's content is taller than the frame, then go to Jetpack → Search.
In the console, this lists every scrolling element and should print only one:
Repeat on the Settings and AI Answers tabs.
Optional smoke test: My Jetpack, Social and Backup render and scroll as before.
🤖 Generated with Claude Code