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(experiments): remove double border under the breakdown results table (#123806)

Juraj Majerik6b3aedd52fd3
diff --git a/frontend/src/scenes/experiments/MetricsView/new/MetricRowGroup.tsx b/frontend/src/scenes/experiments/MetricsView/new/MetricRowGroup.tsx
index abffba825735..6a92af48c1a2 100644
--- a/frontend/src/scenes/experiments/MetricsView/new/MetricRowGroup.tsx
+++ b/frontend/src/scenes/experiments/MetricsView/new/MetricRowGroup.tsx
@@ -186,9 +186,12 @@ function CollapsibleBreakdownSection({
<div className="p-0 -m-4">
<table ref={nestedTableRef} className="w-full">
<tbody>
- {breakdownResults.map((breakdownResult) => {
+ {breakdownResults.map((breakdownResult, breakdownIndex) => {
const baselineResult = breakdownResult.baseline
const variantResults = breakdownResult.variants || []
+ // The wrapping cell already draws the bottom border, so the last group must not add its own
+ const isLastBreakdown =
+ breakdownIndex === breakdownResults.length - 1
if (variantResults.length === 0) {
return (
@@ -245,7 +248,7 @@ function CollapsibleBreakdownSection({
style={FIXED_HEIGHT_STYLE}
>
<td
- className={`w-1/5 border-r p-3 align-top border-b ${isAlternatingRow ? 'bg-bg-table' : 'bg-bg-light'} text-xs`}
+ className={`w-1/5 border-r p-3 align-top ${isLastBreakdown ? '' : 'border-b'} ${isAlternatingRow ? 'bg-bg-table' : 'bg-bg-light'} text-xs`}
rowSpan={totalRows}
// eslint-disable-next-line react/forbid-dom-props
style={totalRowsHeightStyle}
@@ -345,7 +348,8 @@ function CollapsibleBreakdownSection({
{variantResults.map(
(variant: ExperimentVariantResult, index: number) => {
const isLastRow =
- index === variantResults.length - 1
+ index === variantResults.length - 1 &&
+ !isLastBreakdown
const significant = isSignificant(variant)
const deltaPositive = isDeltaPositive(variant)
const winning = isWinning(variant, metric.goal)