WOOA7S-1696: Premium Analytics: show nested rows and deltas in the Referrers report#50747
WOOA7S-1696: Premium Analytics: show nested rows and deltas in the Referrers report#50747Nikschavan wants to merge 5 commits into
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?
|
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. 🤷 |
|
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! |
a2b6eaa to
386e060
Compare
There was a problem hiding this comment.
Pull request overview
Updates the Premium Analytics Referrers report to align more closely with Calypso’s detailed referrers experience by changing both the Stats request shape and how results are rendered in the report table.
Changes:
- Replace the Referrers report chart + flat records table with a nested (native DataViews hierarchy) drilldown table.
- Change the referrers Stats query/request to summarize explicit date ranges (and omit the generic
daysparam) while requesting all rows for client-side table interactions. - Surface comparison deltas in the Views column and preserve safe external linking + favicon handling for referrer leaves.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| projects/packages/premium-analytics/routes/reports/referrers/page.tsx | Removes the performance chart and switches the report body to ReportDrilldownTable with native hierarchy configuration. |
| projects/packages/premium-analytics/routes/reports/referrers/config/use-report-records.ts | Updates the referrers request params (summarized range, all rows) and derives hierarchical rows from merged comparison rows. |
| projects/packages/premium-analytics/routes/reports/referrers/config/use-report-records.test.ts | Reworks tests to validate the new summarized request and parent-linked hierarchical rows output. |
| projects/packages/premium-analytics/routes/reports/referrers/config/index.ts | Removes unused aggregate/time-series exports; keeps only the hierarchy flattener export. |
| projects/packages/premium-analytics/routes/reports/referrers/config/fields.tsx | Updates table fields to support nested rows, safe leaf linking with accessible parent context, favicon handling, and views deltas. |
| projects/packages/premium-analytics/routes/reports/referrers/config/fields.test.tsx | Adds coverage for parent-context announcements, group-row non-linking, favicon error handling, and views delta rendering. |
| projects/packages/premium-analytics/routes/reports/referrers/config/fields.module.css | Adds favicon sizing/styling for the referrer label cell. |
| projects/packages/premium-analytics/routes/reports/referrers/config/aggregate.ts | Replaces bucket-aggregation/time-series helpers with a depth-first hierarchical flattener for DataViews native levels. |
| projects/packages/premium-analytics/routes/reports/referrers/config/aggregate.test.ts | Updates tests to validate stable parent IDs, depth-first order, and icon inheritance across hierarchy levels. |
| projects/packages/premium-analytics/packages/ui/src/dataviews-drilldown-native/drilldown-leaf-cell.module.scss | Adjusts link styling override to fix layout without forcing link color/decoration. |
| projects/packages/premium-analytics/packages/data/src/queries/stats-referrers-query.ts | Configures the referrers query factory to omit days to match Calypso’s explicit-range request style. |
| projects/packages/premium-analytics/packages/data/src/queries/stats-query.ts | Adds per-endpoint query settings to omit derived params when building Stats proxy queries. |
| projects/packages/premium-analytics/packages/data/src/queries/tests/stats-queries.test.ts | Adds a regression test ensuring the referrers query key params match the Calypso-style range request (no days). |
| projects/packages/premium-analytics/changelog/update-wooa7s-1696-referrers-report | Adds a changelog entry describing the report UI change (nested rows + deltas, chart removal). |
# Conflicts: # projects/packages/premium-analytics/packages/ui/src/dataviews-drilldown-native/__tests__/process-hierarchy-levels.test.ts # projects/packages/premium-analytics/packages/ui/src/dataviews-drilldown-native/dataviews-drilldown-native.tsx # projects/packages/premium-analytics/packages/ui/src/dataviews-drilldown-native/process-hierarchy-levels.ts # projects/packages/premium-analytics/routes/reports/referrers/config/fields.module.css # projects/packages/premium-analytics/routes/reports/referrers/config/fields.tsx # projects/packages/premium-analytics/routes/reports/referrers/config/use-report-records.ts # projects/packages/premium-analytics/routes/reports/referrers/page.tsx
5caa615 to
13f5440
Compare
Proposed changes
daysparameter.Related product discussion/links
/reports/referrers)Does this pull request change what data or activity we track or use?
No. It changes how existing Stats referrer data is requested and displayed; it does not add or change tracking.
Testing instructions