From 76f88e0bfc7f594325dac99048237b0ca966a992 Mon Sep 17 00:00:00 2001 From: Robbie Coomber Date: Wed, 8 Nov 2023 10:48:24 +0000 Subject: [PATCH] Move suppressSessionAnalysisWarning to insightViz --- frontend/src/queries/schema.ts | 1 + frontend/src/scenes/insights/insightVizDataLogic.ts | 6 +++--- frontend/src/scenes/web-analytics/WebAnalyticsTile.tsx | 1 - frontend/src/scenes/web-analytics/webAnalyticsLogic.ts | 1 + frontend/src/types.ts | 1 - 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/queries/schema.ts b/frontend/src/queries/schema.ts index fcd957f9adf55..58b4dcd74a80e 100644 --- a/frontend/src/queries/schema.ts +++ b/frontend/src/queries/schema.ts @@ -397,6 +397,7 @@ interface InsightVizNodeViewProps { showResults?: boolean /** Query is embedded inside another bordered component */ embedded?: boolean + suppressSessionAnalysisWarning?: boolean } /** Base class for insight query nodes. Should not be used directly. */ diff --git a/frontend/src/scenes/insights/insightVizDataLogic.ts b/frontend/src/scenes/insights/insightVizDataLogic.ts index 9bf46610d410d..bbda9f7e73151 100644 --- a/frontend/src/scenes/insights/insightVizDataLogic.ts +++ b/frontend/src/scenes/insights/insightVizDataLogic.ts @@ -172,9 +172,9 @@ export const insightVizDataLogic = kea([ }, ], shouldShowSessionAnalysisWarning: [ - (s) => [s.isUsingSessionAnalysis, (_, p) => p.suppressSessionAnalysisWarning], - (isUsingSessionAnalysis, suppressSessionAnalysisWarning) => - isUsingSessionAnalysis && !suppressSessionAnalysisWarning, + (s) => [s.isUsingSessionAnalysis, s.query], + (isUsingSessionAnalysis, query) => + isUsingSessionAnalysis && !(isInsightVizNode(query) && query.suppressSessionAnalysisWarning), ], isNonTimeSeriesDisplay: [ (s) => [s.display], diff --git a/frontend/src/scenes/web-analytics/WebAnalyticsTile.tsx b/frontend/src/scenes/web-analytics/WebAnalyticsTile.tsx index db23e870646ba..9be372daf262a 100644 --- a/frontend/src/scenes/web-analytics/WebAnalyticsTile.tsx +++ b/frontend/src/scenes/web-analytics/WebAnalyticsTile.tsx @@ -194,7 +194,6 @@ export const WebStatsTrendTile = ({ query }: { query: InsightVizNode }): JSX.Ele }, }, hidePersonsModal: true, - suppressSessionAnalysisWarning: true, }, } }, [onWorldMapClick]) diff --git a/frontend/src/scenes/web-analytics/webAnalyticsLogic.ts b/frontend/src/scenes/web-analytics/webAnalyticsLogic.ts index 42a0610f107b3..e87d8f25f12b7 100644 --- a/frontend/src/scenes/web-analytics/webAnalyticsLogic.ts +++ b/frontend/src/scenes/web-analytics/webAnalyticsLogic.ts @@ -315,6 +315,7 @@ export const webAnalyticsLogic = kea([ filterTestAccounts: true, properties: webAnalyticsFilters, }, + suppressSessionAnalysisWarning: true, }, }, ], diff --git a/frontend/src/types.ts b/frontend/src/types.ts index ba50faf3f7da0..42ff0452d796c 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -2103,7 +2103,6 @@ export interface InsightLogicProps { setQuery?: (node: InsightVizNode) => void hidePersonsModal?: boolean - suppressSessionAnalysisWarning?: boolean /** chart-specific rendering context **/ chartRenderingMetadata?: ChartRenderingMetadata }