From e358ca1f55dea6caa27fbda3e10c25af3f6ff51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Fern=C3=A1ndez?= Date: Wed, 13 Aug 2025 15:57:38 +0200 Subject: [PATCH] Chore: Remove deprecated `HorizontalGroup` in geo and transformers editors (#109602) --- .betterer.results | 12 ------------ .../app/features/geo/editor/locationModeEditor.tsx | 4 ++-- .../calculateHeatmap/editor/AxisEditor.tsx | 6 +++--- .../joinByLabels/JoinByLabelsTransformerEditor.tsx | 6 +++--- .../partitionByValues/PartitionByValuesEditor.tsx | 7 ++++--- 5 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.betterer.results b/.betterer.results index dc5c9248073..d323fe5b2f5 100644 --- a/.betterer.results +++ b/.betterer.results @@ -2400,9 +2400,6 @@ exports[`better eslint`] = { "public/app/features/expressions/guards.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/features/geo/editor/locationModeEditor.tsx:5381": [ - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] - ], "public/app/features/geo/gazetteer/gazetteer.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -2801,9 +2798,6 @@ exports[`better eslint`] = { "public/app/features/transformers/FilterByValueTransformer/ValueMatchers/valueMatchersUI.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/features/transformers/calculateHeatmap/editor/AxisEditor.tsx:5381": [ - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] - ], "public/app/features/transformers/calculateHeatmap/editor/helper.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -2858,15 +2852,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "3"], [0, 0, 0, "Unexpected any. Specify a different type.", "4"] ], - "public/app/features/transformers/joinByLabels/JoinByLabelsTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] - ], "public/app/features/transformers/lookupGazetteer/FieldLookupTransformerEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/features/transformers/partitionByValues/PartitionByValuesEditor.tsx:5381": [ - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] - ], "public/app/features/transformers/spatial/optionsHelper.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], diff --git a/public/app/features/geo/editor/locationModeEditor.tsx b/public/app/features/geo/editor/locationModeEditor.tsx index aacc913123c..1223179ed13 100644 --- a/public/app/features/geo/editor/locationModeEditor.tsx +++ b/public/app/features/geo/editor/locationModeEditor.tsx @@ -5,7 +5,7 @@ import { StandardEditorProps, DataFrame, GrafanaTheme2 } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; import { t } from '@grafana/i18n'; import { FrameGeometrySource, FrameGeometrySourceMode } from '@grafana/schema'; -import { Alert, HorizontalGroup, Icon, Select, useStyles2 } from '@grafana/ui'; +import { Alert, Icon, Select, useStyles2 } from '@grafana/ui'; import { FrameGeometryField, getGeometryField, getLocationMatchers } from '../utils/location'; @@ -103,7 +103,7 @@ export const LocationModeEditor = ({ onChange(v.value); }} /> - {dataValidation()} + {dataValidation()} ); }; diff --git a/public/app/features/transformers/calculateHeatmap/editor/AxisEditor.tsx b/public/app/features/transformers/calculateHeatmap/editor/AxisEditor.tsx index 7282ddba598..ec7aa9e3aad 100644 --- a/public/app/features/transformers/calculateHeatmap/editor/AxisEditor.tsx +++ b/public/app/features/transformers/calculateHeatmap/editor/AxisEditor.tsx @@ -4,7 +4,7 @@ import { SelectableValue, StandardEditorProps, VariableOrigin } from '@grafana/d import { t } from '@grafana/i18n'; import { getTemplateSrv } from '@grafana/runtime'; import { HeatmapCalculationBucketConfig, HeatmapCalculationMode } from '@grafana/schema'; -import { HorizontalGroup, RadioButtonGroup, ScaleDistribution } from '@grafana/ui'; +import { RadioButtonGroup, ScaleDistribution, Stack } from '@grafana/ui'; import { SuggestionsInput } from '../../suggestionsInput/SuggestionsInput'; import { numberOrVariableValidator } from '../../utils'; @@ -71,7 +71,7 @@ export const AxisEditor = ({ value, onChange, item }: StandardEditorProps + - + ); }; diff --git a/public/app/features/transformers/joinByLabels/JoinByLabelsTransformerEditor.tsx b/public/app/features/transformers/joinByLabels/JoinByLabelsTransformerEditor.tsx index d7ea6b75503..f7c824abe9c 100644 --- a/public/app/features/transformers/joinByLabels/JoinByLabelsTransformerEditor.tsx +++ b/public/app/features/transformers/joinByLabels/JoinByLabelsTransformerEditor.tsx @@ -9,7 +9,7 @@ import { TransformerCategory, } from '@grafana/data'; import { Trans, t } from '@grafana/i18n'; -import { Alert, HorizontalGroup, InlineField, InlineFieldRow, Select, ValuePicker } from '@grafana/ui'; +import { Alert, Stack, InlineField, InlineFieldRow, Select, ValuePicker } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; import darkImage from '../images/dark/joinByLabels.svg'; @@ -136,7 +136,7 @@ export function JoinByLabelsTransformerEditor({ input, options, onChange }: Prop error="Unable to join by the value label" invalid={v === options.value} > - +