Skip to content

Commit

Permalink
[dashboard] refactor EditorMenu to AddPanelButton (elastic#208226)
Browse files Browse the repository at this point in the history
PR refactors `EditorMenu` component into `AddPanelButton` to provide
better naming scheme and simplify logic.
* replace `COMMON_VISUALIZATION_GROUPING` with
`ADD_PANEL_VISUALIZATION_GROUP`. Moved from visualizations plugin to
embeddable plugin.
* rename `EditorMenu` => `AddPanelButton`
* rename `DashboardPanelSelectionListFlyout` => `AddPanelFlyout`
* remove unused style `dshSolutionToolbar__editorContextMenu` from
editor_menu.scss
* Simplify loading of `AddPanelFlyout` contents. Replaced
`useGetDashboardPanels` hook with `getMenuItemGroups` function.
* avoid loading `AddPanelFlyout` contents until `AddPanelButton` is
clicked. `DashboardEditingToolbar` component used to setup
`useGetDashboardPanels` hook. Now `AddPanelFlyout` loads contents by
directly calling `getMenuItemGroups`.
* Added loading state to `AddPanelFlyout`
<img width="600" alt="Screenshot 2025-01-24 at 9 21 05 AM"
src="https://github.com/user-attachments/assets/b2dfde5f-e347-4745-9ee0-b3268e2138c2"
/>

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Hannah Mudge <[email protected]>
  • Loading branch information
4 people authored Jan 28, 2025
1 parent 8ba2179 commit dcf64f2
Show file tree
Hide file tree
Showing 31 changed files with 780 additions and 1,288 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export { useGetDashboardPanels } from './use_get_dashboard_panels';
export { DashboardPanelSelectionListFlyout } from './dashboard_panel_selection_flyout';
export { getLinksEmbeddableFactory } from './links_embeddable';
export { deserializeLinksSavedObject } from '../lib/deserialize_from_library';

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit dcf64f2

Please sign in to comment.