From bbde5634570dac911122b77d3a38311df5a43a65 Mon Sep 17 00:00:00 2001 From: Yu Jin <112784385+yujin-emma@users.noreply.github.com> Date: Thu, 18 Apr 2024 20:18:55 -0700 Subject: [PATCH] [Multiple Datasource]update no data source text font and button size (#6549) * update no data source text font and button size Signed-off-by: yujin-emma * update change log and snapshot Signed-off-by: yujin-emma --------- Signed-off-by: yujin-emma --- CHANGELOG.md | 1 + .../no_data_source.test.tsx.snap | 158 ++++++++++-------- .../no_data_source/no_data_source.tsx | 56 ++++--- 3 files changed, 116 insertions(+), 99 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 200a8e653248..23578335bbc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Multiple Datasource] Add default icon in multi-selectable picker ([#6357](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6357)) - [Multiple Datasource] Add empty state component for no connected data source ([#6499](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6499)) - [Multiple Datasource] Add popover for empty state and redirect to data source management page([#6514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6514)) +- [Multiple Datasource] Update empty state font size and footer button size to small ([6549](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6549)) - [Workspace] Add APIs to support plugin state in request ([#6303](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6303)) - [Workspace] Filter left nav menu items according to the current workspace ([#6234](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6234)) - [Multiple Datasource] Add multi data source support to Timeline ([#6385](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6385)) diff --git a/src/plugins/data_source_management/public/components/no_data_source/__snapshots__/no_data_source.test.tsx.snap b/src/plugins/data_source_management/public/components/no_data_source/__snapshots__/no_data_source.test.tsx.snap index 28c48cd26ffb..6807943e0897 100644 --- a/src/plugins/data_source_management/public/components/no_data_source/__snapshots__/no_data_source.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/no_data_source/__snapshots__/no_data_source.test.tsx.snap @@ -26,51 +26,56 @@ exports[`NoDataSource should render correctly with the provided totalDataSourceC ownFocus={true} panelPaddingSize="none" > - + - - - - - - - - - - - + + + + + + + + + + - - - + + + `; @@ -110,51 +115,56 @@ exports[`NoDataSource should render normally 1`] = ` ownFocus={true} panelPaddingSize="none" > - + - - - - - - - - - - - + + + + + + + + + + - - - + + + `; diff --git a/src/plugins/data_source_management/public/components/no_data_source/no_data_source.tsx b/src/plugins/data_source_management/public/components/no_data_source/no_data_source.tsx index 36d5b5befcab..7d2142a31765 100644 --- a/src/plugins/data_source_management/public/components/no_data_source/no_data_source.tsx +++ b/src/plugins/data_source_management/public/components/no_data_source/no_data_source.tsx @@ -8,12 +8,12 @@ import React, { useState } from 'react'; import { EuiButton, EuiButtonEmpty, - EuiContextMenuPanel, - EuiHorizontalRule, EuiPanel, EuiPopover, - EuiSpacer, EuiText, + EuiPopoverFooter, + EuiFlexGroup, + EuiFlexItem, } from '@elastic/eui'; import { ApplicationStart } from 'opensearch-dashboards/public'; import { FormattedMessage } from 'react-intl'; @@ -55,6 +55,7 @@ export const NoDataSource: React.FC = ({ iconSide="right" data-test-subj="dataSourceEmptyStateManageDataSourceButton" fill={false} + size="s" onClick={() => application?.navigateToApp('management', { path: `opensearch-dashboards/${DSM_APP_ID}`, @@ -69,7 +70,7 @@ export const NoDataSource: React.FC = ({ ); const text = ( <> - + { = ({ } - + { = ({ anchorPosition="downLeft" data-test-subj={'dataSourceEmptyStatePopover'} > - - - - - - - {text} - - {redirectButton} - + + + + {text} - + + + + {redirectButton} + + ); };