: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
feat(insights): deprecation notice on trends insights using hide weekends (#78748)
Sam Pennington1a1922e27c3e
diff --git a/frontend/src/queries/nodes/InsightViz/InsightVizDisplay.tsx b/frontend/src/queries/nodes/InsightViz/InsightVizDisplay.tsxindex 0b079f2472f5..88cd0eb1983e 100644--- a/frontend/src/queries/nodes/InsightViz/InsightVizDisplay.tsx+++ b/frontend/src/queries/nodes/InsightViz/InsightVizDisplay.tsx@@ -10,6 +10,7 @@ import { dashboardLogic } from 'scenes/dashboard/dashboardLogic'import { Funnel } from 'scenes/funnels/Funnel'import { FunnelCanvasLabel } from 'scenes/funnels/FunnelCanvasLabel'import { funnelDataLogic } from 'scenes/funnels/funnelDataLogic'+import { HideWeekendsDeprecationNotice } from 'scenes/insights/EditorFilters/HideWeekendsDeprecationNotice'import {BoxPlotMissingPropertyState,FunnelDataWarehouseStepIncompleteState,@@ -506,6 +507,7 @@ export function InsightVizDisplay({data-attr="insights-graph">{disableHeader ? null : <InsightDisplayConfig />}+ {!embedded && <HideWeekendsDeprecationNotice insightProps={insightProps} />}{showingResults && (<>{!embedded &&diff --git a/frontend/src/scenes/insights/EditorFilters/HideWeekendsDeprecationNotice.tsx b/frontend/src/scenes/insights/EditorFilters/HideWeekendsDeprecationNotice.tsxnew file mode 100644index 000000000000..be65040632e0--- /dev/null+++ b/frontend/src/scenes/insights/EditorFilters/HideWeekendsDeprecationNotice.tsx@@ -0,0 +1,23 @@+import { useValues } from 'kea'++import { LemonBanner } from '@posthog/lemon-ui'++import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic'++import { EditorFilterProps } from '~/types'++export function HideWeekendsDeprecationNotice({ insightProps }: EditorFilterProps): JSX.Element | null {+ const { trendsFilter } = useValues(insightVizDataLogic(insightProps))++ if (!trendsFilter?.hideWeekends) {+ return null+ }++ return (+ <LemonBanner type="info" dismissKey="hide-weekends-deprecation-notice" className="m-2">+ The "Hide weekend data" option is being replaced by day-of-week exclusions in the date filter. They work a+ little differently: hiding weekends keeps weekend data in the calculation, excluding them leaves it out, so+ some numbers can differ.+ </LemonBanner>+ )+}