PanelGridItemRepeater: Refactor (#84710)

* wip

* serialisation tests updates

* VizPanelManager test updates

* ests updates

* Making it green

* Use DashboardGridItem instead of SceneGridItem

* Cleanup tests that unnecessarily depend on dashboard grid items

* Fix row repeater behavior test

* Update public/app/features/dashboard-scene/panel-edit/PanelEditor.tsx

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>

* Fix unnecessary library panel changes detection

* Fix test

---------

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
This commit is contained in:
Dominik Prokop
2024-03-21 14:38:00 +01:00
committed by GitHub
parent 20bb9d60dc
commit a4ff2abd9d
46 changed files with 494 additions and 594 deletions

View File

@@ -1,9 +1,10 @@
import { act, fireEvent, render } from '@testing-library/react';
import React from 'react';
import { SceneGridItem, VizPanel } from '@grafana/scenes';
import { VizPanel } from '@grafana/scenes';
import { OptionFilter } from 'app/features/dashboard/components/PanelEditor/OptionsPaneOptions';
import { DashboardGridItem } from '../scene/DashboardGridItem';
import { LibraryVizPanel } from '../scene/LibraryVizPanel';
import { vizPanelToPanel } from '../serialization/transformSceneToSaveModel';
@@ -42,7 +43,7 @@ describe('PanelOptions', () => {
_loadedPanel: libraryPanelModel,
});
new SceneGridItem({ body: libraryPanel });
new DashboardGridItem({ body: libraryPanel });
const panelManger = VizPanelManager.createFor(panel);