From 5f2074e84ce339de098e1afa40a8c2487e242e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Jamr=C3=B3z?= Date: Thu, 30 Oct 2025 12:55:06 +0100 Subject: [PATCH] Explore: Use compact mode only when targeting Tempo (#113037) * Explore: Use compact mode only when targeting Tempo * Fix checking ds type when data source is not in the query object --- public/app/features/explore/Explore.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/app/features/explore/Explore.tsx b/public/app/features/explore/Explore.tsx index 5673fdbbbb9..f8bd275930b 100644 --- a/public/app/features/explore/Explore.tsx +++ b/public/app/features/explore/Explore.tsx @@ -312,16 +312,20 @@ export class Explore extends PureComponent { */ onSplitOpen = (panelType: string) => { return async (options?: SplitOpenOptions) => { - let compact = true; + let compact = false; /** * Temporary fix grafana-clickhouse-datasource as it requires the query editor to be fully rendered to update the query * Proposed fixes: * - https://github.com/grafana/clickhouse-datasource/issues/1363 - handle query update in data source * - https://github.com/grafana/grafana/issues/110868 - allow data links to provide meta info if the link can be handled in compact mode (default to false) + * Update: + * More data source may struggle with this setting: https://github.com/grafana/grafana/issues/112075 + * We're making it enabled for tempo only and will try to make it optional for other data sources in the future. */ - if (options?.queries?.some((q) => q.datasource?.type === 'grafana-clickhouse-datasource')) { - compact = false; + const dsType = getDataSourceSrv().getInstanceSettings({ uid: options?.datasourceUid })?.type; + if (dsType === 'tempo' || options?.queries?.every((q) => q.datasource?.type === 'tempo')) { + compact = true; } this.props.splitOpen(options ? { ...options, compact } : options);