Skip to content

My Jetpack: fix Overview tab scrolling under fixed wpbody-content#48578

Merged
CGastrell merged 1 commit into
trunkfrom
fix/my-jetpack-admin-page-overflow-scroll
May 6, 2026
Merged

My Jetpack: fix Overview tab scrolling under fixed wpbody-content#48578
CGastrell merged 1 commit into
trunkfrom
fix/my-jetpack-admin-page-overflow-scroll

Conversation

@CGastrell
Copy link
Copy Markdown
Contributor

Fixes the scroll-past-the-end regression on the My Jetpack Overview tab introduced (visibly) by the recent layout-mixin adoption (#48503), and adds a defensive guard in the layout mixin so the same trap can't bite future consumers.

Proposed changes

  • My Jetpack: drop overflow-x: hidden on the <AdminPage> root. .my-jetpack-screen { overflow-x: hidden } was applied to the same div as .jp-admin-page (via <AdminPage className={ … }>). Browsers promote the unset overflow-y: visible to auto when the other axis is hidden/scroll/clip, so .jp-admin-page was silently turning into a scroll container. Once the inner middle reached its scroll end, wheel events propagated to .jp-admin-page and shifted the whole page (header + middle + footer) up under the fixed #wpbody-content, exposing blank space below the footer. The rule pre-dated the recent 100vw breakout cleanup and was no longer load-bearing — the mixin's inner middle already handles horizontal overflow with overflow: auto, and #wpbody-content is the ultimate clip boundary.
  • @automattic/jetpack-base-styles/admin-page-layout mixin: add overflow: visible on .jp-admin-page. Defensive, so any future consumer that drops a className with overflow-x: hidden on the AdminPage root won't reintroduce the same bug. Mixin specificity (body.jetpack_page_<slug> .jp-admin-page) beats consumer single-class selectors, so the override wins.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No. CSS/layout-only change.

Testing instructions

Repro the bug on trunk:

  1. Visit admin.php?page=my-jetpack#/overview.
  2. Scroll the inner middle (mouse wheel inside the page content) until it reaches its end (past the stat cards / product grid).
  3. Continue scrolling down.
  4. Bug: the entire page (Jetpack header + content + JetpackFooter) shifts up together, revealing a blank white area below the footer.

With this PR applied:

  1. Same steps. Scroll past the inner middle's end.
  2. Expected: scroll just stops. The Jetpack header stays pinned at the top, the JetpackFooter stays pinned at the viewport bottom. No blank space.

Smoke-test on the other migrated mixin pages — the layout should be unchanged. .jp-admin-page should be overflow: visible (not a scroll container) on each:

  • My Jetpack (?page=my-jetpack) — Overview, Products, Help tabs
  • Protect (?page=jetpack-protect)
  • Social (?page=jetpack-social)
  • VideoPress (?page=jetpack-videopress)
  • Backup (?page=jetpack-backup)
  • Newsletter (?page=jetpack-newsletter)
  • Search (?page=jetpack-search)
  • Boost (?page=jetpack-boost)
  • Activity Log (?page=jetpack-activity-log)

A quick console probe at each: getComputedStyle(document.querySelector('.jp-admin-page')).overflow should report visible, and only the inner .container--SqdhU.fluid--OZC_9 (or in PR #48410's structure, the .jp-admin-page__page > :not(header):not(.jetpack-footer) middle) should report auto.

`.my-jetpack-screen { overflow-x: hidden }` was applied to the same div as
`.jp-admin-page` (via `<AdminPage className={ ... } />`). Browsers promote
the unset `overflow-y: visible` to `auto` when the other axis is
`hidden`/`scroll`/`clip`, which silently turned `.jp-admin-page` into a
scroll container. Once the inner middle reached its scroll end, wheel
events propagated to `.jp-admin-page` and shifted the entire page (header
+ middle + footer) up under the fixed `#wpbody-content`, exposing blank
space below the footer.

Drop the rule (it pre-dated the recent 100vw breakout cleanup and is
no longer needed — the mixin's inner middle already handles horizontal
overflow with `overflow: auto`, and `#wpbody-content` is the ultimate
clip boundary).

Defensively, add `overflow: visible` to `.jp-admin-page` in the layout
mixin so any future consumer that drops a className with
`overflow-x: hidden` on the AdminPage root won't reintroduce the bug
(mixin specificity beats consumer single-class selectors).
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

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 added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label May 6, 2026
@CGastrell CGastrell self-assigned this May 6, 2026
@CGastrell CGastrell added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels May 6, 2026
@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

@CGastrell CGastrell merged commit e519725 into trunk May 6, 2026
123 of 124 checks passed
@CGastrell CGastrell deleted the fix/my-jetpack-admin-page-overflow-scroll branch May 6, 2026 17:09
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label May 6, 2026
LiamSarsfield pushed a commit that referenced this pull request May 6, 2026
…8578)

`.my-jetpack-screen { overflow-x: hidden }` was applied to the same div as
`.jp-admin-page` (via `<AdminPage className={ ... } />`). Browsers promote
the unset `overflow-y: visible` to `auto` when the other axis is
`hidden`/`scroll`/`clip`, which silently turned `.jp-admin-page` into a
scroll container. Once the inner middle reached its scroll end, wheel
events propagated to `.jp-admin-page` and shifted the entire page (header
+ middle + footer) up under the fixed `#wpbody-content`, exposing blank
space below the footer.

Drop the rule (it pre-dated the recent 100vw breakout cleanup and is
no longer needed — the mixin's inner middle already handles horizontal
overflow with `overflow: auto`, and `#wpbody-content` is the ultimate
clip boundary).

Defensively, add `overflow: visible` to `.jp-admin-page` in the layout
mixin so any future consumer that drops a className with
`overflow-x: hidden` on the AdminPage root won't reintroduce the bug
(mixin specificity beats consumer single-class selectors).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant