Skip to content

AdminPage: Give pages without a title or breadcrumbs a scroll surface under the admin page layout - #51872

Open
t-wright wants to merge 5 commits into
trunkfrom
fix/my-jetpack-connection-screen-scroll
Open

AdminPage: Give pages without a title or breadcrumbs a scroll surface under the admin page layout#51872
t-wright wants to merge 5 commits into
trunkfrom
fix/my-jetpack-connection-screen-scroll

Conversation

@t-wright

@t-wright t-wright commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes MYJP-335

Proposed changes

My Jetpack's #/connection screen doesn't scroll, so the "Connect your user account" button is unreachable on short viewports. The jetpack-admin-page-layout mixin pins the content column and only makes admin-ui's Page middle scrollable. An AdminPage with no title or breadcrumbs skips that Page, so its content had no scroll surface.

  • AdminPage: add a stable jp-admin-page__content class to the content wrapper on that path
  • jetpack-admin-page-layout: treat that wrapper as the scrollable middle, grouped with the existing rule
  • base-styles: expose the scrollable middle as a jetpack-admin-page-scrollable-middle mixin so consumers don't copy its selectors
  • My Jetpack: give the new scroll surface the same scrollbar-gutter as the title path, through that mixin
  • add tests that lock the class hook in place

Two pages take this path under the mixin: My Jetpack's connection screen and Backup's secondary-admin connection screen. Both now scroll, and their footer pins to the viewport bottom like every other page under the mixin.

Related product discussion/links

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

No.

Testing instructions

You need a site connected to Jetpack and an admin whose own WordPress.com account is not connected.

  1. Log in as that admin.
  2. Make the browser window about 720px tall.
  3. Open admin.php?page=my-jetpack#/connection.
  4. Scroll the card. You reach the "Connect your user account" button and the footer stays pinned. The close X scrolls with the card.
  5. On a site with a Backup plan and the Backup plugin active, open admin.php?page=jetpack-backup. The "Log in to continue" screen scrolls the same way.
  6. Open My Jetpack's home and the Jetpack AI page. They scroll as before.

…ge layout

The jetpack-admin-page-layout mixin pins the content column to the viewport and expects a scrollable middle inside admin-ui's Page. An AdminPage with no title or breadcrumbs skips that Page, so its content had no scroll surface and the fixed column clipped everything below the fold. My Jetpack's #/connection screen hit this: the "Connect your user account" button sat out of reach on short viewports.

Add a stable jp-admin-page__content class to the header-less content wrapper and have the mixin treat it as the scrollable middle. Tests lock both class hooks in place.
@github-actions

github-actions Bot commented Sep 2, 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/my-jetpack-connection-screen-scroll branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/my-jetpack-connection-screen-scroll
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/my-jetpack-connection-screen-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

github-actions Bot commented Sep 2, 2026

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!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: October 6, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Backup plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Boost plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Search plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Social plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Protect plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Videopress plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Stats Data plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@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 Sep 2, 2026
@t-wright t-wright changed the title AdminPage: Give header-less pages a scroll surface under the admin page layout AdminPage: Give pages without a title or breadcrumbs a scroll surface under the admin page layout Sep 2, 2026
@jp-launch-control

jp-launch-control Bot commented Sep 2, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 4 files.

File Coverage Δ% Δ Uncovered
projects/packages/my-jetpack/src/class-wpcom-products.php 138/161 (85.71%) -1.24% 2 ❤️‍🩹
projects/js-packages/components/components/layout/container/index.tsx 7/7 (100.00%) 85.71% -6 💚
projects/js-packages/components/components/admin-page/index.tsx 9/13 (69.23%) 61.54% -8 💚
projects/js-packages/components/components/layout/col/index.tsx 16/16 (100.00%) 75.00% -12 💚

Full summary · PHP report · JS report

…itle

Group the new content-hook selector with the existing scrollable-middle rule so the two cannot drift, and give the hook the same scrollbar-gutter as the title path in My Jetpack. Add a test that fails if the mixin stops selecting the hook, since jsdom cannot check layout. Backup's secondary-admin connection screen takes the same path and gets the same fix, so add its changelog entry. Rename "header-less" to "without a title or breadcrumbs", which is the real condition.
The fix reaches Backup through its jetpack-components and jetpack-base-styles dependencies. Consumers pick that up as a dependency update at release time, so a Backup entry breaks the convention.
@t-wright
t-wright requested a review from CGastrell September 2, 2026 05:15
@t-wright
t-wright marked this pull request as ready for review September 2, 2026 05:15
The AdminPage test reads the layout mixin from disk, and the package type-checks its tests. Declare @types/node as a dev dependency and reference it from the test, as the charts package does.
@t-wright
t-wright requested a review from coder-karen September 2, 2026 05:31

@coder-karen coder-karen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with these admin page components or styles nor the recent admin page changes, but can see this is a definite regression on the two mentioned connection screens. Thanks for catching it and for the fix! It tests well for me.

I do think there should be a changelog entry for every plugin that consumes My Jetpack, and separately Backup, since the changelog entry shoudn't just be for immediate packages touched but for the consumers who will be impacted.

I'm also wary of approving without the admin page context but also think this should be merged as soon as possible so ran an AI review to see if there's anything to flag. Here's what was flagged:

  • The mixin doc block in admin-page-layout.scss doesn't yet mention the new .jp-admin-page__content
  • test/component.tsx (first test): this reads base-styles' SCSS from node_modules and substring-matches the selector. Three problems: it passes on a match inside a comment, it drags @types/node + /// into a browser package for one assertion, and it guards only the base-styles copy — the duplicate in my-jetpack/_inc/style.module.scss can still drift. The three DOM tests carry the real value. Drop the file-read test, or move it to base-styles' own suite.

Drop the stylesheet guard test: it read base-styles' SCSS from node_modules, matched inside comments, and pulled Node types into a browser package for one assertion. The DOM tests carry the real value. The drift it guarded against is now structural: base-styles exposes the scrollable middle as a mixin, and both the layout and My Jetpack include it instead of copying the selector list. Compiled CSS is unchanged.

Add changelog entries for the backup package and every plugin that surfaces the fixed screens, since users read plugin changelogs, not package ones. Document the content hook in the mixin's selector list.
@t-wright
t-wright requested a review from a team as a code owner September 9, 2026 04:12
@t-wright
t-wright requested a lite review from Copilot September 9, 2026 04:13
@github-actions github-actions Bot added [Package] Backup [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. labels Sep 9, 2026
@github-actions github-actions Bot added the [Plugin] Social Issues about the Jetpack Social plugin label Sep 9, 2026
@github-actions github-actions Bot added [Plugin] Stats Data [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. labels Sep 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is narrowly scoped, adds stable hooks plus targeted tests, and aligns consumers to a shared selector mixin without introducing risky behavioral changes elsewhere.

Pull request overview

This PR fixes a layout gap in the shared jetpack-admin-page-layout admin layout mixin where <AdminPage> screens rendered without a title/breadcrumbs had no internal scroll surface, making content (including the “Connect your user account” button) unreachable on short viewports.

Changes:

  • Add a stable .jp-admin-page__content hook for <AdminPage>’s header-less (legacy) render path and extend jetpack-admin-page-layout to treat it as the “scrollable middle”.
  • Introduce a reusable jetpack-admin-page-scrollable-middle SCSS mixin so consumers can style the scroll surface without duplicating selectors (used by My Jetpack to apply scrollbar-gutter: stable).
  • Add unit tests to lock in the new class hook and selector expectations, plus changelog entries across affected projects/plugins.
File summaries
File Description
projects/js-packages/components/components/admin-page/index.tsx Adds stable .jp-admin-page__content class to the legacy/header-less content wrapper.
projects/js-packages/components/components/admin-page/test/component.tsx Adds tests asserting the .jp-admin-page__content hook behavior across header/title branches.
projects/js-packages/base-styles/admin-page-layout.scss Adds jetpack-admin-page-scrollable-middle mixin and expands scrollable-middle targeting to include .jp-admin-page__content.
projects/packages/my-jetpack/_inc/style.module.scss Switches to the new scrollable-middle mixin to apply scrollbar-gutter: stable consistently.
projects/js-packages/base-styles/changelog/fix-admin-page-header-less-scroll-surface Changelog entry for the header-less scroll-surface fix in the layout mixin.
projects/js-packages/base-styles/changelog/add-admin-page-scrollable-middle-mixin Changelog entry for the new consumer-facing scrollable-middle mixin.
projects/js-packages/components/changelog/fix-admin-page-header-less-scroll-surface Changelog entry for the new stable AdminPage content hook.
projects/packages/my-jetpack/changelog/fix-admin-page-header-less-scroll-surface Changelog entry for the My Jetpack connection screen scrolling fix.
projects/packages/backup/changelog/fix-admin-page-header-less-scroll-surface Changelog entry for the secondary-admin connection screen scrolling fix.
projects/plugins/backup/changelog/fix-admin-page-header-less-scroll-surface Plugin-level changelog entry for the Backup secondary-admin connection screen scrolling fix.
projects/plugins/jetpack/changelog/fix-admin-page-header-less-scroll-surface Plugin-level changelog entry for My Jetpack connection screen scrolling fix (Jetpack type: bugfix).
projects/plugins/boost/changelog/fix-admin-page-header-less-scroll-surface Plugin-level changelog entry for My Jetpack connection screen scrolling fix.
projects/plugins/protect/changelog/fix-admin-page-header-less-scroll-surface Plugin-level changelog entry for My Jetpack connection screen scrolling fix.
projects/plugins/search/changelog/fix-admin-page-header-less-scroll-surface Plugin-level changelog entry for My Jetpack connection screen scrolling fix.
projects/plugins/social/changelog/fix-admin-page-header-less-scroll-surface Plugin-level changelog entry for My Jetpack connection screen scrolling fix.
projects/plugins/stats/changelog/fix-admin-page-header-less-scroll-surface Plugin-level changelog entry for My Jetpack connection screen scrolling fix.
projects/plugins/videopress/changelog/fix-admin-page-header-less-scroll-surface Plugin-level changelog entry for My Jetpack connection screen scrolling fix.
Review details
  • Files reviewed: 17/17 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[JS Package] Base Styles [JS Package] Components [Package] Backup [Package] My Jetpack [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Stats Data [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. RNA [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants