Stats: Link video list titles to single video page - #112494
Conversation
Jetpack Cloud Live (direct link)
Automattic for Agencies Live (direct link)
Dashboard Live (dotcom) (direct link)
|
|
@copilot review this PR. Leave your feedback as review comments only — do NOT push commits, apply suggestions, or modify the branch in any way. I will make all code changes myself. |
This comment was marked as resolved.
This comment was marked as resolved.
47abe60 to
000ab35
Compare
|
Thanks for the review — went through the three points: 1. Tracks event before the modified-click guard — this is deliberate. Firing before the guard means a Cmd/middle-click that opens the video details in a new tab is still counted as a "details clicked" interaction, which is the intent to view is what we want to measure, regardless of same-tab vs new-tab. Leaving it as-is. 2. 3. |
|
@copilot review this PR. Leave your feedback as review comments only — do NOT push commits, apply suggestions, or modify the branch in any way. I will make all code changes myself. |
This comment was marked as resolved.
This comment was marked as resolved.
On the videos list page, each video title linked to the media file (/media/... in Calypso, upload.php in Odyssey). As part of the VideoPress stats modernization, the title should instead open the video's stats, matching where the metric columns already point. Repoint the title to /stats/<period>/videodetails/<site>?post=<id> (no statType, so the details page opens on its default Views chart). Render the title as a real anchor instead of a span with role=button so keyboard activation, screen-reader link semantics, and right/cmd/middle-click "open in new tab" all work. The now-unused media-navigation helper and its Odyssey-only imports are removed. Fixes STATS-301
Guard the title anchor against global a:visited author rules bleeding the browser visited-link colour into the title text.
000ab35 to
80aa8b0
Compare
Review cycle complete — handing off for final reviewCopilot rounds: 2 (approved — "looks good to merge", no further actionable items). Addressed:
Branch: rebased on CI: all GitHub checks green.
Ready for your final review. Still a draft — mark ready when you're happy. |
renderTitleCell took five positional args and this change reordered them (onClick/onKeyUp became href/onClick). A single named-field object removes the positional-order footgun for any future caller.
d20746f to
65e340d
Compare
Fixes STATS-301
Why are these changes being made?
On the videos list page (
/stats/day/videoplays/<site>), each video title linked to the media file —/media/<site>/<id>in Calypso,upload.php?item=<id>in Odyssey. As part of the VideoPress stats modernization, the title should open the video's stats instead, consistent with the metric columns (Impressions, Hours Watched, Retention Rate, Views), which already link to the single-video details page.Proposed Changes
/stats/<period>/videodetails/<site>?post=<id>(nostatType, so the details page opens on its default Views chart — matching the target URL in the issue).<a>anchor instead of a<span role="button">, so keyboard activation, screen-reader link semantics, and right-/cmd-/middle-click "open in new tab" all work. The click still routes in-app viapage()and defers to the browser for modified clicks.editVideo) and its Odyssey-only dependencies (config,getSiteAdminUrl,siteAdminUrl).The metric-column links are intentionally left unchanged — they are out of scope for this issue.
Screenshots
Videos list — each title now links to the single-video stats page
Testing Instructions
/stats/day/videoplays/<site>for a site with VideoPress videos./stats/<period>/videodetails/<site>?post=<id>), not the media library.Verified locally against a Jetpack site: all 58 title cells render as anchors to
videodetails, none to/media/, and clicking navigates in-app to the details page (e.g.?post=247801).Pre-merge Checklist
🤖 Generated with Claude Code