From 76eb9ab406fa6adb45a5783c4235b313e91d21b6 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Fri, 9 Feb 2024 15:26:30 +0100 Subject: [PATCH] [Lens][color mapping] hide single color picker in loop mode (#176564) ## Summary This PR hides the single color picker when the color palette is selected in the button group as agreed with @MichaelMarcialis and @stratoula (initial conversation here https://github.com/elastic/kibana/pull/175144 followed by an offline one) From this: Screenshot 2024-02-09 at 09 20 37 To this: Screenshot 2024-02-09 at 09 19 51 Screenshot 2024-02-09 at 09 19 48 --- .../container/unassigned_terms_config.tsx | 52 +++++++------------ 1 file changed, 18 insertions(+), 34 deletions(-) diff --git a/packages/kbn-coloring/src/shared_components/color_mapping/components/container/unassigned_terms_config.tsx b/packages/kbn-coloring/src/shared_components/color_mapping/components/container/unassigned_terms_config.tsx index 8e90bcc38d119..405437a34e35b 100644 --- a/packages/kbn-coloring/src/shared_components/color_mapping/components/container/unassigned_terms_config.tsx +++ b/packages/kbn-coloring/src/shared_components/color_mapping/components/container/unassigned_terms_config.tsx @@ -11,7 +11,6 @@ import React from 'react'; import { EuiButtonGroup, EuiButtonGroupOptionProps, - EuiColorPickerSwatch, EuiFlexGroup, EuiFlexItem, EuiFormRow, @@ -110,39 +109,24 @@ export function UnassignedTermsConfig({ - {data.type === 'categories' && otherAssignment.color.type !== 'loop' ? ( - - ) : ( - - )} +
+ {data.type === 'categories' && otherAssignment.color.type !== 'loop' && ( + + )} +