: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 shared trends helpers to viz/shared/ (#58025)
Sam Penningtonbde9c1e418d8
diff --git a/frontend/src/scenes/trends/viz/trends-line-chart/AnnotationsLayer.tsx b/frontend/src/scenes/trends/viz/shared/AnnotationsLayer.tsxsimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/AnnotationsLayer.tsxrename to frontend/src/scenes/trends/viz/shared/AnnotationsLayer.tsxdiff --git a/frontend/src/scenes/trends/viz/trends-line-chart/TrendsAlertOverlays.tsx b/frontend/src/scenes/trends/viz/shared/TrendsAlertOverlays.tsxsimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/TrendsAlertOverlays.tsxrename to frontend/src/scenes/trends/viz/shared/TrendsAlertOverlays.tsxdiff --git a/frontend/src/scenes/trends/viz/trends-line-chart/TrendsTooltip.tsx b/frontend/src/scenes/trends/viz/shared/TrendsTooltip.tsxsimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/TrendsTooltip.tsxrename to frontend/src/scenes/trends/viz/shared/TrendsTooltip.tsxdiff --git a/frontend/src/scenes/trends/viz/trends-line-chart/anomalyPointsAdapter.test.ts b/frontend/src/scenes/trends/viz/shared/anomalyPointsAdapter.test.tssimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/anomalyPointsAdapter.test.tsrename to frontend/src/scenes/trends/viz/shared/anomalyPointsAdapter.test.tsdiff --git a/frontend/src/scenes/trends/viz/trends-line-chart/anomalyPointsAdapter.ts b/frontend/src/scenes/trends/viz/shared/anomalyPointsAdapter.tssimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/anomalyPointsAdapter.tsrename to frontend/src/scenes/trends/viz/shared/anomalyPointsAdapter.tsdiff --git a/frontend/src/scenes/trends/viz/trends-line-chart/goalLinesAdapter.test.ts b/frontend/src/scenes/trends/viz/shared/goalLinesAdapter.test.tssimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/goalLinesAdapter.test.tsrename to frontend/src/scenes/trends/viz/shared/goalLinesAdapter.test.tsdiff --git a/frontend/src/scenes/trends/viz/trends-line-chart/goalLinesAdapter.ts b/frontend/src/scenes/trends/viz/shared/goalLinesAdapter.tssimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/goalLinesAdapter.tsrename to frontend/src/scenes/trends/viz/shared/goalLinesAdapter.tsdiff --git a/frontend/src/scenes/trends/viz/trends-line-chart/trendsAxisFormat.test.ts b/frontend/src/scenes/trends/viz/shared/trendsAxisFormat.test.tssimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/trendsAxisFormat.test.tsrename to frontend/src/scenes/trends/viz/shared/trendsAxisFormat.test.tsdiff --git a/frontend/src/scenes/trends/viz/trends-line-chart/trendsAxisFormat.ts b/frontend/src/scenes/trends/viz/shared/trendsAxisFormat.tssimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/trendsAxisFormat.tsrename to frontend/src/scenes/trends/viz/shared/trendsAxisFormat.tsdiff --git a/frontend/src/scenes/trends/viz/trends-line-chart/trendsSeriesMeta.ts b/frontend/src/scenes/trends/viz/shared/trendsSeriesMeta.tssimilarity index 100%rename from frontend/src/scenes/trends/viz/trends-line-chart/trendsSeriesMeta.tsrename to frontend/src/scenes/trends/viz/shared/trendsSeriesMeta.tsdiff --git a/frontend/src/scenes/trends/viz/trends-bar-chart/TrendsBarChart.tsx b/frontend/src/scenes/trends/viz/trends-bar-chart/TrendsBarChart.tsxindex 31a12f205d9a..65cf2dfc5864 100644--- a/frontend/src/scenes/trends/viz/trends-bar-chart/TrendsBarChart.tsx+++ b/frontend/src/scenes/trends/viz/trends-bar-chart/TrendsBarChart.tsx@@ -27,12 +27,12 @@ import { openPersonsModal } from '../../persons-modal/PersonsModal'import { trendsDataLogic } from '../../trendsDataLogic'import type { IndexedTrendResult } from '../../types'import { handleTrendsChartClick, type TrendsChartClickDeps } from '../handleTrendsChartClick'-import { AnnotationsLayer } from '../trends-line-chart/AnnotationsLayer'-import { goalLinesToReferenceLines } from '../trends-line-chart/goalLinesAdapter'-import { TrendsAlertOverlays } from '../trends-line-chart/TrendsAlertOverlays'-import { trendsFilterToYFormatterConfig } from '../trends-line-chart/trendsAxisFormat'-import type { TrendsSeriesMeta } from '../trends-line-chart/trendsSeriesMeta'-import { TrendsTooltip } from '../trends-line-chart/TrendsTooltip'+import { AnnotationsLayer } from '../shared/AnnotationsLayer'+import { goalLinesToReferenceLines } from '../shared/goalLinesAdapter'+import { TrendsAlertOverlays } from '../shared/TrendsAlertOverlays'+import { trendsFilterToYFormatterConfig } from '../shared/trendsAxisFormat'+import type { TrendsSeriesMeta } from '../shared/trendsSeriesMeta'+import { TrendsTooltip } from '../shared/TrendsTooltip'import { handleTrendsBarAggregatedChartClick } from './handleTrendsBarAggregatedChartClick'import { buildTrendsBarAggregatedSeries, buildTrendsBarTimeSeries } from './trendsBarChartTransforms'diff --git a/frontend/src/scenes/trends/viz/trends-line-chart/TrendsLineChart.tsx b/frontend/src/scenes/trends/viz/trends-line-chart/TrendsLineChart.tsxindex 98559096cfc2..b748c73eabbd 100644--- a/frontend/src/scenes/trends/viz/trends-line-chart/TrendsLineChart.tsx+++ b/frontend/src/scenes/trends/viz/trends-line-chart/TrendsLineChart.tsx@@ -20,13 +20,13 @@ import { openPersonsModal } from '../../persons-modal/PersonsModal'import { trendsDataLogic } from '../../trendsDataLogic'import type { IndexedTrendResult } from '../../types'import { handleTrendsChartClick } from '../handleTrendsChartClick'-import { AnnotationsLayer } from './AnnotationsLayer'-import { schemaGoalLinesToConfigs } from './goalLinesAdapter'-import { TrendsAlertOverlays } from './TrendsAlertOverlays'-import { buildTrendsYAxisConfig } from './trendsAxisFormat'+import { AnnotationsLayer } from '../shared/AnnotationsLayer'+import { schemaGoalLinesToConfigs } from '../shared/goalLinesAdapter'+import { TrendsAlertOverlays } from '../shared/TrendsAlertOverlays'+import { buildTrendsYAxisConfig } from '../shared/trendsAxisFormat'+import type { TrendsSeriesMeta } from '../shared/trendsSeriesMeta'+import { TrendsTooltip } from '../shared/TrendsTooltip'import { buildDerivedConfigs, buildTrendsSeries } from './trendsChartTransforms'-import type { TrendsSeriesMeta } from './trendsSeriesMeta'-import { TrendsTooltip } from './TrendsTooltip'interface TrendsLineChartProps {context?: QueryContext<InsightVizNode>