From 3111cc92839e6235b5bc0f02c7eddeb459fb9723 Mon Sep 17 00:00:00 2001 From: Joey Date: Tue, 2 Dec 2025 09:31:13 +0000 Subject: [PATCH] Change default panel size for Drilldown --- public/app/features/explore-map/state/crdtSlice.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/public/app/features/explore-map/state/crdtSlice.ts b/public/app/features/explore-map/state/crdtSlice.ts index 96541b37daf..308fa8b504e 100644 --- a/public/app/features/explore-map/state/crdtSlice.ts +++ b/public/app/features/explore-map/state/crdtSlice.ts @@ -211,8 +211,15 @@ const crdtSlice = createSlice({ const canvasCenterX = (-state.local.viewport.panX + viewportSize.width / 2) / state.local.viewport.zoom; const canvasCenterY = (-state.local.viewport.panY + viewportSize.height / 2) / state.local.viewport.zoom; - const panelWidth = action.payload.position?.width || 600; - const panelHeight = action.payload.position?.height || 400; + const mode = action.payload.kind || 'explore'; + + // Set default panel size based on panel type + // Traces drilldown panels are larger to accommodate the iframe content + const defaultWidth = mode === 'traces-drilldown' ? 1000 : 600; + const defaultHeight = mode === 'traces-drilldown' ? 550 : 400; + + const panelWidth = action.payload.position?.width || defaultWidth; + const panelHeight = action.payload.position?.height || defaultHeight; const panelCount = manager.getPanelIds().length; const offset = panelCount * 30; @@ -226,7 +233,6 @@ const crdtSlice = createSlice({ // Create operation const panelId = uuidv4(); const exploreId = generateExploreId(); - const mode = action.payload.kind || 'explore'; const operation = manager.createAddPanelOperation(panelId, exploreId, position, mode);