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]Migrate all usages of EuiPage*_Deprecated #163482

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
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ import {
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageSection,
EuiSpacer,
EuiText,
EuiTitle,
IconType,
} from '@elastic/eui';

interface Props {
title: string;
subtitle: string;
iconType?: IconType;
subtitle: string;
title: string;
}
export const AnalyticsSection: React.FC<Props> = ({ title, subtitle, iconType, children }) => (
<section>
Expand Down Expand Up @@ -49,6 +49,6 @@ export const AnalyticsSection: React.FC<Props> = ({ title, subtitle, iconType, c
</EuiText>
</header>
<EuiSpacer size="m" />
<EuiPageContentBody>{children}</EuiPageContentBody>
<EuiPageSection paddingSize="none">{children}</EuiPageSection>
</section>
);
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import {
EuiButtonIcon,
EuiSpacer,
EuiButton,
EuiPageContentHeader_Deprecated as EuiPageContentHeader,
EuiPageContentHeaderSection_Deprecated as EuiPageContentHeaderSection,
EuiPageHeader,
EuiSkeletonText,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -85,31 +84,27 @@ export const Credentials: React.FC = () => {
</EuiCopy>
</EuiPanel>
<EuiSpacer size="xxl" />
<EuiPageContentHeader responsive={false}>
<EuiPageContentHeaderSection>
<EuiTitle size="m">
<h2>
{i18n.translate('xpack.enterpriseSearch.appSearch.credentials.apiKeys', {
defaultMessage: 'API keys',
})}
</h2>
</EuiTitle>
</EuiPageContentHeaderSection>
<EuiPageContentHeaderSection>
{!dataLoading && (
<EuiButton
color="primary"
data-test-subj="CreateAPIKeyButton"
fill
onClick={() => showCredentialsForm()}
>
{i18n.translate('xpack.enterpriseSearch.appSearch.credentials.createKey', {
defaultMessage: 'Create key',
})}
</EuiButton>
)}
</EuiPageContentHeaderSection>
</EuiPageContentHeader>
<EuiPageHeader responsive={false}>
<EuiTitle size="m">
<h2>
{i18n.translate('xpack.enterpriseSearch.appSearch.credentials.apiKeys', {
defaultMessage: 'API keys',
})}
</h2>
</EuiTitle>
{!dataLoading && (
<EuiButton
color="primary"
data-test-subj="CreateAPIKeyButton"
fill
onClick={() => showCredentialsForm()}
>
{i18n.translate('xpack.enterpriseSearch.appSearch.credentials.createKey', {
defaultMessage: 'Create key',
})}
</EuiButton>
)}
</EuiPageHeader>
<EuiSpacer size="m" />
<EuiPanel hasBorder>
<EuiSkeletonText lines={3} isLoading={!!dataLoading}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import {
EuiSpacer,
EuiPageHeader,
EuiTitle,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageSection,
EuiDragDropContext,
EuiDroppable,
EuiDraggable,
EuiButtonIconProps,
EuiEmptyPrompt,
EuiPageBody,
} from '@elastic/eui';

import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
Expand Down Expand Up @@ -167,8 +167,8 @@ export const Library: React.FC = () => {
<>
<SetPageChrome trail={['Library']} />
<EuiPageHeader pageTitle="Library" />
<EuiPageContent hasBorder>
<EuiPageContentBody>
<EuiPageBody panelled hasBorder>
<EuiPageSection>
<EuiTitle size="m">
<h2>Result</h2>
</EuiTitle>
Expand Down Expand Up @@ -540,8 +540,8 @@ export const Library: React.FC = () => {

<EuiSpacer />
<EuiSpacer />
</EuiPageContentBody>
</EuiPageContent>
</EuiPageSection>
</EuiPageBody>
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@

import React from 'react';

import {
EuiPageContent_Deprecated as EuiPageContent,
EuiSteps,
EuiText,
EuiLink,
EuiCallOut,
} from '@elastic/eui';
import { EuiPageSection, EuiSteps, EuiText, EuiLink, EuiCallOut } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';

Expand All @@ -27,7 +21,7 @@ interface Props {
}

export const CloudSetupInstructions: React.FC<Props> = ({ productName, cloudDeploymentLink }) => (
<EuiPageContent>
<EuiPageSection>
<EuiSteps
headingElement="h2"
steps={[
Expand Down Expand Up @@ -176,5 +170,5 @@ export const CloudSetupInstructions: React.FC<Props> = ({ productName, cloudDepl
},
]}
/>
</EuiPageContent>
</EuiPageSection>
);
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';

import {
EuiPageContent_Deprecated as EuiPageContent,
EuiPageSection,
EuiText,
EuiSteps,
EuiCode,
Expand All @@ -27,7 +27,7 @@ interface Props {
}

export const SetupInstructions: React.FC<Props> = ({ productName }) => (
<EuiPageContent>
<EuiPageSection>
<EuiSteps
headingElement="h2"
steps={[
Expand Down Expand Up @@ -126,5 +126,5 @@ export const SetupInstructions: React.FC<Props> = ({ productName }) => (
},
]}
/>
</EuiPageContent>
</EuiPageSection>
);
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useValues } from 'kea';

import {
EuiPage,
EuiPageSideBar_Deprecated as EuiPageSideBar,
EuiPageSidebar,
EuiPageBody,
EuiSpacer,
EuiFlexGroup,
Expand All @@ -35,8 +35,8 @@ import './setup_guide.scss';

interface Props {
children: React.ReactNode;
productName: string;
productEuiIcon: 'logoAppSearch' | 'logoWorkplaceSearch' | 'logoEnterpriseSearch';
productName: string;
}

export const SetupGuideLayout: React.FC<Props> = ({ children, productName, productEuiIcon }) => {
Expand All @@ -46,7 +46,7 @@ export const SetupGuideLayout: React.FC<Props> = ({ children, productName, produ

return (
<EuiPage className="setupGuide" data-test-subj="setupGuide">
<EuiPageSideBar className="setupGuide__sidebar">
<EuiPageSidebar className="setupGuide__sidebar">
<EuiText color="subdued" size="s">
<strong>{SETUP_GUIDE_TITLE}</strong>
</EuiText>
Expand All @@ -64,7 +64,7 @@ export const SetupGuideLayout: React.FC<Props> = ({ children, productName, produ
</EuiFlexGroup>

{children}
</EuiPageSideBar>
</EuiPageSidebar>

<EuiPageBody className="setupGuide__body">
{isCloudEnabled ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}

&__body {
padding-top:0;
position: relative;
width: 100%;
height: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import { useRouteMatch } from 'react-router-dom';
import { useValues } from 'kea';

import {
EuiPage,
EuiPageSideBar_Deprecated as EuiPageSideBar,
EuiPageSidebar,
EuiPageBody,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageSection,
EuiCallOut,
EuiSpacer,
EuiPageTemplate,
} from '@elastic/eui';

import { AccountHeader, AccountSettingsSidebar, PrivateSourcesSidebar } from '..';
Expand Down Expand Up @@ -47,13 +47,22 @@ export const PersonalDashboardLayout: React.FC<LayoutProps> = ({
<>
{pageChrome && <SetWorkplaceSearchChrome trail={pageChrome} />}
<AccountHeader />
<EuiPage className="personalDashboardLayout" paddingSize="none">
<EuiPageSideBar role="navigation" className="personalDashboardLayout__sideBar" sticky>
<EuiPageTemplate className="personalDashboardLayout" paddingSize="none">
<EuiPageSidebar
role="navigation"
className="personalDashboardLayout__sideBar"
sticky
minWidth="480px"
>
{useRouteMatch(PRIVATE_SOURCES_PATH) && <PrivateSourcesSidebar />}
{useRouteMatch(PERSONAL_SETTINGS_PATH) && <AccountSettingsSidebar />}
</EuiPageSideBar>
</EuiPageSidebar>
<EuiPageBody component="main" panelled role="main">
<EuiPageContentBody className="personalDashboardLayout__body" restrictWidth>
<EuiPageSection
className="personalDashboardLayout__body"
paddingSize="none"
restrictWidth
>
{readOnlyMode && (
<>
<EuiCallOut
Expand All @@ -65,10 +74,11 @@ export const PersonalDashboardLayout: React.FC<LayoutProps> = ({
</>
)}
<FlashMessages />

{isLoading ? <Loading /> : children}
</EuiPageContentBody>
</EuiPageSection>
</EuiPageBody>
</EuiPage>
</EuiPageTemplate>
</>
);
};
2 changes: 1 addition & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -40464,4 +40464,4 @@
"xpack.painlessLab.walkthroughButtonLabel": "Présentation",
"xpack.serverlessObservability.nav.getStarted": "Démarrer"
}
}
}
2 changes: 1 addition & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -40455,4 +40455,4 @@
"xpack.painlessLab.walkthroughButtonLabel": "実地検証",
"xpack.serverlessObservability.nav.getStarted": "使ってみる"
}
}
}
2 changes: 1 addition & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -40449,4 +40449,4 @@
"xpack.painlessLab.walkthroughButtonLabel": "指导",
"xpack.serverlessObservability.nav.getStarted": "开始使用"
}
}
}