From 295bc636265d986e3e5fb6e05792a3827287fae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Obermu=CC=88ller?= Date: Wed, 19 Jun 2024 13:24:07 +0200 Subject: [PATCH] wip --- frontend/src/lib/utils/eventUsageLogic.ts | 1 - frontend/src/scenes/insights/insightLogic.ts | 26 -------------------- 2 files changed, 27 deletions(-) diff --git a/frontend/src/lib/utils/eventUsageLogic.ts b/frontend/src/lib/utils/eventUsageLogic.ts index bcf597ec4c7e4..340e8764e9f7b 100644 --- a/frontend/src/lib/utils/eventUsageLogic.ts +++ b/frontend/src/lib/utils/eventUsageLogic.ts @@ -43,7 +43,6 @@ import { InsightModel, InsightShortId, InsightType, - ItemMode, MultipleSurveyQuestion, PersonType, PropertyFilterType, diff --git a/frontend/src/scenes/insights/insightLogic.ts b/frontend/src/scenes/insights/insightLogic.ts index ec6aeddb19523..f04e1a13b0852 100644 --- a/frontend/src/scenes/insights/insightLogic.ts +++ b/frontend/src/scenes/insights/insightLogic.ts @@ -4,7 +4,6 @@ import { loaders } from 'kea-loaders' import { router } from 'kea-router' import api from 'lib/api' import { TriggerExportProps } from 'lib/components/ExportButton/exporter' -import { parseProperties } from 'lib/components/PropertyFilters/utils' import { DashboardPrivilegeLevel } from 'lib/constants' import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast' import { getEventNamesForAction, objectsEqual, toParams } from 'lib/utils' @@ -469,31 +468,6 @@ export const insightLogic = kea([ return null }, ], - isUsingSessionAnalysis: [ - (s) => [s.filters], - (filters: Partial): boolean => { - const entities = (filters.events || []).concat(filters.actions ?? []) - const using_session_breakdown = filters.breakdown_type === 'session' - const using_session_math = entities.some((entity) => entity.math === 'unique_session') - const using_session_property_math = entities.some((entity) => { - // Should be made more generic is we ever add more session properties - return entity.math_property === '$session_duration' - }) - const using_entity_session_property_filter = entities.some((entity) => { - return parseProperties(entity.properties).some((property) => property.type === 'session') - }) - const using_global_session_property_filter = parseProperties(filters.properties).some( - (property) => property.type === 'session' - ) - return ( - using_session_breakdown || - using_session_math || - using_session_property_math || - using_entity_session_property_filter || - using_global_session_property_filter - ) - }, - ], showPersonsModal: [() => [(_, p) => p.query], (query?: InsightVizNode) => !query || !query.hidePersonsModal], }), listeners(({ actions, values }) => ({