-
Notifications
You must be signed in to change notification settings - Fork 2k
STATS-59 - Match filename for the location stats to production #103281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -23,6 +23,7 @@ import PageHeader from '../components/headers/page-header'; | |||||||||||
import { STATS_FEATURE_DOWNLOAD_CSV } from '../constants'; | ||||||||||||
import StatsModuleLocations from '../features/modules/stats-locations'; | ||||||||||||
import LocationsNavTabs from '../features/modules/stats-locations/locations-nav-tabs'; | ||||||||||||
import { GEO_MODES } from '../features/modules/stats-locations/types'; | ||||||||||||
import StatsModuleUTM from '../features/modules/stats-utm'; | ||||||||||||
import { shouldGateStats } from '../hooks/use-should-gate-stats'; | ||||||||||||
import { StatsGlobalValuesContext } from '../pages/providers/global-provider'; | ||||||||||||
|
@@ -367,6 +368,11 @@ class StatsSummary extends Component { | |||||||||||
backLink += domain; | ||||||||||||
} | ||||||||||||
const navigationItems = [ { label: backLabel, href: backLink }, { label: title } ]; | ||||||||||||
const geoMode = this.props.context.query.geoMode; | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Add a comment explaining the expected values in GEO_MODES and why defaulting to 'country' is appropriate to help future maintainers understand the mapping.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||
const geoModeLabel = | ||||||||||||
geoMode && Object.prototype.hasOwnProperty.call( GEO_MODES, geoMode ) | ||||||||||||
? GEO_MODES[ geoMode ] | ||||||||||||
: 'country'; | ||||||||||||
|
||||||||||||
return ( | ||||||||||||
<Main fullWidthLayout> | ||||||||||||
|
@@ -391,7 +397,9 @@ class StatsSummary extends Component { | |||||||||||
<DownloadCsv | ||||||||||||
statType={ statType } | ||||||||||||
query={ moduleQuery } | ||||||||||||
path={ path } | ||||||||||||
path={ | ||||||||||||
statType === 'statsCountryViews' ? `${ path }-${ geoModeLabel }` : path | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There will be a |
||||||||||||
} | ||||||||||||
period={ this.props.period } | ||||||||||||
skipQuery={ statType === 'statsUTM' } | ||||||||||||
/> | ||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have a Locations module dedicated scope for this query parameter?