Premium Analytics: scope the date comparison to sections that offer the control - #51381
Premium Analytics: scope the date comparison to sections that offer the control#51381chihsuan wants to merge 2 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?
|
|
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. Mu Wpcom plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Wpcomsh plugin:
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. |
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.comp=1andcompare_from/compare_to.?section=insightsas a fresh deep link should behave the same — that path seeds the comparison before the section is known.