From c5c8c0e49165c53c76fa16c73dfd62194718abf9 Mon Sep 17 00:00:00 2001 From: Paul Marbach Date: Thu, 26 Jun 2025 09:53:27 -0500 Subject: [PATCH] Revert "ToolTip: Fix flexbox bug with tooltip when `maxWidth` is set manually (#107145)" This reverts commit cff743fcd56a2cf17b6e2e640dd6ffb53e8eba07. --- .../components/VizTooltip/VizTooltipColorIndicator.tsx | 2 -- .../src/components/VizTooltip/VizTooltipRow.tsx | 9 +-------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/grafana-ui/src/components/VizTooltip/VizTooltipColorIndicator.tsx b/packages/grafana-ui/src/components/VizTooltip/VizTooltipColorIndicator.tsx index 023bebe4048..34c251eee13 100644 --- a/packages/grafana-ui/src/components/VizTooltip/VizTooltipColorIndicator.tsx +++ b/packages/grafana-ui/src/components/VizTooltip/VizTooltipColorIndicator.tsx @@ -56,11 +56,9 @@ export const VizTooltipColorIndicator = ({ const getStyles = (theme: GrafanaTheme2) => ({ leading: css({ marginRight: theme.spacing(0.5), - flex: 'none', }), trailing: css({ marginLeft: theme.spacing(0.5), - flex: 'none', }), value: css({ width: '12px', diff --git a/packages/grafana-ui/src/components/VizTooltip/VizTooltipRow.tsx b/packages/grafana-ui/src/components/VizTooltip/VizTooltipRow.tsx index 7710ac641bd..19d0bed7874 100644 --- a/packages/grafana-ui/src/components/VizTooltip/VizTooltipRow.tsx +++ b/packages/grafana-ui/src/components/VizTooltip/VizTooltipRow.tsx @@ -130,7 +130,7 @@ export const VizTooltipRow = ({ return (
{(color || label) && ( -
+
{color && colorPlacement === ColorPlacement.first && ( )} @@ -222,12 +222,6 @@ const getStyles = (theme: GrafanaTheme2, justify: string, marginRight: string) = overflow: 'hidden', marginRight: theme.spacing(2), }), - labelWrapper: css({ - display: 'flex', - alignItems: 'center', - flex: '2', - minWidth: 0, - }), value: css({ fontWeight: 500, textOverflow: 'ellipsis', @@ -236,7 +230,6 @@ const getStyles = (theme: GrafanaTheme2, justify: string, marginRight: string) = valueWrapper: css({ display: 'flex', alignItems: 'center', - flex: '1', }), activeSeries: css({ fontWeight: theme.typography.fontWeightBold,