: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
fix(experiments): wrap loading states on narrow screens (#123414)
Juraj Majerik17a8c99efe2f
diff --git a/frontend/src/scenes/experiments/MetricsView/shared/MetricRetryState.tsx b/frontend/src/scenes/experiments/MetricsView/shared/MetricRetryState.tsxindex 5cb4c20126c9..2844a95a3807 100644--- a/frontend/src/scenes/experiments/MetricsView/shared/MetricRetryState.tsx+++ b/frontend/src/scenes/experiments/MetricsView/shared/MetricRetryState.tsx@@ -67,11 +67,11 @@ export function MetricRetryDetails({ retry, className }: { retry: MetricRetryInf{retry.message}</div>)}- <div className="text-muted text-xs">+ <div className="text-muted text-xs whitespace-nowrap">{/* `countdown` is rewritten every second. Left bare it is a text node React tracks,so once a page-translation extension replaces it with a <font> element thecountdown freezes at the translated value (react#11538). */}- Retry {retry.attempt} of {retry.max_attempts} · next attempt <span translate="no">{countdown}</span> ·{' '}+ Retry {retry.attempt} of {retry.max_attempts} · next attempt <span translate="no">{countdown}</span>{/* <Link to={RECALCULATION_RETRY_DOCS_URL} target="_blank">Why do we retry?</Link> */}@@ -82,7 +82,7 @@ export function MetricRetryDetails({ retry, className }: { retry: MetricRetryInfexport function MetricRetryState({ retry }: { retry: MetricRetryInfo }): JSX.Element {return (- <div className="flex h-full items-center justify-center px-3">+ <div className="flex h-full min-w-72 items-center justify-center px-3"><MetricRetryDetails retry={retry} className="items-center text-center" /></div>)diff --git a/frontend/src/scenes/experiments/MetricsView/shared/RecalculationStatus.tsx b/frontend/src/scenes/experiments/MetricsView/shared/RecalculationStatus.tsxindex 52b1d0278079..b797fedd9b6a 100644--- a/frontend/src/scenes/experiments/MetricsView/shared/RecalculationStatus.tsx+++ b/frontend/src/scenes/experiments/MetricsView/shared/RecalculationStatus.tsx@@ -70,11 +70,13 @@ function InFlightStatus({const pending = Math.max(0, total - succeeded - failed - retryingCount)return (<StatusBar>- <span className="flex items-center gap-1.5 whitespace-nowrap">+ <span className="flex flex-wrap items-center gap-x-1.5 gap-y-0.5"><Spinner textColored className="text-sm text-accent" /><CountsSegment pending={pending} retrying={retryingCount} succeeded={succeeded} failed={failed} />- {retryingCount > 0 && <span className="text-muted text-xs">· next retry {nextRetryLabel}</span>}- <span className="text-muted text-xs">· running in the background</span>+ {retryingCount > 0 && (+ <span className="text-muted text-xs whitespace-nowrap">· next retry {nextRetryLabel}</span>+ )}+ <span className="text-muted text-xs whitespace-nowrap">· running in the background</span><Tooltip title="We're computing each metric against the latest data. This runs server-side so you can leave this page; results appear as each metric finishes."><IconInfo className="text-muted text-xs" /></Tooltip>@@ -148,9 +150,9 @@ function CountsSegment({)}return (- <span className="flex items-center gap-1 whitespace-nowrap font-medium">+ <span className="flex flex-wrap items-center gap-1 font-medium">{parts.map((part, i) => (- <span key={part.key} className="flex items-center gap-1">+ <span key={part.key} className="flex items-center gap-1 whitespace-nowrap">{i > 0 && <span>·</span>}{part}</span>