Podcast: align Stats tab padding#48908
Conversation
|
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 🤖 🔴 Action required: We would recommend that you add a section to the PR description to specify whether this PR includes any changes to data or privacy, like so: 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. 🤷 |
There was a problem hiding this comment.
Pull request overview
Applies the same tab-strip styling fix from the Search dashboard (#48846) to the Podcast dashboard: increases inline padding on .jp-admin-page-tabs to align the first variant="minimal" tab with the page header, and re-applies the --wpds-typography-font-size-md token via an unlayered selector to override wp-admin's button { font-size: inherit } reset.
Changes:
- Add
padding-inline: var(--wpds-dimension-padding-2xl, 24px)to.jp-admin-page-tabswithin the Podcast page scope. - Re-apply 13px font-size token on
[role="tab"]from an unlayered selector. - Add changelog entry.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| projects/packages/podcast/src/dashboard/style.scss | Adds scoped padding and tab font-size overrides to align with design tokens. |
| projects/packages/podcast/changelog/update-podcast-tabs-padding-and-font-size | Patch-level changelog entry describing the visual fix. |
Risk Assessment: LOW |
|
Pretty sure this tab spacing should be handled at the Jetpack components level already, so something is off here. 🤔 @dhasilva or @CGastrell might know more |
This is unneeded as the bug is fixed in |
|
@simison I checked and I didn't see anything. The Tabs padding is also being fixed manually in Search https://github.com/Automattic/jetpack/pull/48846/changes As for the font, I am not seeing anything in the newer versions that would fix this but maybe I am missing something? |
|
Did you test that the latest package doesn't fix it? Should've been part of these (and there were many more PRs) and if not fixed, it would be important to report upstream rather than keep fixing locally: |
Can you just move the fix level up to the Jetpack component? :-) |
|
@simison Happy to move the padding fix upstream. As for the font. I pulled And .tab still declares |
The Podcast dashboard uses `Tabs.List variant="minimal"` inside the
shared `.jp-admin-page-tabs` wrapper. The wrapper's 8px padding-inline
was designed for the default Tabs.Tab variant (16px self-padding,
summing to 24px). With variant="minimal" the tab has 0 inline padding,
so the strip starts 16px to the left of the page header content edge.
Bump the wrapper to padding-inline 2xl (24px) so the first tab aligns
with the page title.
Re-apply the wpds font-size token from an unlayered selector so the
tabs render at 13px instead of inheriting 16px from wp-admin's
unlayered `button { font-size: inherit }` reset.
Matches the fix shipped in jetpack#48846 for the Search dashboard.
Reported by lessbloat in the Podcast call-for-testing comments.
|
Yep! Definitely a bug in |
e592ad2 to
60178d7
Compare
Migrate all page-level Tabs.List usages in Jetpack admin pages onto <Tabs.List variant="minimal"> + the shared .jp-admin-page-tabs--minimal wrapper modifier shipped in #48908. Delete the local SCSS blocks that were re-implementing what the new shared modifier now provides, plus the legacy default-variant alignment workarounds. - Scan / Newsletter / Search: were already variant="minimal" but each had a local SCSS block re-implementing the new shared modifier. - Protect / VideoPress: migrated from default to minimal variant. VideoPress had a 16-line workaround in DashboardLayout/style.scss specifically to hold default-variant tabs aligned with the page header — deleted, since minimal removes the need. - Newsletter also dropped its bespoke wrapper class jetpack-newsletter-page__tabs-row in favour of the shared jp-admin-page-tabs jp-admin-page-tabs--minimal. Refs #48160.
Co-authored-by: Tony Arcangelini <tony@arcangelini.com>
* Normalize page tabs onto shared minimal variant Migrate all page-level Tabs.List usages in Jetpack admin pages onto <Tabs.List variant="minimal"> + the shared .jp-admin-page-tabs--minimal wrapper modifier shipped in #48908. Delete the local SCSS blocks that were re-implementing what the new shared modifier now provides, plus the legacy default-variant alignment workarounds. - Scan / Newsletter / Search: were already variant="minimal" but each had a local SCSS block re-implementing the new shared modifier. - Protect / VideoPress: migrated from default to minimal variant. VideoPress had a 16-line workaround in DashboardLayout/style.scss specifically to hold default-variant tabs aligned with the page header — deleted, since minimal removes the need. - Newsletter also dropped its bespoke wrapper class jetpack-newsletter-page__tabs-row in favour of the shared jp-admin-page-tabs jp-admin-page-tabs--minimal. Refs #48160. * Bump @wordpress/ui to 0.13.0 across affected packages Verify the tabs normalization compiles cleanly against the 0.13 release. Bumps the five packages this PR touches: - packages/search (0.12.0 → 0.13.0) - packages/scan (0.11.0 → 0.13.0) - packages/newsletter (0.11.0 → 0.13.0) - packages/videopress (0.11.0 → 0.13.0) - plugins/protect (0.11.0 → 0.13.0) Plus the per-route package.json files under scan, newsletter, and videopress. Other Jetpack projects remain on 0.11.0 — the monorepo-wide bump is the scope of the foundation PR #48404 (in flight).
Co-authored-by: Tony Arcangelini <tony@arcangelini.com>
* Normalize page tabs onto shared minimal variant Migrate all page-level Tabs.List usages in Jetpack admin pages onto <Tabs.List variant="minimal"> + the shared .jp-admin-page-tabs--minimal wrapper modifier shipped in #48908. Delete the local SCSS blocks that were re-implementing what the new shared modifier now provides, plus the legacy default-variant alignment workarounds. - Scan / Newsletter / Search: were already variant="minimal" but each had a local SCSS block re-implementing the new shared modifier. - Protect / VideoPress: migrated from default to minimal variant. VideoPress had a 16-line workaround in DashboardLayout/style.scss specifically to hold default-variant tabs aligned with the page header — deleted, since minimal removes the need. - Newsletter also dropped its bespoke wrapper class jetpack-newsletter-page__tabs-row in favour of the shared jp-admin-page-tabs jp-admin-page-tabs--minimal. Refs #48160. * Bump @wordpress/ui to 0.13.0 across affected packages Verify the tabs normalization compiles cleanly against the 0.13 release. Bumps the five packages this PR touches: - packages/search (0.12.0 → 0.13.0) - packages/scan (0.11.0 → 0.13.0) - packages/newsletter (0.11.0 → 0.13.0) - packages/videopress (0.11.0 → 0.13.0) - plugins/protect (0.11.0 → 0.13.0) Plus the per-route package.json files under scan, newsletter, and videopress. Other Jetpack projects remain on 0.11.0 — the monorepo-wide bump is the scope of the foundation PR #48404 (in flight).
Proposed changes
.jp-admin-page-tabspadding-inlinefrom the wrapper default (8px) to--wpds-dimension-padding-2xl(24px) on the Podcast dashboard, so the Stats tab's content edge lines up with the page header start.--wpds-typography-font-size-md(13px) from an unlayered selector so the tab labels render at 13px instead of inheriting 16px from wp-admin'sbutton { font-size: inherit }reset.Why
The Podcast dashboard renders
<Tabs.List variant="minimal">inside the shared.jp-admin-page-tabswrapper. The wrapper's 8px padding was designed for the default<Tabs.Tab>(which ships with 16px self-padding, summing to 24px). Withvariant="minimal"the tab has 0 inline padding, so the strip starts ~16px to the left of the page header. Same root cause that shipped a fix for the Search dashboard in #48846, applied to Podcast.Related product discussion/links
Testing instructions