Skip to content

: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.

fix(data-warehouse): size the source-icon loading placeholder (#83551)

Tom Owersce7c2fef13f7
diff --git a/products/data_warehouse/frontend/shared/components/SourceIcon.tsx b/products/data_warehouse/frontend/shared/components/SourceIcon.tsx
index 55dae0b027a8..bf11a0b4642c 100644
--- a/products/data_warehouse/frontend/shared/components/SourceIcon.tsx
+++ b/products/data_warehouse/frontend/shared/components/SourceIcon.tsx
@@ -141,16 +141,23 @@ export function SourceIcon({
return component ?? null
}, [availableSources, engine, type])
+ const sizePx = sizePxProps ?? SIZE_PX_MAP[size]
+
if (availableSourcesLoading || !availableSources) {
- return <LemonSkeleton />
+ // A bare LemonSkeleton defaults to w-full, so it balloons to fill its container while the
+ // source configs load. Constrain it to the icon's footprint so the placeholder matches.
+ return (
+ // eslint-disable-next-line react/forbid-dom-props
+ <div className="shrink-0" style={{ width: sizePx, height: sizePx }}>
+ <LemonSkeleton className="w-full h-full rounded" />
+ </div>
+ )
}
if (!icon) {
return null
}
- const sizePx = sizePxProps ?? SIZE_PX_MAP[size]
-
if (disableTooltip) {
return (
<div className="flex gap-4 items-center">