From df33310530a19963db0a8ec8d8e276a10c6fa0de Mon Sep 17 00:00:00 2001 From: Andrew Hackmann <5140848+bossinc@users.noreply.github.com> Date: Wed, 18 Jun 2025 11:16:21 -0500 Subject: [PATCH] Partner data sources: Remove horizontal groups (#106868) * remove horizontal groups: * remove space --- .betterer.results | 15 --------------- .../components/query-editor-raw/QueryToolbox.tsx | 6 +++--- .../MetricsQueryEditor/DimensionFields.tsx | 6 +++--- .../components/TracesQueryEditor/Filter.tsx | 14 +++----------- .../cloud-monitoring/components/GraphPeriod.tsx | 6 +++--- .../cloud-monitoring/components/LabelFilter.tsx | 6 +++--- 6 files changed, 15 insertions(+), 38 deletions(-) diff --git a/.betterer.results b/.betterer.results index ff36ae089fe..ecafb626dd9 100644 --- a/.betterer.results +++ b/.betterer.results @@ -572,9 +572,6 @@ exports[`better eslint`] = { [0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"], [0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "2"] ], - "packages/grafana-sql/src/components/query-editor-raw/QueryToolbox.tsx:5381": [ - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] - ], "packages/grafana-sql/src/components/visual-query-builder/Preview.tsx:5381": [ [0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"] ], @@ -3172,9 +3169,6 @@ exports[`better eslint`] = { "public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/index.tsx:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./LogsQueryEditor\`)", "0"] ], - "public/app/plugins/datasource/azuremonitor/components/MetricsQueryEditor/DimensionFields.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/plugins/datasource/azuremonitor/components/QueryEditor/QueryEditor.test.tsx:5381": [ [0, 0, 0, "* import is invalid because \'Layout,HorizontalGroup,VerticalGroup\' from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], @@ -3190,9 +3184,6 @@ exports[`better eslint`] = { "public/app/plugins/datasource/azuremonitor/components/ResourcePicker/index.tsx:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./ResourcePicker\`)", "0"] ], - "public/app/plugins/datasource/azuremonitor/components/TracesQueryEditor/Filter.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/plugins/datasource/azuremonitor/components/TracesQueryEditor/Filters.tsx:5381": [ [0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"] ], @@ -3244,12 +3235,6 @@ exports[`better eslint`] = { "public/app/plugins/datasource/cloud-monitoring/components/Fields.tsx:5381": [ [0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"] ], - "public/app/plugins/datasource/cloud-monitoring/components/GraphPeriod.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/plugins/datasource/cloud-monitoring/components/LabelFilter.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/plugins/datasource/cloud-monitoring/components/VariableQueryEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], diff --git a/packages/grafana-sql/src/components/query-editor-raw/QueryToolbox.tsx b/packages/grafana-sql/src/components/query-editor-raw/QueryToolbox.tsx index 678e7b0cec4..34c3e69477b 100644 --- a/packages/grafana-sql/src/components/query-editor-raw/QueryToolbox.tsx +++ b/packages/grafana-sql/src/components/query-editor-raw/QueryToolbox.tsx @@ -3,7 +3,7 @@ import { useMemo, useState } from 'react'; import { t } from '@grafana/i18n'; import { reportInteraction } from '@grafana/runtime'; -import { HorizontalGroup, Icon, IconButton, Tooltip, useTheme2 } from '@grafana/ui'; +import { Stack, Icon, IconButton, Tooltip, useTheme2 } from '@grafana/ui'; import { QueryValidator, QueryValidatorProps } from './QueryValidator'; @@ -70,7 +70,7 @@ export function QueryToolbox({ showTools, onFormatCode, onExpand, isExpanded, .. {showTools && (