Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workspace] Refactor the style of recent items card in the header #7805

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -349,6 +349,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 @@ -351,11 +353,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
Loading