Skip to content

Admin pages: hide #screen-meta-links in shared layout mixin - #48195

Merged
CGastrell merged 1 commit into
trunkfrom
fix/admin-page-layout-hide-screen-meta-links
Apr 20, 2026
Merged

CGastrell merged 1 commit into
trunkfrom
fix/admin-page-layout-hide-screen-meta-links

Conversation

@CGastrell

Copy link
Copy Markdown
Contributor

Fixes #

Proposed changes

  • Hide #screen-meta-links inside the shared jetpack-admin-page-layout mixin so it stops reserving a 20px slot at the top of the content column on every Jetpack admin page.
  • Drop the now-redundant local hide rule from the Search dashboard SCSS (was the only consumer carrying its own copy).

Context

Core wp-admin always emits #screen-meta-links (the "Screen Options" / "Help" tabs container) in wp-admin/admin-header.php, even when empty, and core CSS gives it margin: 0 10px 20px 0. On WP.com hosted sites (is-nav-unification) the wpcom toolbar adds extra buttons too.

With #wpbody-content flipped to position: fixed flex by jetpack-admin-page-layout (introduced in #48109), that bottom margin reserves a ~20px slot at the top of the content column and pushes .jp-admin-page down by exactly 20px on every Jetpack admin page rendered through the WP.com shell. Self-hosted Jetpack sites don't render the wrapper at all (something in the local stack suppresses it), which is why this regression only shows up on the Calypso side and was missed in local testing.

#screen-meta itself is not hidden by this PR — core defaults it to display: none and only toggles it on click via the screen-meta-links buttons, which we've now hidden, so it never opens. Adding a redundant rule for it would be noise.

Related product discussion/links

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

No.

Testing instructions

This regression is only visible on WP.com hosted sites (or any environment where the WP shell still emits #screen-meta-links). Self-hosted local Jetpack sites won't render the element at all — testing locally will show no visual change.

To verify on WP.com:

  1. Open any Jetpack admin page on a hosted site, e.g. https://<your-site>/wp-admin/admin.php?page=jetpack-social, in a mobile viewport (~390×844).
  2. Before: there's a noticeable ~20px empty band between the WP admin bar and the .jp-admin-page content. In DevTools you'll find #screen-meta-links with display: block, height: 0, margin-bottom: 20px.
  3. After this PR ships and is deployed: the gap is gone, .jp-admin-page sits flush against the admin bar. #screen-meta-links is display: none via the mixin.
  4. To preview the after-state without deploying, open DevTools and run document.getElementById('screen-meta-links').style.display = 'none' — content should jump up by 20px.

Pages to spot-check (all use the mixin): My Jetpack, Backup, Boost, Newsletter, Protect, Search, Social, VideoPress, plus the Jetpack network admin page.

Core wp-admin always emits the `#screen-meta-links` wrapper (the "Screen
Options" / "Help" tabs container) and gives it `margin: 0 10px 20px 0`. On
WP.com (`is-nav-unification`) the wpcom toolbar adds extra buttons too.

With `#wpbody-content` flipped to `position: fixed` flex by the
`jetpack-admin-page-layout` mixin, that bottom margin reserves a 20px slot
at the top of the content column, pushing `.jp-admin-page` down by 20px on
every Jetpack admin page rendered through the WP.com shell. Self-hosted
Jetpack sites don't render the wrapper at all, so the gap is invisible
there — which is why this only shows up on the calypso side.

Hide it in the mixin so every consumer gets the fix in one place. None of
our React admin pages register screen-options or help tabs, so the buttons
have no purpose. `#screen-meta` itself is left alone — core defaults it to
`display:none` and only toggles it on click, which never happens here.

Also drop the now-redundant local hide rule from the Search dashboard.
@github-actions

github-actions Bot commented Apr 19, 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-hide-screen-meta-links branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/admin-page-layout-hide-screen-meta-links
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/admin-page-layout-hide-screen-meta-links

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 added [JS Package] Base Styles [Package] Search Contains core Search functionality for Jetpack and Search plugins RNA labels Apr 19, 2026
@github-actions

github-actions Bot commented Apr 19, 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!

@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 Apr 19, 2026
@CGastrell CGastrell self-assigned this Apr 19, 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 Apr 19, 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 64e981b into trunk Apr 20, 2026
95 checks passed
@CGastrell
CGastrell deleted the fix/admin-page-layout-hide-screen-meta-links branch April 20, 2026 14:35
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Apr 20, 2026
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