Skip to content

Commit

Permalink
Hide session analysis warning on web analytics insights
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Nov 9, 2023
1 parent 03960c1 commit b44b19b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frontend/src/queries/nodes/InsightViz/InsightContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ export function InsightContainer({
trendsFilter,
funnelsFilter,
supportsDisplay,
isUsingSessionAnalysis,
samplingFactor,
insightDataLoading,
erroredQueryId,
timedOutQueryId,
shouldShowSessionAnalysisWarning,
} = useValues(insightVizDataLogic(insightProps))
const { exportContext } = useValues(insightDataLogic(insightProps))

Expand Down Expand Up @@ -197,7 +197,7 @@ export function InsightContainer({

return (
<>
{isUsingSessionAnalysis ? (
{shouldShowSessionAnalysisWarning ? (
<div className="mb-4">
<LemonBanner type="info">
When using sessions and session properties, events without session IDs will be excluded from the
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/scenes/insights/insightVizDataLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ export const insightVizDataLogic = kea<insightVizDataLogicType>([
)
},
],

shouldShowSessionAnalysisWarning: [
(s) => [s.isUsingSessionAnalysis, (_, p) => p.suppressSessionAnalysisWarning],
(isUsingSessionAnalysis, suppressSessionAnalysisWarning) =>
isUsingSessionAnalysis && !suppressSessionAnalysisWarning,
],
isNonTimeSeriesDisplay: [
(s) => [s.display],
(display) => !!display && NON_TIME_SERIES_DISPLAY_TYPES.includes(display),
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/web-analytics/WebAnalyticsTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export const WebStatsTrendTile = ({ query }: { query: InsightVizNode }): JSX.Ele
},
},
hidePersonsModal: true,
suppressSessionAnalysisWarning: true,
},
}
}, [onWorldMapClick])
Expand Down
1 change: 1 addition & 0 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2103,6 +2103,7 @@ export interface InsightLogicProps {
setQuery?: (node: InsightVizNode) => void

hidePersonsModal?: boolean
suppressSessionAnalysisWarning?: boolean
/** chart-specific rendering context **/
chartRenderingMetadata?: ChartRenderingMetadata
}
Expand Down

0 comments on commit b44b19b

Please sign in to comment.