Skip to content

Podcast: align Stats tab padding#48908

Merged
arcangelini merged 2 commits into
trunkfrom
update/podcast-tabs-padding
May 18, 2026
Merged

Podcast: align Stats tab padding#48908
arcangelini merged 2 commits into
trunkfrom
update/podcast-tabs-padding

Conversation

@robertbpugh
Copy link
Copy Markdown
Contributor

@robertbpugh robertbpugh commented May 18, 2026

CleanShot 2026-05-18 at 10 06 33@2x

Proposed changes

  • Bump .jp-admin-page-tabs padding-inline from 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.
  • Re-apply --wpds-typography-font-size-md (13px) from an unlayered selector so the tab labels render at 13px instead of inheriting 16px from wp-admin's button { font-size: inherit } reset.

Why

The Podcast dashboard renders <Tabs.List variant="minimal"> inside the shared .jp-admin-page-tabs wrapper. The wrapper's 8px padding was designed for the default <Tabs.Tab> (which ships with 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. Same root cause that shipped a fix for the Search dashboard in #48846, applied to Podcast.

Related product discussion/links

Testing instructions

  1. Load the Podcast admin page (Jetpack > Podcast on a site where the package is enabled).
  2. Confirm the Stats tab's left edge is flush with the page title "Podcast" content edge (24px from the page-content edge).
  3. Confirm the tab labels render at 13px, not 16px.
  4. Before/after screenshots welcome from anyone who has a working preview environment.

@robertbpugh robertbpugh self-assigned this May 18, 2026
@robertbpugh robertbpugh requested a review from arcangelini May 18, 2026 13:52
@github-actions
Copy link
Copy Markdown
Contributor

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


🔴 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:

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

My PR adds *x* and *y*.

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 18, 2026
@robertbpugh robertbpugh marked this pull request as ready for review May 18, 2026 14:03
Copilot AI review requested due to automatic review settings May 18, 2026 14:03
@jp-launch-control
Copy link
Copy Markdown

jp-launch-control Bot commented May 18, 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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-tabs within 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.

@robertbpugh robertbpugh changed the title Podcast: align dashboard tab strip with design tokens Podcast: align Stats tab padding May 18, 2026
@arcangelini
Copy link
Copy Markdown
Member

+------------------------------------------------------------------+--------+
| Check                                                            | Result |
+------------------------------------------------------------------+--------+
| Follows WordPress coding standards and best practices            |   ✅   |
| No security issues (escaping, sanitization, SQL, XSS, auth)      |   ✅   |
| No new warnings, fatals, errors, or type errors (PHP/TS)         |   ✅   |
| Function calls verified (exist, correct params, return handled)  |   ✅   |
| No potential mid-deploy issues                                   |   ✅   |
| Follows existing patterns in the repo                            |   ✅   |
| i18n handled (translations, text domain, plural forms)           |   ✅   |
| Accessibility (a11y) handled for UI changes                      |   ✅   |
| No performance or caching regressions                            |   ✅   |
| Backwards compatible (filters, hooks, REST, exports, schema)     |   ✅   |
+------------------------------------------------------------------+--------+

Risk Assessment: LOW
Approval Percentage: 95%

@simison
Copy link
Copy Markdown
Member

simison commented May 18, 2026

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

@simison simison requested review from CGastrell and dhasilva May 18, 2026 18:54
@simison
Copy link
Copy Markdown
Member

simison commented May 18, 2026

Re-apply --wpds-typography-font-size-md (13px) from an unlayered selector so the tab labels render at 13px instead of inheriting 16px from wp-admin's button { font-size: inherit } reset.

This is unneeded as the bug is fixed in @wordpress/ui package 1-2 versions ago, so the package needs updating in Jetpack: PR.

@arcangelini
Copy link
Copy Markdown
Member

@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?

@simison
Copy link
Copy Markdown
Member

simison commented May 18, 2026

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:

WordPress/gutenberg#76135
WordPress/gutenberg#76783

@simison
Copy link
Copy Markdown
Member

simison commented May 18, 2026

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

Can you just move the fix level up to the Jetpack component? :-)

@arcangelini
Copy link
Copy Markdown
Member

@simison Happy to move the padding fix upstream.

As for the font. I pulled @wordpress/ui@0.13.0 (and the 1.0.1-next prerelease) and read tabs/tab.tsx directly — Tabs.Tab does NOT apply defenseStyles.button:

// 0.13.0 and 1.0.1-next both:
<_Tabs.Tab className={ clsx( styles.tab, className ) } ... />
//                          ^^^ no defenseStyles.button

And .tab still declares font-size: var(--wpds-typography-font-size-md) inside @layer wp-ui-components, so the unlayered button { font-size: inherit } reset still wins. Tab was missed when the defense was wired up everywhere else. So this is likely something that needs to be fixed upstream as well.

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.
@simison
Copy link
Copy Markdown
Member

simison commented May 18, 2026

Yep! Definitely a bug in @wordpress/ui, then.

@arcangelini arcangelini force-pushed the update/podcast-tabs-padding branch from e592ad2 to 60178d7 Compare May 18, 2026 19:50
@arcangelini arcangelini merged commit 6dc8589 into trunk May 18, 2026
92 checks passed
@arcangelini arcangelini deleted the update/podcast-tabs-padding branch May 18, 2026 21:10
@github-actions github-actions Bot removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels May 18, 2026
CGastrell added a commit that referenced this pull request May 19, 2026
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.
Copilot AI pushed a commit that referenced this pull request May 19, 2026
Co-authored-by: Tony Arcangelini <tony@arcangelini.com>
CGastrell added a commit that referenced this pull request May 19, 2026
* 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).
yuliyan pushed a commit that referenced this pull request May 20, 2026
Co-authored-by: Tony Arcangelini <tony@arcangelini.com>
yuliyan pushed a commit that referenced this pull request May 20, 2026
* 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).
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.

4 participants