DashboardScene: Refactor body property to be layout manager interface (#93738)

* Began layout refactor

* fixing tests

* Progress

* Progress

* Progress

* Progress

* Progress

* Progress

* finally no errors

* Remove unused interface

* Remove unused interface

* fixed tests

* Update

* Update

* Fixes to keyboard shortcuts and solo route

* fix lint issues
This commit is contained in:
Torkel Ödegaard
2024-09-27 15:11:28 +02:00
committed by GitHub
parent 7e94d05d39
commit 1941ae21d7
50 changed files with 1212 additions and 1918 deletions

View File

@@ -2,12 +2,12 @@ import { render, screen } from '@testing-library/react';
import { FieldType, getDefaultTimeRange, LoadingState, toDataFrame } from '@grafana/data';
import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks';
import { SceneGridLayout, SceneQueryRunner, SceneTimeRange, VizPanel, VizPanelMenu } from '@grafana/scenes';
import { SceneQueryRunner, SceneTimeRange, VizPanel, VizPanelMenu } from '@grafana/scenes';
import { DashboardGridItem } from '../../scene/DashboardGridItem';
import { DashboardScene } from '../../scene/DashboardScene';
import { VizPanelLinks, VizPanelLinksMenu } from '../../scene/PanelLinks';
import { panelMenuBehavior } from '../../scene/PanelMenuBehavior';
import { DefaultGridLayoutManager } from '../../scene/layout-default/DefaultGridLayoutManager';
import { HelpWizard } from './HelpWizard';
@@ -67,18 +67,7 @@ async function buildTestScene() {
canEdit: true,
isEmbedded: false,
},
body: new SceneGridLayout({
children: [
new DashboardGridItem({
key: 'griditem-1',
x: 0,
y: 0,
width: 10,
height: 12,
body: panel,
}),
],
}),
body: DefaultGridLayoutManager.fromVizPanels([panel]),
});
await new Promise((r) => setTimeout(r, 1));