Admin page mixin: move tabs padding from buttons to wrapper#48706
Conversation
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>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryThis 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. 🤷 |
Fixes #
Proposed changes
jetpack-admin-page-layoutmixin, stop overriding the@wordpress/uitab button's ownpadding-inline. Apply the missing horizontal padding on the.jp-admin-page-tabswrapper instead.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
Does this pull request change what data or activity we track or use?
No.
Testing instructions
The only consumer of
.jp-admin-page-tabstoday is the Protect plugin.pnpm jetpack build plugins/protect[role="tab"]button in DevTools and confirm there is no longer a Jetpack-sidepadding-inlinerule overriding it — the only inline padding should be the one shipped by@wordpress/ui(var(--wpds-dimension-padding-lg)).