Skip to content

Commit

Permalink
[Workspace] Refactor the style of recent items card in the header (#7805
Browse files Browse the repository at this point in the history
)

* feature/refractor-style-of-recent-items

Signed-off-by: Qxisylolo <qianxisy@amazon.com>

* solve bugs and delete annotation

Signed-off-by: Qxisylolo <qianxisy@amazon.com>

* solve bugs

Signed-off-by: Qxisylolo <qianxisy@amazon.com>

* fix bugs

Signed-off-by: Qxisylolo <qianxisy@amazon.com>

* fix bugs-1

Signed-off-by: Qxisylolo <qianxisy@amazon.com>

* fix bugs-delete-lines

Signed-off-by: Qxisylolo <qianxisy@amazon.com>

* fix refine-popover-padding

Signed-off-by: Qxisylolo <qianxisy@amazon.com>

* fix, add createRecentNavLink

Signed-off-by: Qxisylolo <qianxisy@amazon.com>

* Changeset file for PR #7805 created/updated

---------

Signed-off-by: Qxisylolo <qianxisy@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit a7024e6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 0c7b210 commit 74da7e3
Show file tree
Hide file tree
Showing 7 changed files with 528 additions and 103 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/7805.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Refractor the style of recent items card ([#7805](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7805))
1 change: 1 addition & 0 deletions src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ export class ChromeService {

getHeaderComponent: () => (
<Header
http={http}
loadingCount$={http.getLoadingCount$()}
application={application}
appTitle$={appTitle$.pipe(takeUntil(this.stop$))}
Expand Down
208 changes: 202 additions & 6 deletions src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/core/public/chrome/ui/header/header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function mockProps() {
const application = applicationServiceMock.createInternalStartContract();

return {
http,
application,
opensearchDashboardsVersion: '1.0.0',
appTitle$: new BehaviorSubject('test'),
Expand Down
7 changes: 5 additions & 2 deletions src/core/public/chrome/ui/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import { HomeLoader } from './home_loader';
import { RecentItems } from './recent_items';

export interface HeaderProps {
http: HttpStart;
opensearchDashboardsVersion: string;
application: InternalApplicationStart;
appTitle$: Observable<string>;
Expand Down Expand Up @@ -120,6 +121,7 @@ export interface HeaderProps {
}

export function Header({
http,
opensearchDashboardsVersion,
opensearchDashboardsDocLink,
application,
Expand Down Expand Up @@ -343,11 +345,12 @@ export function Header({
const renderRecentItems = () => (
<EuiHeaderSectionItem border={useUpdatedHeader ? 'none' : 'right'}>
<RecentItems
http={http}
navLinks$={observables.navLinks$}
basePath={basePath}
recentlyAccessed$={observables.recentlyAccessed$}
workspaceList$={observables.workspaceList$}
navigateToUrl={application.navigateToUrl}
navLinks$={observables.navLinks$}
basePath={basePath}
renderBreadcrumbs={renderBreadcrumbs(true)}
buttonSize={useApplicationHeader ? 's' : 'xs'}
/>
Expand Down
Loading

0 comments on commit 74da7e3

Please sign in to comment.