: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(web-analytics): mute precomputed badge color and stop metric tooltip leaking on hover (#59978)
Lucas Ricoyaa09c528d799
diff --git a/frontend/src/lib/components/PreAggregatedBadge/PreAggregatedBadge.tsx b/frontend/src/lib/components/PreAggregatedBadge/PreAggregatedBadge.tsxindex 8fe9bf22765a..0e428269a176 100644--- a/frontend/src/lib/components/PreAggregatedBadge/PreAggregatedBadge.tsx+++ b/frontend/src/lib/components/PreAggregatedBadge/PreAggregatedBadge.tsx@@ -19,7 +19,7 @@ const VARIANT_CONFIG: Record<},precomputed: {tooltip: 'Loaded from a pre-computed dataset',- iconClassName: 'text-success w-4 h-4',+ iconClassName: 'text-muted w-4 h-4',Icon: IconDatabaseBolt,},}diff --git a/frontend/src/queries/nodes/OverviewGrid/OverviewGrid.tsx b/frontend/src/queries/nodes/OverviewGrid/OverviewGrid.tsxindex b7f094789777..62efab4d66d5 100644--- a/frontend/src/queries/nodes/OverviewGrid/OverviewGrid.tsx+++ b/frontend/src/queries/nodes/OverviewGrid/OverviewGrid.tsx@@ -184,59 +184,70 @@ const OverviewItemCell = ({: 'No data'return (- <Tooltip title={tooltip}>- <div- className={clsx(- compact ? OVERVIEW_ITEM_CELL_CLASSES_COMPACT : OVERVIEW_ITEM_CELL_CLASSES_DEFAULT,- 'relative'- )}- >- {usedLazyPrecompute ? (- <PreAggregatedBadge variant="precomputed" />- ) : usedPreAggregatedTables ? (- <PreAggregatedBadge variant="preagg" />- ) : null}- <div className="flex flex-row w-full justify-center items-center gap-1">- <div className={`uppercase py-0.5 ${compact ? 'text-[10px]' : 'text-xs font-bold'}`}>{label}</div>- {item.warning && (- <Tooltip- interactive={!!item.warningLink}- title={- <div>- {item.warning}- {item.warningLink && (- <>- {' '}- <Link to={item.warningLink} className="text-link">- Learn more- </Link>- </>- )}- </div>- }- >- <IconWarning className="text-warning h-3.5 w-3.5 cursor-pointer" />- </Tooltip>+ <div+ className={clsx(+ 'flex-1 border bg-surface-primary rounded relative',+ compact ? 'min-w-[6rem] h-24' : 'min-w-[10rem] h-30'+ )}+ >+ {/* Rendered as a sibling of the Tooltip trigger so hovering the badge+ does not also surface the cell's metric tooltip. */}+ {usedLazyPrecompute ? (+ <PreAggregatedBadge variant="precomputed" />+ ) : usedPreAggregatedTables ? (+ <PreAggregatedBadge variant="preagg" />+ ) : null}+ <Tooltip title={tooltip}>+ <div+ className={clsx(+ 'flex flex-col items-center text-center justify-between w-full h-full',+ compact ? 'p-1' : 'p-2')}- </div>- <div className="w-full flex-1 flex items-center justify-center">- <div className={compact ? 'text-lg' : 'text-2xl'}>- {formatItem(item.value, item.kind, { currency: baseCurrency })}+ >+ <div className="flex flex-row w-full justify-center items-center gap-1">+ <div className={`uppercase py-0.5 ${compact ? 'text-[10px]' : 'text-xs font-bold'}`}>+ {label}+ </div>+ {item.warning && (+ <Tooltip+ interactive={!!item.warningLink}+ title={+ <div>+ {item.warning}+ {item.warningLink && (+ <>+ {' '}+ <Link to={item.warningLink} className="text-link">+ Learn more+ </Link>+ </>+ )}+ </div>+ }+ >+ <IconWarning className="text-warning h-3.5 w-3.5 cursor-pointer" />+ </Tooltip>+ )}</div>- </div>- {trend && isNotNil(item.changeFromPreviousPct) ? (- // eslint-disable-next-line react/forbid-dom-props- <div style={{ color: trend.color }}>- <trend.Icon color={trend.color} />- {formatPercentage(item.changeFromPreviousPct)}+ <div className="w-full flex-1 flex items-center justify-center">+ <div className={compact ? 'text-lg' : 'text-2xl'}>+ {formatItem(item.value, item.kind, { currency: baseCurrency })}+ </div></div>- ) : isNotNil(item.changeFromPreviousPct) && Math.abs(item.changeFromPreviousPct) >= 999999 ? (- <div className="text-muted">-</div>- ) : (- <div />- )}- </div>- </Tooltip>+ {trend && isNotNil(item.changeFromPreviousPct) ? (+ // eslint-disable-next-line react/forbid-dom-props+ <div style={{ color: trend.color }}>+ <trend.Icon color={trend.color} />+ {formatPercentage(item.changeFromPreviousPct)}+ </div>+ ) : isNotNil(item.changeFromPreviousPct) && Math.abs(item.changeFromPreviousPct) >= 999999 ? (+ <div className="text-muted">-</div>+ ) : (+ <div />+ )}+ </div>+ </Tooltip>+ </div>)}