Repository navigation
Conversation
…ses without buckets
|
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. Stats Data 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 11 files. Only the first 5 are listed here.
4 files are newly checked for coverage.
|
…s-stacked # Conflicts: # projects/packages/premium-analytics/packages/widgets-toolkit/src/components/chart-comparative-bar/comparative-bar-chart.tsx # projects/packages/premium-analytics/packages/widgets-toolkit/src/index.ts
…s-stacked # Conflicts: # projects/packages/premium-analytics/widgets/devices/render.tsx
List the legend item only while the total bar is drawn, draw no total without a primary so the empty state shows, and warn that comparisonSeriesItems is ignored in a stacked layout.
The total used the translated legend label as its key, so callbacks saw a string that changed with the locale and a primary of the same name was drawn in its place. Export COMPARISON_TOTAL_KEY and keep the label for the tooltip and legend only.
…' into change/pa-devices-stacked
…t's fixed key Strip COMPARISON_TOTAL_KEY from the Devices tooltip instead of every key outside the data, and stop handing a stacked chart comparisonSeriesItems, which it ignores and now warns about.
Add --a8c-charts-color-comparison, mapped to the WPDS neutral-weak foreground, and tone it to 3:1 against the background, as the grouped and overlap layouts tone their palette colors.
…acked # Conflicts: # projects/js-packages/charts/src/charts/bar-chart/index.ts # projects/js-packages/charts/src/charts/bar-chart/private/stack-layout.ts # projects/js-packages/charts/src/charts/bar-chart/private/use-bar-slots.ts # projects/js-packages/charts/src/charts/bar-chart/test/bar-chart-stacked.test.tsx # projects/js-packages/charts/src/charts/bar-chart/use-bar-colors.ts # projects/js-packages/charts/src/charts/bar-chart/use-bar-legend-items.ts # projects/js-packages/charts/src/providers/chart-context/stories/index.docs.mdx # projects/js-packages/charts/src/styles/chart-scope.scss # projects/packages/premium-analytics/packages/data/src/processing/stats/index.ts # projects/packages/premium-analytics/packages/data/src/queries/__tests__/stats-queries.test.ts # projects/packages/premium-analytics/packages/data/src/queries/index.ts # projects/packages/premium-analytics/packages/data/src/queries/stats-query.ts # projects/packages/premium-analytics/packages/widgets-toolkit/src/stories/mocks/register-stats-mocks.ts
…plicate render test
louwie17
left a comment
There was a problem hiding this comment.
Thanks @chihsuan, nice work on this! The bar view tested well on a local Docker site. I checked days and weeks with the previous period on and off, hiding Mobile, and the weekly stacks add up to the Traffic summary views for the same range. Keyboard focus also lands on the tooltip again after your latest push, same as trunk 👍
I did leave two inline comments, one around the weekly tooltip overflowing the card, which we should fix. The other is a small changelog nit.
Let me know what you think.
Co-reviewed and tested with Claude and Codex.
| empty={ emptyState.empty } | ||
| renderLoading={ <BarChartSkeleton /> } | ||
| > | ||
| <ComparativeBarChart |
There was a problem hiding this comment.
With the card at its default half width and By weeks selected, hovering a bar with the comparison on adds a horizontal scrollbar under the chart and cuts off the previous period column. The tooltip is about 430px with the two date range headers, wider than the ~400px card, so BoundedTooltip can't fit it. By days fits fine.
Maybe we could cap the tooltip at the card width so it wraps, or use shorter range labels here, like "Oct 28 – Nov 1"?

There was a problem hiding this comment.
Screen.Recording.2026-11-27.at.11.36.21.AM.mov
| Significance: minor | ||
| Type: enhancement | ||
|
|
||
| Premium Analytics: Add a bar chart of views by device over time to the Devices widget, with the previous period's total beside each bar. Stacked bar tooltips, such as Requests by source, now end with a Total row. |
There was a problem hiding this comment.
Small nit, should we also mention the tooltip fix here, and in the Stats and Premium Analytics plugin entries? Right now only the charts entry has it, and it shows in the dashboard cards.
There was a problem hiding this comment.
Good call, added it to the three plugin entries in dc71ac4.
| <SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"> | ||
| <Path d="M5.5 16.5a6.5 6.5 0 0 1 13 0" stroke="currentColor" strokeWidth="3" /> | ||
| </SVG> |
There was a problem hiding this comment.
There was a problem hiding this comment.
Thanks, the split reads more like a chart. Updated in e5d751a.
|
Thanks for testing this so thoroughly @louwie17! The weekly tooltip now fits narrow cards with shorter dates, and the plugin entries mention the tooltip fix. Could you take another look? |
…acked # Conflicts: # projects/packages/premium-analytics/packages/data/src/processing/stats/index.ts
louwie17
left a comment
There was a problem hiding this comment.
Thanks for the updates @chihsuan! The weekly tooltip now fits the narrow Devices card with the shorter dates, no more scrollbar, and wide cards still show the full dates. The changelog entries look good too, and the split half-ring icon reads nicely. LGTM 🚀
Co-reviewed and tested with Claude.

Part of WOOA7S-1535
Proposed changes
The bars use a new option of the WordPress.com devices endpoint, which is already live. If the endpoint answers without per-day data, the widget shows an error instead of an empty chart.
Screen.Recording.2026-11-26.at.2.42.48.PM.mov
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
Setup: run Storybook (
pnpm run storybook:devinprojects/js-packages/storybook), section Packages / Premium Analytics / Widgets / Devices.Bar chart
States
Download CSV
devices-over-time-<from>_<to>.csvand has a Date column plus one column per device, one row per day.devices-<from>_<to>.csvwith Screen size and Share (%), as on trunk.Unchanged
On a site with Stats device data