: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(frontend): center loading spinners that used mx-auto (#119338)
Paul D'Ambrae0f80ece04c2
diff --git a/frontend/src/queries/nodes/InsightViz/InsightVizDisplay.tsx b/frontend/src/queries/nodes/InsightViz/InsightVizDisplay.tsxindex c62a772b25e7..a06f90598b8b 100644--- a/frontend/src/queries/nodes/InsightViz/InsightVizDisplay.tsx+++ b/frontend/src/queries/nodes/InsightViz/InsightVizDisplay.tsx@@ -442,7 +442,13 @@ export function InsightVizDisplay({return (<ChunkLoadErrorBoundary>{/* The image exporter waits for every .Spinner to detach, so a Spinner fallback stops it capturing the page before this chunk loads. */}- <Suspense fallback={<Spinner className="text-3xl mx-auto my-8" />}>+ <Suspense+ fallback={+ <div className="flex justify-center my-8">+ <Spinner className="text-3xl" />+ </div>+ }+ ><WebAnalyticsInsight context={context} editMode={editMode} /></Suspense></ChunkLoadErrorBoundary>diff --git a/frontend/src/scenes/project-homepage/ProjectHomepage.tsx b/frontend/src/scenes/project-homepage/ProjectHomepage.tsxindex 7a0761b99034..397d3b22cb13 100644--- a/frontend/src/scenes/project-homepage/ProjectHomepage.tsx+++ b/frontend/src/scenes/project-homepage/ProjectHomepage.tsx@@ -3,7 +3,7 @@ import './ProjectHomepage.scss'import { useValues } from 'kea'import { Suspense } from 'react'-import { Spinner } from 'lib/lemon-ui/Spinner'+import { SpinnerOverlay } from 'lib/lemon-ui/Spinner'import { lazyWithRetry } from 'lib/utils/retryImport'import { projectHomepageLogic } from 'scenes/project-homepage/projectHomepageLogic'import { SceneExport } from 'scenes/sceneTypes'@@ -22,7 +22,7 @@ export function ProjectHomepage(): JSX.Element {const { todayHomeEnabled } = useValues(projectHomepageLogic)return (<div className="flex-1 min-h-0">- <Suspense fallback={<Spinner className="text-3xl mx-auto my-8" />}>+ <Suspense fallback={<SpinnerOverlay sceneLevel />}>{todayHomeEnabled ? <TodayHome /> : <AiFirstHomepage />}</Suspense></div>diff --git a/products/ml_inference/frontend/DecisionPlaygroundScene.tsx b/products/ml_inference/frontend/DecisionPlaygroundScene.tsxindex db476271beb1..df28507228da 100644--- a/products/ml_inference/frontend/DecisionPlaygroundScene.tsx+++ b/products/ml_inference/frontend/DecisionPlaygroundScene.tsx@@ -85,7 +85,9 @@ export function DecisionPlaygroundScene(): JSX.Element {return receivedFeatureFlags || featureFlagsTimedOut ? (<NotFound object="page" />) : (- <Spinner className="text-3xl mx-auto my-8" />+ <div className="flex justify-center my-8">+ <Spinner className="text-3xl" />+ </div>)}diff --git a/products/notebooks/frontend/NotebookChangesNotice.tsx b/products/notebooks/frontend/NotebookChangesNotice.tsxindex 594e228e7485..594e87330d4b 100644--- a/products/notebooks/frontend/NotebookChangesNotice.tsx+++ b/products/notebooks/frontend/NotebookChangesNotice.tsx@@ -63,7 +63,13 @@ export function NotebookChangesNotice({className="max-h-[60vh] overflow-y-auto overflow-x-hidden break-words font-mono text-sm"data-attr="notebook-visit-diff">- <Suspense fallback={<Spinner className="text-2xl mx-auto my-4" />}>+ <Suspense+ fallback={+ <div className="flex justify-center my-4">+ <Spinner className="text-2xl" />+ </div>+ }+ ><MonacoDiffEditororiginal={previousVisit.markdown}modified={markdown}diff --git a/products/workflows/frontend/Workflows/suggestions/WorkflowSuggestionFieldDiff.tsx b/products/workflows/frontend/Workflows/suggestions/WorkflowSuggestionFieldDiff.tsxindex 94c79408ec85..8072a373f80e 100644--- a/products/workflows/frontend/Workflows/suggestions/WorkflowSuggestionFieldDiff.tsx+++ b/products/workflows/frontend/Workflows/suggestions/WorkflowSuggestionFieldDiff.tsx@@ -28,6 +28,12 @@ const DIFF_OPTIONS: MonacoDiffEditorProps['options'] = {},}+const diffSpinner = (+ <div className="flex justify-center my-4">+ <Spinner className="text-2xl" />+ </div>+)+function InlineValue({ value, side }: { value: unknown; side: 'before' | 'after' }): JSX.Element {if (value === undefined) {return <span className="text-secondary italic">Not set</span>@@ -122,7 +128,7 @@ export function WorkflowSuggestionFieldDiff({) : (<div ref={diffRef} className="border rounded overflow-hidden">{inView ? (- <Suspense fallback={<Spinner className="text-2xl mx-auto my-4" />}>+ <Suspense fallback={diffSpinner}><MonacoDiffEditororiginal={view.original}modified={view.modified}@@ -133,7 +139,7 @@ export function WorkflowSuggestionFieldDiff({/></Suspense>) : (- <Spinner className="text-2xl mx-auto my-4" />+ diffSpinner)}</div>)}