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

[Page layouts] Some light fixes #103197

Merged
merged 22 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3e40d16
[Solution Toolbar] Fixing button border on non-text color versions
Jun 23, 2021
d395e5e
[Alerts] Removed extra wrappers and use EuiPageHeader
Jun 21, 2021
1bc7ced
[Logstash] Basic conversion to template
Jun 21, 2021
5ce2f57
[Reporting] Adding bottomBorder to page header
Jun 21, 2021
3f02b19
[ML] Fix display of main navigation tabs
Jun 22, 2021
7b16b66
[Stack Management] Fix side nav not updating when going back to landi…
Jun 22, 2021
32eb0ef
[Tags] Add spacing after page header
Jun 23, 2021
3a338f0
[License Management] Full width on file uploader
Jun 23, 2021
f36cb87
[Page Template] Fixed `emptyState` default template for pages with si…
Jun 23, 2021
105d678
[Infra] Removing some page header displays in empty states
Jun 23, 2021
56cfbd4
[Enterprise Search] Fix some error layouts
Jun 24, 2021
a49011f
[Index Patterns] Quick fix for empty state
Jun 24, 2021
1eb5a12
Merge remote-tracking branch '2_upstream/master' into design_fixes/7_…
Jun 24, 2021
d3fe40c
snaps
Jun 24, 2021
38407e3
[Page Template] Remove forced padding when `centeredBody`
Jun 24, 2021
823d036
Merge remote-tracking branch 'upstream/master' into design_fixes/7_14…
snide Jun 29, 2021
2648ce4
small hack for tab padding for ml
snide Jun 29, 2021
7830b61
Merge branch 'master' into design_fixes/7_14/page_layouts
kibanamachine Jun 29, 2021
3da2f1c
Merge branch 'master' into design_fixes/7_14/page_layouts
kibanamachine Jun 29, 2021
34f8ae7
Merge branch 'master' into design_fixes/7_14/page_layouts
kibanamachine Jun 29, 2021
58a1177
scroll ML page to fix test
Jun 29, 2021
6a32824
fix test method type signature
Jun 29, 2021
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

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

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
EuiCard,
EuiLink,
EuiText,
EuiFlexGroup,
} from '@elastic/eui';
import { useHistory } from 'react-router-dom';
import { reactRouterNavigate } from '../../../../../../plugins/kibana_react/public';
Expand Down Expand Up @@ -143,8 +144,8 @@ export const EmptyState = ({
</EuiFlexGrid>
<EuiSpacer size="xxl" />
<div className="inpEmptyState__footer">
<EuiFlexGrid columns={3}>
<EuiFlexItem className="inpEmptyState__footerFlexItem">
<EuiFlexGroup>
<EuiFlexItem grow={1} className="inpEmptyState__footerFlexItem">
<EuiDescriptionList
listItems={[
{
Expand All @@ -166,7 +167,7 @@ export const EmptyState = ({
]}
/>
</EuiFlexItem>
<EuiFlexItem className="inpEmptyState__footerFlexItem">
<EuiFlexItem grow={2} className="inpEmptyState__footerFlexItem">
<EuiDescriptionList
listItems={[
{
Expand All @@ -189,7 +190,7 @@ export const EmptyState = ({
]}
/>
</EuiFlexItem>
</EuiFlexGrid>
</EuiFlexGroup>
</div>
</EuiPageContentBody>
</EuiPageContent>
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ export const KibanaPageTemplate: FunctionComponent<KibanaPageTemplateProps> = ({
pageSideBar = <KibanaPageTemplateSolutionNav {...solutionNav} />;
}

const emptyStateDefaultTemplate = pageSideBar ? 'centeredContent' : 'centeredBody';

/**
* An easy way to create the right content for empty pages
*/
if (isEmptyState && pageHeader && !children) {
template = template ?? 'centeredBody';
template = template ?? emptyStateDefaultTemplate;
const { iconType, pageTitle, description, rightSideItems } = pageHeader;
pageHeader = undefined;
children = (
Expand All @@ -81,14 +83,13 @@ export const KibanaPageTemplate: FunctionComponent<KibanaPageTemplateProps> = ({
} else if (isEmptyState && pageHeader && children) {
template = template ?? 'centeredContent';
} else if (isEmptyState && !pageHeader) {
template = template ?? 'centeredBody';
template = template ?? emptyStateDefaultTemplate;
}

return (
<EuiPageTemplate
template={template}
restrictWidth={restrictWidth}
paddingSize={template === 'centeredBody' ? 'none' : 'l'}
pageHeader={pageHeader}
pageSideBar={pageSideBar}
pageSideBarProps={{
Expand Down
13 changes: 11 additions & 2 deletions src/plugins/management/public/components/landing/landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,27 @@
* Side Public License, v 1.
*/

import React from 'react';
import React, { useEffect } from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiEmptyPrompt, EuiHorizontalRule, EuiPageContent } from '@elastic/eui';

interface ManagementLandingPageProps {
version: string;
onAppMounted: (id: string) => void;
setBreadcrumbs: () => void;
}

export const ManagementLandingPage = ({ version, setBreadcrumbs }: ManagementLandingPageProps) => {
export const ManagementLandingPage = ({
version,
setBreadcrumbs,
onAppMounted,
}: ManagementLandingPageProps) => {
setBreadcrumbs();

useEffect(() => {
onAppMounted('');
}, [onAppMounted]);

return (
<EuiPageContent verticalPosition="center" horizontalPosition="center" color="subdued">
<EuiEmptyPrompt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const ManagementRouter = memo(
<ManagementLandingPage
version={dependencies.kibanaVersion}
setBreadcrumbs={setBreadcrumbs}
onAppMounted={onAppMounted}
/>
)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
border-color: $euiBorderColor !important; // sass-lint:disable-line no-important

@include kbnThemeStyle('v8') {
border-width: $euiBorderWidthThin;
border-style: solid;
&[class*='--text'] {
border-width: $euiBorderWidthThin;
border-style: solid;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';

import { EuiPage, EuiPageContent } from '@elastic/eui';
import { KibanaPageTemplate } from '../../../../../../../../src/plugins/kibana_react/public';

import { ErrorStatePrompt } from '../../../shared/error_state';
import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
Expand All @@ -19,11 +19,9 @@ export const ErrorConnecting: React.FC = () => {
<SetPageChrome />
<SendTelemetry action="error" metric="cannot_connect" />

<EuiPage restrictWidth>
<EuiPageContent hasBorder>
<ErrorStatePrompt />
</EuiPageContent>
</EuiPage>
<KibanaPageTemplate isEmptyState>
<ErrorStatePrompt />
</KibanaPageTemplate>
cchaos marked this conversation as resolved.
Show resolved Hide resolved
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@

import React from 'react';

import { EuiPage, EuiPageContent } from '@elastic/eui';
import { KibanaPageTemplate } from '../../../../../../../../src/plugins/kibana_react/public';

import { ErrorStatePrompt } from '../../../shared/error_state';
import { SendEnterpriseSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';

export const ErrorConnecting: React.FC = () => (
<EuiPage restrictWidth>
<KibanaPageTemplate isEmptyState>
<SendTelemetry action="error" metric="cannot_connect" />
<EuiPageContent>
<ErrorStatePrompt />
</EuiPageContent>
</EuiPage>

<ErrorStatePrompt />
</KibanaPageTemplate>
);
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import React from 'react';

import { EuiPage, EuiPageBody, EuiPageContent } from '@elastic/eui';
import { KibanaPageTemplate } from '../../../../../../../../src/plugins/kibana_react/public';

import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants';
import { ErrorStatePrompt } from '../../../shared/error_state';
Expand All @@ -19,16 +19,14 @@ import { ViewContentHeader } from '../../components/shared/view_content_header';

export const ErrorState: React.FC = () => {
return (
<EuiPage restrictWidth>
<>
<SetPageChrome />
<SendTelemetry action="error" metric="cannot_connect" />

<EuiPageBody>
<KibanaPageTemplate isEmptyState>
<ViewContentHeader title={WORKPLACE_SEARCH_PLUGIN.NAME} />
<EuiPageContent>
<ErrorStatePrompt />
</EuiPageContent>
</EuiPageBody>
</EuiPage>
<ErrorStatePrompt />
</KibanaPageTemplate>
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,13 @@ const CategoriesPageTemplate: React.FC<LazyObservabilityPageTemplateProps> = ({
return (
<LogsPageTemplate
data-test-subj="logsLogEntryCategoriesPage"
pageHeader={{
pageTitle: logCategoriesTitle,
}}
pageHeader={
rest.isEmptyState
? undefined
: {
pageTitle: logCategoriesTitle,
}
}
{...rest}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,13 @@ const AnomaliesPageTemplate: React.FC<LazyObservabilityPageTemplateProps> = ({
return (
<LogsPageTemplate
data-test-subj="logsLogEntryRatePage"
pageHeader={{
pageTitle: anomaliesTitle,
}}
pageHeader={
rest.isEmptyState
? undefined
: {
pageTitle: anomaliesTitle,
}
}
{...rest}
>
{children}
Expand Down
Loading