Skip to content

Premium Analytics: scope the date comparison to sections that offer the control - #51381

Open
chihsuan wants to merge 2 commits into
trunkfrom
wooa7s-1964-comparison-scope
Open

Premium Analytics: scope the date comparison to sections that offer the control#51381
chihsuan wants to merge 2 commits into
trunkfrom
wooa7s-1964-comparison-scope

Conversation

@chihsuan

@chihsuan chihsuan commented Aug 19, 2026

Copy link
Copy Markdown
Member

Fixes WOOA7S-1964

Proposed changes

Insights does not offer date comparisons, but active comparison parameters still reached its widgets when switching from Traffic or opening an Insights deep link.

This PR adds a shared report scope so widgets ignore comparison parameters in sections that do not support them. The parameters remain in the URL, preserving the comparison when switching back to a supported section.

Related product discussion/links

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

No.

Testing instructions

Most of stage.tsx's diff is re-indentation from the new wrapper — review with ?w=1.

  • Load the dashboard, pick a date comparison on Traffic, then switch to Insights.
  • Confirm the URL still carries comp=1 and compare_from / compare_to.
  • Confirm no widget on Insights renders a period-over-period delta or a compared legend.
  • Switch back to Traffic and confirm the comparison you picked is still applied.
  • ?section=insights as a fresh deep link should behave the same — that path seeds the comparison before the section is known.

@github-actions

github-actions Bot commented Aug 19, 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 wooa7s-1964-comparison-scope branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack wooa7s-1964-comparison-scope
bin/jetpack-downloader test jetpack-mu-wpcom-plugin wooa7s-1964-comparison-scope

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 commented Aug 19, 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: September 7, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Mu Wpcom plugin:

  • Next scheduled release: WordPress.com Simple releases happen semi-continuously (PCYsg-Jjm-p2)

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Wpcomsh plugin:

  • Next scheduled release: Atomic deploys happen twice daily on weekdays (p9o2xV-2EN-p2)

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.

@jp-launch-control

jp-launch-control Bot commented Aug 19, 2026

Copy link
Copy Markdown

Code Coverage Summary

No summary data is available for parent commit 9450fcc, so cannot calculate coverage changes. 😴

If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 9450fcc is available.

Full summary · PHP report · JS report

@github-actions github-actions Bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Premium Analytics [Plugin] Wpcomsh Docs labels Aug 19, 2026
@chihsuan
chihsuan marked this pull request as ready for review August 19, 2026 08:25
@chihsuan
chihsuan requested a review from a team as a code owner August 19, 2026 08:25
@chihsuan chihsuan added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs [Package] Premium Analytics [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Premium Analytics [Plugin] Wpcomsh [Status] Needs Review This PR is ready for review. [Type] Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant