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

[Enterprise Search] Fix EuiPageTemplate child usages #182711

Merged
merged 2 commits into from
May 9, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ import { useRouteMatch } from 'react-router-dom';

import { useValues } from 'kea';

import {
EuiPageSidebar,
EuiPageBody,
EuiPageSection,
EuiCallOut,
EuiSpacer,
EuiPageTemplate,
} from '@elastic/eui';
import { EuiCallOut, EuiSpacer, EuiPageTemplate } from '@elastic/eui';

import { AccountHeader, AccountSettingsSidebar, PrivateSourcesSidebar } from '..';
import { FlashMessages } from '../../../../shared/flash_messages';
Expand Down Expand Up @@ -47,37 +40,35 @@ export const PersonalDashboardLayout: FC<PropsWithChildren<LayoutProps>> = ({
<>
{pageChrome && <SetWorkplaceSearchChrome trail={pageChrome} />}
<AccountHeader />
<EuiPageTemplate className="personalDashboardLayout" paddingSize="none">
<EuiPageSidebar
<EuiPageTemplate className="personalDashboardLayout" paddingSize="none" panelled>
<EuiPageTemplate.Sidebar
role="navigation"
className="personalDashboardLayout__sideBar"
sticky
minWidth="480px"
>
{useRouteMatch(PRIVATE_SOURCES_PATH) && <PrivateSourcesSidebar />}
{useRouteMatch(PERSONAL_SETTINGS_PATH) && <AccountSettingsSidebar />}
</EuiPageSidebar>
<EuiPageBody component="main" panelled role="main">
<EuiPageSection
className="personalDashboardLayout__body"
paddingSize="none"
restrictWidth
>
{readOnlyMode && (
<>
<EuiCallOut
color="warning"
iconType="lock"
title={PERSONAL_DASHBOARD_READ_ONLY_MODE_WARNING}
/>
<EuiSpacer />
</>
)}
<FlashMessages />
</EuiPageTemplate.Sidebar>
<EuiPageTemplate.Section
className="personalDashboardLayout__body"
paddingSize="none"
restrictWidth
>
{readOnlyMode && (
<>
<EuiCallOut
color="warning"
iconType="lock"
title={PERSONAL_DASHBOARD_READ_ONLY_MODE_WARNING}
/>
<EuiSpacer />
</>
)}
<FlashMessages />

{isLoading ? <Loading /> : children}
</EuiPageSection>
</EuiPageBody>
{isLoading ? <Loading /> : children}
</EuiPageTemplate.Section>
</EuiPageTemplate>
</>
);
Expand Down