Repository navigation
Premium Analytics: move Most viewed and Videos onto the shared leaderboard row - #51599
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 3 files.
|
…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.
…red leaderboard row
…and video-route test
208b658 to
1345a5e
Compare
…join a group The suite gained a `@wordpress/route` mock but stayed in the no-mocks group, so `test-groups` failed on the mismatched signature.
… actions
`LeaderboardPostLabel` reads the window from context, but a row whose action
varies per row has to build it by hand and could omit `search` silently: the
detail page then opened on its own default range with nothing to show for it.
Making `search` required turns that into a compile error. Pass `{}` to navigate
without a window on purpose.
…custom-title-labels # Conflicts: # projects/packages/premium-analytics/packages/widgets-toolkit/src/components/chart-leaderboard/leaderboard-row.tsx
Proposed changes
padding-inline: md) instead of their own..labelRow,.labelTitle,.labelTitleLink,.labelExternalLink,.labelText, and their hover rules.LeaderboardRowActiongains avideoLinkkind.postLinkhard-codes the/post/$postIdroute, so video rows had no way to reach/video/$videoIdthrough the shared row.useWidgetNavigationSearch(). Most viewed was readingreportParams, which strips comparison state on surfaces that don't offer it, so breadcrumbing back lost the user's comparison.Second of a few PRs aligning the leaderboard widgets with the design prototype. Behavior is unchanged otherwise: the internal / public-URL / plain-text branches, the outbound
↗marker, title tooltips, long-title ellipsis, and the archive drill-down all resolve exactly as before.Stacked on #51595.
Screenshots
Captured from Storybook at a 760px widget width. Both widgets go from a hand-written label (43px tall,
padding: 12px 8px) to the shared row (36px,padding-inline: 12px), so they now sit level with every other leaderboard.Most viewed → Default — the tighter rows fit a sixth row in the same space.
Most viewed → Archives — the drill-down groups pick up the same box.
Videos
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.#3858e9) and underlines./video/…, not/post/…— that's what the newvideoLinkaction fixes.