Skip to content

Commit

Permalink
[navigation-next]feat: add description field in App. (#7152) (#7174)
Browse files Browse the repository at this point in the history
* feat: add description in app



* Changeset file for PR #7152 created/updated

* feat: update comment



---------



(cherry picked from commit e0945af)

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 5, 2024
1 parent 3ed43b2 commit 71a791b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/7152.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Add description field in App. ([#7152](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7152))
2 changes: 2 additions & 0 deletions src/core/public/application/application_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const createApp = (props: Partial<App>): App => {
return {
id: 'some-id',
title: 'some-title',
description: 'some-description',
mount: () => () => undefined,
...props,
};
Expand Down Expand Up @@ -153,6 +154,7 @@ describe('#setup()', () => {
id: 'app2',
navLinkStatus: AppNavLinkStatus.visible,
status: AppStatus.accessible,
description: 'some-description',
})
);
});
Expand Down
6 changes: 6 additions & 0 deletions src/core/public/application/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ export interface App<HistoryLocationState = unknown> {
* 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;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/core/public/chrome/nav_links/to_nav_link.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ describe('toNavLink', () => {
title: 'title',
order: 12,
tooltip: 'tooltip',
description: 'some-description',
euiIconType: 'my-icon' as EuiIconType,
}),
basePath
Expand All @@ -69,6 +70,7 @@ describe('toNavLink', () => {
order: 12,
tooltip: 'tooltip',
euiIconType: 'my-icon',
description: 'some-description',
})
);
});
Expand Down

0 comments on commit 71a791b

Please sign in to comment.