: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): show metric actions only on hover (#87952)
Juraj Majerik4bbbd684aa61
diff --git a/frontend/src/scenes/experiments/MetricsView/new/MetricRowGroup.tsx b/frontend/src/scenes/experiments/MetricsView/new/MetricRowGroup.tsxindex cbb17671601c..b1d0409e0be5 100644--- a/frontend/src/scenes/experiments/MetricsView/new/MetricRowGroup.tsx+++ b/frontend/src/scenes/experiments/MetricsView/new/MetricRowGroup.tsx@@ -783,7 +783,7 @@ export function MetricRowGroup({>{/* Metric column: real header spanning every variant row, stays interactive while loading */}<td- className={`w-1/5 border-r p-3 align-top text-left relative overflow-hidden ${+ className={`group/metric-cell w-1/5 border-r p-3 align-top text-left relative overflow-hidden ${!isLastMetric ? 'border-b' : ''} ${bg}`}rowSpan={skeletonVariantKeys.length}@@ -861,7 +861,7 @@ export function MetricRowGroup({>{/* Metric column - always visible */}<td- className={`w-1/5 border-r p-3 align-top text-left relative overflow-hidden ${+ className={`group/metric-cell w-1/5 border-r p-3 align-top text-left relative overflow-hidden ${!isLastMetric ? 'border-b' : ''} ${isAlternatingRow ? 'bg-bg-table' : 'bg-bg-light'}`}// eslint-disable-next-line react/forbid-dom-props@@ -977,7 +977,7 @@ export function MetricRowGroup({>{/* Metric column - with rowspan */}<td- className={`w-1/5 border-r p-3 align-top text-left relative overflow-hidden ${!isLastMetric ? 'border-b' : ''} ${isAlternatingRow ? 'bg-bg-table' : 'bg-bg-light'}`}+ className={`group/metric-cell w-1/5 border-r p-3 align-top text-left relative overflow-hidden ${!isLastMetric ? 'border-b' : ''} ${isAlternatingRow ? 'bg-bg-table' : 'bg-bg-light'}`}rowSpan={variantResults.length + 1}// eslint-disable-next-line react/forbid-dom-propsstyle={totalRowsHeightStyle}diff --git a/frontend/src/scenes/experiments/MetricsView/shared/MetricHeader.tsx b/frontend/src/scenes/experiments/MetricsView/shared/MetricHeader.tsxindex c8d0eb0765ce..9e1f687f43fc 100644--- a/frontend/src/scenes/experiments/MetricsView/shared/MetricHeader.tsx+++ b/frontend/src/scenes/experiments/MetricsView/shared/MetricHeader.tsx@@ -1,3 +1,4 @@+import clsx from 'clsx'import { useActions, useValues } from 'kea'import { useState } from 'react'@@ -264,7 +265,14 @@ export const MetricHeader = ({</div></div>{!readOnly && (- <div className="flex flex-shrink-0 gap-1">+ <div+ className={clsx(+ 'flex flex-shrink-0 gap-1 transition-opacity',+ menuVisible+ ? 'opacity-100'+ : 'opacity-0 group-hover/metric-cell:opacity-100 focus-within:opacity-100 pointer-coarse:opacity-100'+ )}+ ><LemonButtontype="tertiary"size="xsmall"