From e34ca2b593ecf8d8c6caf547381cdddf5548a53c Mon Sep 17 00:00:00 2001 From: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:41:43 -0700 Subject: [PATCH] [MDS] Refactor dropdown header + Aggregate view UI (#6541) * Refactor dropdown header + aggregate view UI Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Refactor dropdown to use OuiPopoverTitle Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Update snapshots Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Refactor titleComponent Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Update snapshots Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> --------- Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> --- .../data_source_list_active_example.tsx | 3 +- .../data_source_list_all_example.tsx | 1 - .../data_source_aggregated_view.test.tsx.snap | 1492 ++++++++--------- .../data_source_aggregated_view.scss | 13 + .../data_source_aggregated_view.tsx | 10 +- .../components/data_source_menu/types.ts | 1 - .../data_source_selectable.test.tsx.snap | 2 +- .../data_source_view.test.tsx.snap | 2 +- .../drop_down_header.test.tsx.snap | 4 +- .../drop_down_header/drop_down_header.tsx | 4 +- 10 files changed, 696 insertions(+), 836 deletions(-) diff --git a/examples/multiple_data_source_examples/public/components/data_source_list_active_example.tsx b/examples/multiple_data_source_examples/public/components/data_source_list_active_example.tsx index 81a15e2c03da..9563c65769f8 100644 --- a/examples/multiple_data_source_examples/public/components/data_source_list_active_example.tsx +++ b/examples/multiple_data_source_examples/public/components/data_source_list_active_example.tsx @@ -110,8 +110,7 @@ export const DataSourceListActiveExample = ({ notifications, displayAllCompatibleDataSources: false, // To see selected options, obtain the datasource id and paste it here. Note that this needs to be defined when displayAllCompatibleDataSources is false - activeDataSourceIds: [], - uiSettings, + activeDataSourceIds: [''], }} /> )} diff --git a/examples/multiple_data_source_examples/public/components/data_source_list_all_example.tsx b/examples/multiple_data_source_examples/public/components/data_source_list_all_example.tsx index 570e51be36e9..d2d5d89d3c6a 100644 --- a/examples/multiple_data_source_examples/public/components/data_source_list_all_example.tsx +++ b/examples/multiple_data_source_examples/public/components/data_source_list_all_example.tsx @@ -102,7 +102,6 @@ export const DataSourceListAllExample = ({ savedObjects: savedObjects.client, notifications, displayAllCompatibleDataSources: true, - uiSettings, }} /> )} diff --git a/src/plugins/data_source_management/public/components/data_source_aggregated_view/__snapshots__/data_source_aggregated_view.test.tsx.snap b/src/plugins/data_source_management/public/components/data_source_aggregated_view/__snapshots__/data_source_aggregated_view.test.tsx.snap index 57ba243a476b..ebc28a49153f 100644 --- a/src/plugins/data_source_management/public/components/data_source_aggregated_view/__snapshots__/data_source_aggregated_view.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/data_source_aggregated_view/__snapshots__/data_source_aggregated_view.test.tsx.snap @@ -23,56 +23,48 @@ exports[`DataSourceAggregatedView: read active view (displayAllCompatibleDataSou ownFocus={true} panelPaddingSize="none" > + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + {titleComponent} - - {titleComponent} - ) => boolean; - uiSettings?: IUiSettingsClient; } export type DataSourceAggregatedViewConfig = diff --git a/src/plugins/data_source_management/public/components/data_source_selectable/__snapshots__/data_source_selectable.test.tsx.snap b/src/plugins/data_source_management/public/components/data_source_selectable/__snapshots__/data_source_selectable.test.tsx.snap index b3abb935afee..481451f3d80a 100644 --- a/src/plugins/data_source_management/public/components/data_source_selectable/__snapshots__/data_source_selectable.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/data_source_selectable/__snapshots__/data_source_selectable.test.tsx.snap @@ -269,7 +269,7 @@ Object { class="euiPopoverTitle euiPopoverTitle--paddingSmall" >
@@ -42,10 +43,11 @@ exports[`DataSourceDropDownHeader should render the activeDataSourceCount/totalD className="euiPopoverTitle euiPopoverTitle--paddingSmall" >
= ({ return ( - + {dataSourceCounterPrefix} ({dataSourceCounter})