:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(insights): move retention bar/line charts into product_analytics (#59781)
Sam Penningtonc7e716fae7ab
diff --git a/frontend/src/scenes/retention/RetentionGraph.tsx b/frontend/src/scenes/retention/RetentionGraph.tsxindex f73beab71a5a..bb2ec33f861d 100644--- a/frontend/src/scenes/retention/RetentionGraph.tsx+++ b/frontend/src/scenes/retention/RetentionGraph.tsx@@ -8,12 +8,13 @@ import { insightLogic } from 'scenes/insights/insightLogic'import { TrendsFilter } from '~/queries/schema/schema-general'import { ChartDisplayType, GraphDataset, GraphType } from '~/types'+import { RetentionBarChart } from 'products/product_analytics/frontend/insights/retention/RetentionBarChart/RetentionBarChart'+import { RetentionLineChart } from 'products/product_analytics/frontend/insights/retention/RetentionLineChart/RetentionLineChart'+import { InsightEmptyState } from '../insights/EmptyStates'import { LineGraph } from '../insights/views/LineGraph/LineGraph'import { retentionGraphLogic } from './retentionGraphLogic'import { retentionModalLogic } from './retentionModalLogic'-import { RetentionBarChart } from './viz/retention-bar-chart/RetentionBarChart'-import { RetentionLineChart } from './viz/retention-line-chart/RetentionLineChart'interface RetentionGraphProps {inSharedMode?: booleandiff --git a/frontend/src/scenes/retention/viz/retention-bar-chart/RetentionBarChart.tsx b/products/product_analytics/frontend/insights/retention/RetentionBarChart/RetentionBarChart.tsxsimilarity index 97%rename from frontend/src/scenes/retention/viz/retention-bar-chart/RetentionBarChart.tsxrename to products/product_analytics/frontend/insights/retention/RetentionBarChart/RetentionBarChart.tsxindex 74b66331dea1..5529e258d62a 100644--- a/frontend/src/scenes/retention/viz/retention-bar-chart/RetentionBarChart.tsx+++ b/products/product_analytics/frontend/insights/retention/RetentionBarChart/RetentionBarChart.tsx@@ -7,14 +7,14 @@ import { TimeSeriesBarChart } from 'lib/hog-charts'import type { PointClickData, TooltipConfig, TooltipContext } from 'lib/hog-charts'import { insightLogic } from 'scenes/insights/insightLogic'import type { SeriesDatum } from 'scenes/insights/InsightTooltip/insightTooltipUtils'+import { retentionGraphLogic } from 'scenes/retention/retentionGraphLogic'+import { retentionModalLogic } from 'scenes/retention/retentionModalLogic'import { themeLogic } from '~/layout/navigation-3000/themeLogic'import { groupsModel } from '~/models/groupsModel'import type { GoalLine } from '~/queries/schema/schema-general'import type { GroupTypeIndex, LabelGroupType } from '~/types'-import { retentionGraphLogic } from '../../retentionGraphLogic'-import { retentionModalLogic } from '../../retentionModalLogic'import {buildRetentionBarChartConfig,buildRetentionSeries,diff --git a/frontend/src/scenes/retention/viz/retention-line-chart/RetentionLineChart.tsx b/products/product_analytics/frontend/insights/retention/RetentionLineChart/RetentionLineChart.tsxsimilarity index 97%rename from frontend/src/scenes/retention/viz/retention-line-chart/RetentionLineChart.tsxrename to products/product_analytics/frontend/insights/retention/RetentionLineChart/RetentionLineChart.tsxindex c12fd036b8e2..7f2ac9ad189d 100644--- a/frontend/src/scenes/retention/viz/retention-line-chart/RetentionLineChart.tsx+++ b/products/product_analytics/frontend/insights/retention/RetentionLineChart/RetentionLineChart.tsx@@ -7,14 +7,14 @@ import { TimeSeriesLineChart } from 'lib/hog-charts'import type { PointClickData, TooltipConfig, TooltipContext } from 'lib/hog-charts'import { insightLogic } from 'scenes/insights/insightLogic'import type { SeriesDatum } from 'scenes/insights/InsightTooltip/insightTooltipUtils'+import { retentionGraphLogic } from 'scenes/retention/retentionGraphLogic'+import { retentionModalLogic } from 'scenes/retention/retentionModalLogic'import { themeLogic } from '~/layout/navigation-3000/themeLogic'import { groupsModel } from '~/models/groupsModel'import type { GoalLine } from '~/queries/schema/schema-general'import type { GroupTypeIndex, LabelGroupType } from '~/types'-import { retentionGraphLogic } from '../../retentionGraphLogic'-import { retentionModalLogic } from '../../retentionModalLogic'import {buildRetentionLineChartConfig,buildRetentionSeries,diff --git a/frontend/src/scenes/retention/viz/shared/RetentionTooltip.tsx b/products/product_analytics/frontend/insights/retention/shared/RetentionTooltip.tsxsimilarity index 100%rename from frontend/src/scenes/retention/viz/shared/RetentionTooltip.tsxrename to products/product_analytics/frontend/insights/retention/shared/RetentionTooltip.tsxdiff --git a/frontend/src/scenes/retention/viz/shared/retentionChartTransforms.test.ts b/products/product_analytics/frontend/insights/retention/shared/retentionChartTransforms.test.tssimilarity index 100%rename from frontend/src/scenes/retention/viz/shared/retentionChartTransforms.test.tsrename to products/product_analytics/frontend/insights/retention/shared/retentionChartTransforms.test.tsdiff --git a/frontend/src/scenes/retention/viz/shared/retentionChartTransforms.ts b/products/product_analytics/frontend/insights/retention/shared/retentionChartTransforms.tssimilarity index 98%rename from frontend/src/scenes/retention/viz/shared/retentionChartTransforms.tsrename to products/product_analytics/frontend/insights/retention/shared/retentionChartTransforms.tsindex ee7c5e393d08..25382a6648dd 100644--- a/frontend/src/scenes/retention/viz/shared/retentionChartTransforms.ts+++ b/products/product_analytics/frontend/insights/retention/shared/retentionChartTransforms.ts@@ -6,13 +6,12 @@ import type {TooltipConfig,TrendLineConfig,} from 'lib/hog-charts'+import type { RetentionTrendPayload } from 'scenes/retention/types'import type { GoalLine as SchemaGoalLine } from '~/queries/schema/schema-general'import { schemaGoalLinesToConfigs } from 'products/product_analytics/frontend/insights/trends/shared/goalLinesAdapter'-import type { RetentionTrendPayload } from '../../types'-// `retentionGraphLogic.trendSeries` spreads `cohortRetention` onto each entry, so the// runtime shape includes a cohort `label` field that the declared type doesn't list.export type RetentionTrendSeriesEntry = RetentionTrendPayload & { label?: string }