Skip to content

Premium Analytics: remove the date range step arrows - #52108

Open
chihsuan wants to merge 3 commits into
trunkfrom
change/uni-751-remove-period-arrows
Open

Premium Analytics: remove the date range step arrows#52108
chihsuan wants to merge 3 commits into
trunkfrom
change/uni-751-remove-period-arrows

Conversation

@chihsuan

@chihsuan chihsuan commented Sep 9, 2026

Copy link
Copy Markdown
Member

Fixes UNI-751

Proposed changes

  • Remove the back/forward arrows from the date filters row.
  • Delete the mechanism behind them: DatePeriodNavigation, the onStep prop and callback, and stepDateRange / canStepForward.
  • Delete clampRangeEndToToday as well, whose only caller was the forward step.
  • Drop the onStep: undefined override the detail pages carried, now that there is nothing to switch off.
  • Drop completeToDateRange from the datetime barrel, its only caller outside the package having been the step callback.

Removing rather than hiding: the detail pages already opted out, so the dashboard was the last surface rendering the arrows, and nothing else called the stepping helpers. The date picker, the comparison dropdown and the chart interval control are untouched. This supersedes WOOA7S-1812 (#51118), which added the arrows last month: the date selection was re-specced in the 26 August design recap, and the arrows are not part of that design.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

Before After
before after
  • Open the Premium Analytics dashboard.
  • The date filters row should read Last 30 days / vs / Previous 30 days / the chart interval button, with no arrows on either side.
  • Change the range from the date picker and confirm it still applies, and that Back still undoes it.
  • Open a post or video detail page and confirm its date row is unchanged.
  • In Storybook, Packages/Premium Analytics/UI/DateFiltersPanel covers the same row, including the Disabled story.

The arrows are gone from the date filters row, alongside the mechanism
behind them: the surface that still rendered them was the dashboard, and
the detail pages already opted out.

UNI-751
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the change/uni-751-remove-period-arrows branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack change/uni-751-remove-period-arrows
bin/jetpack-downloader test jetpack-mu-wpcom-plugin change/uni-751-remove-period-arrows

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added [Package] Premium Analytics [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Premium Analytics [Tests] Includes Tests Docs labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

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:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: October 6, 2026

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.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SwEiwvYnpNdaqsK71QznVw
@jp-launch-control

jp-launch-control Bot commented Sep 9, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 3 files.

File Coverage Δ% Δ Uncovered
projects/packages/premium-analytics/packages/datetime/src/to-date-range.ts 3/3 (100.00%) 0.00% 0 💚
projects/packages/premium-analytics/packages/routing/src/hooks/use-report-date-filters/use-report-date-filters.tsx 54/54 (100.00%) 0.00% 0 💚
projects/packages/premium-analytics/packages/ui/src/date-filters-panel/date-filters-panel.tsx 25/25 (100.00%) 0.00% 0 💚

Full summary · PHP report · JS report

Drops `completeToDateRange` from the datetime barrel, whose only caller
outside the package was the step callback, and clears the docs and
comments the removal left pointing at things that no longer exist.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THgGUBmikHUTBQQ4B2ktSW
@chihsuan
chihsuan marked this pull request as ready for review September 9, 2026 03:30
@chihsuan
chihsuan requested a review from a team as a code owner September 9, 2026 03:30
@chihsuan chihsuan added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Sep 9, 2026
@chihsuan
chihsuan requested a review from retrofox September 9, 2026 03:31

@Nikschavan Nikschavan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, the changes look good.

@dognose24 dognose24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Clean removal: no reference to any of the removed symbols survives under projects/ at the PR head, no unused imports or dead code left behind (exactRange is still used by drill-down, appliedRange by the comparison source range), and the three sub-packages are private workspace packages so trimming their barrels breaks nothing outside. Nice touch removing the stale "probe" comments in DateFiltersPanel while at it.

One optional wording nit on the changelog entries, non-blocking: "stepped the date range back and forward a period" reads a little awkwardly. "Remove the arrows that stepped the date range back or forward by one period." might read better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants