Skip to content

Admin page layout: clip Boot's stage so it can't add a second scrollbar - #52507

Merged
dhasilva merged 2 commits into
trunkfrom
fix/admin-page-layout-stage-scrollbar
Sep 18, 2026
Merged

dhasilva merged 2 commits into
trunkfrom
fix/admin-page-layout-stage-scrollbar

Conversation

@dhasilva

Copy link
Copy Markdown
Contributor

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-build now 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__stage and the hashed __stage) the same way the existing flex guard does.
  • Search's route now imports its route.scss. wp-build only bundles styles that the entry imports, and Search's stage.tsx never imported route.scss. So the wp-build mixin was never applied to Search at all. It imported the legacy entry's admin-layout.scss instead, which only has the base mixin. route.scss is 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-content is "the ultimate overflow: hidden boundary". wp-build puts Boot's stage inside that boundary with overflow-y: auto. The middle has no position, so an absolutely positioned element in it anchors to .jp-admin-page__page and escapes the middle's clipping. With the old layout, #wpbody-content clipped 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> and RecordMeterBar's summary <table>. A <table> ignores height: 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: relative on 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.
  • hidden instead of clip: a hidden stage is still a scroll container, so focusing clipped content could scroll it and shift the whole page.
  • A Search-only rule would leave the same trap for the next dashboard with a hidden element below the fold.

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-build flag 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

Does 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, or add_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.

    • Before: two vertical scrollbars side by side at the right edge of the frame.
    • After: one. It scrolls the content between the header and the footer, and the last section ("Your search index") is reachable at the bottom.
  • In the console, this lists every scrolling element and should print only one:

    [ ...document.querySelectorAll( '*' ) ].filter( el => /auto|scroll/.test( getComputedStyle( el ).overflowY ) && el.scrollHeight > el.clientHeight + 1 )
  • 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

dhasilva and others added 2 commits September 18, 2026 17:35
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>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dhasilva dhasilva self-assigned this Sep 18, 2026
@github-actions github-actions Bot added [JS Package] Base Styles [Package] Search Contains core Search functionality for Jetpack and Search plugins RNA labels Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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!

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

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 fix/admin-page-layout-stage-scrollbar branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/admin-page-layout-stage-scrollbar
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/admin-page-layout-stage-scrollbar

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

@jp-launch-control

Copy link
Copy Markdown

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

@dhasilva
dhasilva merged commit 6539f9e into trunk Sep 18, 2026
121 checks passed
@dhasilva
dhasilva deleted the fix/admin-page-layout-stage-scrollbar branch September 18, 2026 21:04
dhasilva added a commit that referenced this pull request Sep 18, 2026
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>
dhasilva added a commit that referenced this pull request Sep 21, 2026
)

* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[JS Package] Base Styles [Package] Search Contains core Search functionality for Jetpack and Search plugins RNA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant