- {title &&
{title}
}
- {action}
+ {(title || action || description) && (
+
+ {(title || action) && (
+
+ {title &&
{title}
}
+ {action}
+
+ )}
+ {description && (
+
{description}
+ )}
)}
{children}
diff --git a/frontend/web/components/experiments/VariationTable/VariationTable.scss b/frontend/web/components/experiments/VariationTable/VariationTable.scss
index c8293a23db8c..586f23b3a796 100644
--- a/frontend/web/components/experiments/VariationTable/VariationTable.scss
+++ b/frontend/web/components/experiments/VariationTable/VariationTable.scss
@@ -19,7 +19,6 @@
letter-spacing: 0.02em;
&--name,
- &--desc,
&--value {
flex: 1;
}
@@ -48,12 +47,6 @@
white-space: nowrap;
}
- &--desc {
- flex: 1;
- min-width: 0;
- word-break: break-word;
- }
-
&--value {
flex: 1;
min-width: 0;
@@ -75,12 +68,6 @@
border-radius: var(--radius-sm);
}
- &__desc-text {
- font-size: var(--font-body-sm-size);
- color: var(--color-text-secondary);
- line-height: 1.4;
- }
-
&__value-badge {
display: inline-block;
font-family: var(--font-family);
diff --git a/frontend/web/components/experiments/VariationTable/VariationTable.tsx b/frontend/web/components/experiments/VariationTable/VariationTable.tsx
index 1f2150af8d9b..84e5b45dbb3b 100644
--- a/frontend/web/components/experiments/VariationTable/VariationTable.tsx
+++ b/frontend/web/components/experiments/VariationTable/VariationTable.tsx
@@ -1,6 +1,7 @@
import { FC } from 'react'
import { MultivariateOption } from 'common/types/responses'
import ColorSwatch from 'components/ColorSwatch'
+import { getDefaultVariantKey } from 'common/utils/multivariate'
import { colorTextAction, colorTextSuccess } from 'common/theme/tokens'
import './VariationTable.scss'
@@ -9,16 +10,6 @@ type VariationTableProps = {
variations: MultivariateOption[]
}
-const getVariantLetter = (index: number): string => {
- let result = ''
- let n = index
- do {
- result = String.fromCharCode(65 + (n % 26)) + result
- n = Math.floor(n / 26) - 1
- } while (n >= 0)
- return result
-}
-
const getVariationValue = (mv: MultivariateOption) => {
if (mv.type === 'unicode') return mv.string_value
if (mv.type === 'int') return String(mv.integer_value ?? '')
@@ -36,9 +27,6 @@ const VariationTable: FC
= ({
Name
-
- Description
-
Value
@@ -50,11 +38,6 @@ const VariationTable: FC = ({
Control
control