From bc078f1193e12caa5ef9974ede15188146960e1e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 4 Jul 2024 08:19:28 +0000 Subject: [PATCH] [navigation-next]feat: add description field in App. (#7152) * feat: add description in app Signed-off-by: SuZhou-Joe * Changeset file for PR #7152 created/updated * feat: update comment Signed-off-by: SuZhou-Joe --------- Signed-off-by: SuZhou-Joe Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit e0945af346e5844804780d3162d7718739eefa31) Signed-off-by: github-actions[bot] --- changelogs/fragments/7152.yml | 2 ++ src/core/public/application/application_service.test.ts | 2 ++ src/core/public/application/types.ts | 6 ++++++ src/core/public/chrome/nav_links/to_nav_link.test.ts | 2 ++ 4 files changed, 12 insertions(+) create mode 100644 changelogs/fragments/7152.yml diff --git a/changelogs/fragments/7152.yml b/changelogs/fragments/7152.yml new file mode 100644 index 000000000000..9d0bff5db0f4 --- /dev/null +++ b/changelogs/fragments/7152.yml @@ -0,0 +1,2 @@ +feat: +- Add description field in App. ([#7152](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7152)) \ No newline at end of file diff --git a/src/core/public/application/application_service.test.ts b/src/core/public/application/application_service.test.ts index 683884229764..28e4a19f7e43 100644 --- a/src/core/public/application/application_service.test.ts +++ b/src/core/public/application/application_service.test.ts @@ -59,6 +59,7 @@ const createApp = (props: Partial): App => { return { id: 'some-id', title: 'some-title', + description: 'some-description', mount: () => () => undefined, ...props, }; @@ -153,6 +154,7 @@ describe('#setup()', () => { id: 'app2', navLinkStatus: AppNavLinkStatus.visible, status: AppStatus.accessible, + description: 'some-description', }) ); }); diff --git a/src/core/public/application/types.ts b/src/core/public/application/types.ts index 71c67f2b967d..1e84ae309bda 100644 --- a/src/core/public/application/types.ts +++ b/src/core/public/application/types.ts @@ -268,6 +268,12 @@ export interface App { * indicating the application is available within or out of workspace. */ workspaceAvailability?: WorkspaceAvailability; + + /** + * The description of the application. + * Will be displayed in landing page or getting started cards to give more information about the feature. + */ + description?: string; } /** diff --git a/src/core/public/chrome/nav_links/to_nav_link.test.ts b/src/core/public/chrome/nav_links/to_nav_link.test.ts index 8d88c15c85ae..4bbf0497b2dc 100644 --- a/src/core/public/chrome/nav_links/to_nav_link.test.ts +++ b/src/core/public/chrome/nav_links/to_nav_link.test.ts @@ -58,6 +58,7 @@ describe('toNavLink', () => { title: 'title', order: 12, tooltip: 'tooltip', + description: 'some-description', euiIconType: 'my-icon' as EuiIconType, }), basePath @@ -69,6 +70,7 @@ describe('toNavLink', () => { order: 12, tooltip: 'tooltip', euiIconType: 'my-icon', + description: 'some-description', }) ); });