Skip to content

Admin page mixin: move tabs padding from buttons to wrapper#48706

Merged
CGastrell merged 1 commit into
trunkfrom
update/admin-page-tabs-wrapper-padding
May 12, 2026
Merged

Admin page mixin: move tabs padding from buttons to wrapper#48706
CGastrell merged 1 commit into
trunkfrom
update/admin-page-tabs-wrapper-padding

Conversation

@CGastrell
Copy link
Copy Markdown
Contributor

Fixes #

Proposed changes

  • In the jetpack-admin-page-layout mixin, stop overriding the @wordpress/ui tab button's own padding-inline. Apply the missing horizontal padding on the .jp-admin-page-tabs wrapper instead.
  • Net effect on the first tab's start edge is the same — lg (16px, from the tab button) + sm (8px, from the wrapper) = 2xl (24px), matching the admin-ui page header — but we no longer reach into the third-party component's internals.

Related product discussion/links

  • Follow-up to the admin-page-layout tabs work — feedback was that we shouldn't mess with the tab buttons' padding directly.

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

No.

Testing instructions

The only consumer of .jp-admin-page-tabs today is the Protect plugin.

  • Build Protect: pnpm jetpack build plugins/protect
  • Open the Jetpack Protect admin page
  • Confirm the tabs strip looks the same as before:
    • First tab's start edge aligns under the page title (24px from the page edge)
    • Tabs strip is sticky at the top of the scroll area
    • Hairline (border-bottom) still spans the full strip width
  • Inspect a [role="tab"] button in DevTools and confirm there is no longer a Jetpack-side padding-inline rule overriding it — the only inline padding should be the one shipped by @wordpress/ui (var(--wpds-dimension-padding-lg)).

Stop overriding the @wordpress/ui tab button's own padding-inline.
Instead, add the missing 8px (sm) on the `.jp-admin-page-tabs` wrapper
so the first tab's start edge still lines up under the page title
(lg button padding + sm wrapper padding = 2xl, matching the admin-ui
page header).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 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 update/admin-page-tabs-wrapper-padding branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/admin-page-tabs-wrapper-padding
bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/admin-page-tabs-wrapper-padding

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 11, 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 11, 2026
@jp-launch-control
Copy link
Copy Markdown

jp-launch-control Bot commented May 11, 2026

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 self-assigned this May 11, 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 11, 2026
@CGastrell CGastrell merged commit a77725c into trunk May 12, 2026
113 of 114 checks passed
@CGastrell CGastrell deleted the update/admin-page-tabs-wrapper-padding branch May 12, 2026 14:00
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label May 12, 2026
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.

2 participants