Premium Analytics: unify the no-comparison surfaces on one declaration - #51382
Open
chihsuan wants to merge 6 commits into
Open
Premium Analytics: unify the no-comparison surfaces on one declaration#51382chihsuan wants to merge 6 commits into
chihsuan wants to merge 6 commits into
Conversation
Contributor
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Contributor
|
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! |
chihsuan
force-pushed
the
wooa7s-1964-report-scope-unification
branch
from
August 19, 2026 08:06
8895b0a to
e53803a
Compare
chihsuan
marked this pull request as ready for review
August 19, 2026 08:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #51381 — review that one first; this PR targets its branch, so the diff here is only the refactor.
Related to WOOA7S-1964.
Proposed changes
Every analytics surface answers the same question twice: does the header show the comparison control, and do the comparison params reach the things that fetch? Each route hardcoded both answers separately, which is how the dashboard came to answer the first and forget the second (the defect #51381 fixes). This collapses all of them onto the one declaration that PR introduced.
ReportScopeProvideronce per route: the/reports/$reportdispatcher, post detail, video detail.DateFiltersPanelreads the scope; theshowComparisonprop is gone, along with its four call sites.useReportParamsreads the scope instead of callingwithoutComparison()unconditionally.WidgetRootalready strips from the scope, and injected attributes travelling with a layout was a standing hazard.No behavior change. Comparison params stay on the URL on every surface, exactly as before.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
This is a pure refactor, so the interesting check is that nothing moved: