Repository navigation
Premium Analytics: unify the shared leaderboard row height, radius, and hover - #51595
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 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Premium Analytics plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 1 file.
|
…nk arrow The design system renders the arrow as a sibling of the label, so a colour on .label never reached it and hover showed blue text beside a dark arrow. Move the colour to the anchor and leave the underline on the label. Also size the UTM value rows with body-sm so they match the post rows they drill into, and stop AGENTS.md restating the shared row's values.
There was a problem hiding this comment.
Tests well for me 👍 I pulled the branch and gave it a spin in Storybook, and measured the computed styles instead of just eyeballing - all the numbers matches what's in the PR.
- Referrers rows come out exactly 36px with 12px padding on both sides, and the bars are 8px radius now.
- Hovering twitter.com turns the link #3858e9 with underline, and the arrow picks up the colour too, so I think that's why the colour has to sit on the anchor. The Search Engines drill-down row stays black on hover as expected.
- UTM top rows are 36px (was 44px), and the post rows after drilling in measure exactly the same, so the two views finally sit level.
I also grepped the package for the removed variant/className props and found no leftovers - utm-insights really was the only caller. The barBorderRadius change only reaches leaderboard-chart.tsx via the leaderboardChart theme key so other chart types are not affected. Changelog entries cover both plugins that ship the package too.
| Referrers | Link hover | UTM top level | UTM drill-down |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Just a heads up if you test locally: I hit a readSiteTimestamp import error in Storybook at first, which turned out to be a stale packages/data/build-module/ built from a newer trunk - nothing to do with this PR, rebuilding the package on the branch fixed it.
Nice cleanup, thanks!




Proposed changes
First of a few PRs aligning the leaderboard widgets with the design prototype.
LeaderboardRow/LeaderboardPostLabellose thevariantandclassNameescape hatches — every leaderboard row is now one 36px box withpadding-inline: md.--wpds-border-radius-md(4px) to--wpds-border-radius-lg(8px), matching the design reference.--wpds-color-foreground-interactive-brandplus the existing underline.utm-insights— the repo's only caller of the removed props — drops them, and its.itemLabeladopts the shared row box so its two views stay level.AGENTS.mdrow-height convention now points at the shared components instead of teaching an 8px inline padding that no longer matches.The 44px rows came from
.overlay, added in #50919 so migrated post rows would keep matching a hand-written 12px block padding. Removing the variant removes the reason those two heights existed. Widget migrations onto the shared row are follow-ups: #51599 moves Most viewed and Videos, and a third PR takes the rest. Until those land, the widgets that draw their own labels keep an 8px inline inset where the shared row now uses 12px.Before / after
Captured from Storybook rather than a live site: this is a component-level change, and the widget stories exercise the shared row directly. Each "before" is a real
trunkbuild of the package, not the branch with values overridden — same window size and crop for both.Top referrers — bar radius 4px → 8px, text inset 8px → 12px.
Link hover — was underline only; now picks up
--wpds-color-foreground-interactive-brand.Top UTM — rows drop from 44px to 36px, so they sit level with the post rows a drill-down shows.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
pnpm run storybookfromprojects/packages/premium-analytics, then open Packages / Premium Analytics / Widgets / Referrers → Default.#3858e9) and underline. Hovering a row that is not a link should not.