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

Fix centered dashboard listing #21119

Merged
merged 1 commit into from
Jul 24, 2018
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 @@ -6,10 +6,9 @@ exports[`after fetch hideWriteControls 1`] = `
data-test-subj="dashboardLandingPage"
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
>
<EuiPageBody>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand All @@ -36,10 +35,9 @@ exports[`after fetch initialFilter 1`] = `
data-test-subj="dashboardLandingPage"
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
>
<EuiPageBody>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand Down Expand Up @@ -188,10 +186,9 @@ exports[`after fetch renders call to action when no dashboards exist 1`] = `
data-test-subj="dashboardLandingPage"
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
>
<EuiPageBody>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand Down Expand Up @@ -248,10 +245,9 @@ exports[`after fetch renders table rows 1`] = `
data-test-subj="dashboardLandingPage"
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
>
<EuiPageBody>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand Down Expand Up @@ -400,10 +396,9 @@ exports[`after fetch renders warning when listingLimit is exceeded 1`] = `
data-test-subj="dashboardLandingPage"
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
>
<EuiPageBody>
<EuiPageContent
className="dashboardLandingPageContent"
horizontalPosition="center"
panelPaddingSize="l"
>
Expand Down Expand Up @@ -583,8 +578,6 @@ exports[`renders empty page in before initial fetch to avoid flickering 1`] = `
data-test-subj="dashboardLandingPage"
restrictWidth={false}
>
<EuiPageBody
restrictWidth={true}
/>
<EuiPageBody />
</EuiPage>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export class DashboardListing extends React.Component {
}

return (
<EuiPageContent horizontalPosition="center">
<EuiPageContent className="dashboardLandingPageContent" horizontalPosition="center">
{this.renderListingOrEmptyState()}
</EuiPageContent>
);
Expand All @@ -463,7 +463,8 @@ export class DashboardListing extends React.Component {
render() {
return (
<EuiPage data-test-subj="dashboardLandingPage" className="dashboardLandingPage">
<EuiPageBody restrictWidth>
{/* TODO: add restrictWidth prop on EuiPageBody here when [email protected] is applied */}
<EuiPageBody>
{this.renderPageContent()}
</EuiPageBody>
</EuiPage>
Expand Down
11 changes: 10 additions & 1 deletion src/core_plugins/kibana/public/dashboard/styles/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,16 @@ dashboard-viewport-provider {
}
}

.dashboardLandingPage {
// Mimics EuiPageBackground
dashboard-listing {
background-color: @globalColorLightestGray;
min-height: 100vh;
}

.dashboardLandingPage {
background: @globalColorLightestGray;
}

.dashboardLandingPageContent {
max-width: 1000px !important; // Temp fix till [email protected] is merged
}