: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(experiments): clean up the recalculation times picker (#109152)
Juraj Majerikda37d0a85bba
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 9b6814764270..fc9c8a65bd71 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -12171,9 +12171,9 @@ snapshots:scenes-app-settings-environment--settings-environment-experiments--light:hash: v1.k794b7964.50405eeca5576a2c771427b596d742f2925f63e17bc96558f7969c65469fac79.yoc74JSxnEwjvd8Qneqn2pDzNMKiG5sx1D6LGwoe1Wkscenes-app-settings-environment--settings-environment-experiments-multiple-recalculation-times--dark:- hash: v1.k794b7964.5b034a5effb472ad3ef818ec75b6b9506e70d95810aac035050535713157e1d6.8do5WxsjD00LvHsn752lDv_sH9FdxOYyPZM7AUzdDqk+ hash: v1.k794b7964.abb4dd1a852e9385f2e8cafdf2c4d2ce4de190264a5e1ff0b2c292c3f63d5e46.PY-FpIqembu2873Ap2oLLqhLSD4ztD-YIQF-ZsLjwpsscenes-app-settings-environment--settings-environment-experiments-multiple-recalculation-times--light:- hash: v1.k794b7964.fb1bcb78d3098e7ab06fdbf1c2f1902049de9030d3769520e78851d3c96b7b24.VhR7GZo9z3_d4yiKMeBu2-54QRDyq_8jIOqlZFwDG_s+ hash: v1.k794b7964.89e10068373a18cea80e0291f91987548f10ef0249832e2b9af526f20d3e036f.yHfM1hYyfc5Ab9jOUF9W4syLXhycaRFAGLZkquZVQ9sscenes-app-settings-environment--settings-environment-feature-flags--dark:hash: v1.k794b7964.f542dc208f8caacdc2978c3e17d6c077d299f4896b6acf1b0cbe51eb1e7e2f34.KnYG2YFjexeGzYr2iZlQmND2MXxJXDH3G9_vOeCMy84scenes-app-settings-environment--settings-environment-feature-flags--light:diff --git a/frontend/src/scenes/settings/SettingsMap.tsx b/frontend/src/scenes/settings/SettingsMap.tsxindex 723e825d0264..a2a04603bd52 100644--- a/frontend/src/scenes/settings/SettingsMap.tsx+++ b/frontend/src/scenes/settings/SettingsMap.tsx@@ -132,6 +132,7 @@ import { MarketingAnalyticsSettingsWrapper } from './environment/MarketingAnalytimport MCPServerSettings from './environment/MCPServerSettings'import { PathCleaningFiltersConfig } from './environment/PathCleaningFiltersConfig'import { PersonDisplayNameProperties } from './environment/PersonDisplayNameProperties'+import { ProjectTimezoneName } from './environment/ProjectTimezoneName'import { ReplayIntegrations } from './environment/ReplayIntegrations'import { SDKSetupInstructions } from './environment/SDKSetupInstructions'import {@@ -730,7 +731,14 @@ export const SETTINGS_MAP: SettingSection[] = [{id: 'environment-experiment-recalculation-time',title: 'Daily recalculation time',- description:+ description: (+ <>+ Select the time of day when experiment metrics should be recalculated. This time is in your+ project's timezone (<ProjectTimezoneName />+ ).+ </>+ ),+ searchDescription:"Select the time of day when experiment metrics should be recalculated. This time is in your project's timezone.",component: <ExperimentRecalculationTime />,keywords: ['schedule', 'refresh', 'update', 'time'],@@ -739,7 +747,14 @@ export const SETTINGS_MAP: SettingSection[] = [{id: 'environment-experiment-recalculation-time',title: 'Daily recalculation times',- description:+ description: (+ <>+ Select up to two times of day when experiment metrics should be recalculated, at least 6 hours+ apart. Times are in your project's timezone (<ProjectTimezoneName />+ ).+ </>+ ),+ searchDescription:"Select up to two times of day when experiment metrics should be recalculated, at least 6 hours apart. Times are in your project's timezone.",component: <ExperimentRecalculationTime />,keywords: ['schedule', 'refresh', 'update', 'time'],diff --git a/frontend/src/scenes/settings/environment/ExperimentRecalculationTime.tsx b/frontend/src/scenes/settings/environment/ExperimentRecalculationTime.tsxindex be67f666d625..5d8e9756276c 100644--- a/frontend/src/scenes/settings/environment/ExperimentRecalculationTime.tsx+++ b/frontend/src/scenes/settings/environment/ExperimentRecalculationTime.tsx@@ -86,7 +86,7 @@ export function ExperimentRecalculationTime(): JSX.Element {}return (- <div className="flex items-center gap-2">+ <div className="flex flex-col items-start gap-2"><LemonSelectvalue={utcHourFromTimeString(times[0]).toString()}onChange={(value) => handleTimeChange(0, value)}@@ -97,7 +97,7 @@ export function ExperimentRecalculationTime(): JSX.Element {/>{allowSecondTime &&(times.length > 1 ? (- <>+ <div className="flex items-center gap-1"><LemonSelectvalue={utcHourFromTimeString(times[1]).toString()}onChange={(value) => handleTimeChange(1, value)}@@ -113,7 +113,7 @@ export function ExperimentRecalculationTime(): JSX.Element {tooltip="Remove second time"data-attr="team-experiment-remove-second-recalculation-time"/>- </>+ </div>) : (<LemonButtontype="tertiary"diff --git a/frontend/src/scenes/settings/environment/ProjectTimezoneName.tsx b/frontend/src/scenes/settings/environment/ProjectTimezoneName.tsxnew file mode 100644index 000000000000..ef3cce07fe90--- /dev/null+++ b/frontend/src/scenes/settings/environment/ProjectTimezoneName.tsx@@ -0,0 +1,8 @@+import { useValues } from 'kea'++import { teamLogic } from '~/scenes/teamLogic'++export function ProjectTimezoneName(): JSX.Element {+ const { timezone } = useValues(teamLogic)+ return <span translate="no">{timezone}</span>+}