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

[Core UI] Kibana Overview Page Style Tweaks #76712

Merged
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
11 changes: 11 additions & 0 deletions src/plugins/home/public/application/components/_add_data.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
* under the License.
*/

.homDataAdd__actions {
// Prevent children from rendering as flex items
display: block;

// Accounting for no `flush="both"` prop on EuiButtonEmpty
.euiButtonEmpty__content {
padding-left: 0;
padding-right: 0;
}
}

.homDataAdd__content .euiIcon__fillSecondary {
fill: $euiColorDarkestShade;
}
28 changes: 17 additions & 11 deletions src/plugins/home/public/application/components/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,10 @@ $homePageWidth: 1200px;
}
}

#homHeader__title {
@include euiBreakpoint('xs', 's') {
text-align: center;
}
}

.homHeader__actionItem {
@include euiBreakpoint('xs', 's') {
margin-bottom: 0 !important;
margin-top: 0 !important;
}
// Accounting for no `flush="both"` prop on EuiButtonEmpty
.homHeader__actionItem .euiButtonEmpty__content {
padding-left: 0;
padding-right: 0;
}

.homContent {
Expand All @@ -71,3 +64,16 @@ $homePageWidth: 1200px;
margin-top: 0 !important;
}
}

.homFooter {
// Prevent children from rendering as flex items
.euiFlexItem {
display: block;
}

// Accounting for no `flush="both"` prop on EuiButtonEmpty
.euiButtonEmpty__content {
padding-left: 0;
padding-right: 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
}

.homSolutions__group {
max-width: 50%;
@include euiBreakpoint('l') {
max-width: calc(75% - #{$euiSizeM * 2});
}

@include euiBreakpoint('xs', 's') {
max-width: none;
@include euiBreakpoint('xl') {
max-width: calc(50% - #{$euiSizeM * 2});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface Props {

export const AddData: FC<Props> = ({ addBasePath, features }) => (
<section className="homDataAdd" aria-labelledby="homDataAdd__title">
<EuiFlexGroup alignItems="center" responsive={false}>
<EuiFlexGroup alignItems="center">
<EuiFlexItem grow={1}>
<EuiTitle size="s">
<h2 id="homDataAdd__title">
Expand All @@ -43,13 +43,8 @@ export const AddData: FC<Props> = ({ addBasePath, features }) => (
</EuiTitle>
</EuiFlexItem>

<EuiFlexItem grow={false}>
<EuiButtonEmpty
iconType="visTable"
href="#/tutorial_directory/sampleData"
size="xs"
flush="right"
>
<EuiFlexItem className="homDataAdd__actions" grow={false}>
<EuiButtonEmpty iconType="visTable" href="#/tutorial_directory/sampleData" size="xs">
<FormattedMessage
id="home.addData.sampleDataButtonLabel"
defaultMessage="Try our sample data"
Expand Down
19 changes: 9 additions & 10 deletions src/plugins/home/public/application/components/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ export class Home extends Component {
<EuiFlexItem>
<EuiTitle size="m">
<h1 id="homHeader__title">
<FormattedMessage id="home.pageHeader.title" defaultMessage="Home" />
<FormattedMessage id="home.header.title" defaultMessage="Home" />
</h1>
</EuiTitle>
</EuiFlexItem>

<EuiFlexItem grow={false}>
<EuiFlexGroup className="homHeader__actions">
<EuiFlexItem className="homHeader__actionItem">
<EuiFlexGroup className="homHeader__actions" responsive={false} wrap>
<EuiFlexItem className="homHeader__actionItem" grow={false}>
<EuiButtonEmpty href="#/tutorial_directory" iconType="indexOpen">
{i18n.translate('home.pageHeader.addDataButtonLabel', {
defaultMessage: 'Add data',
Expand All @@ -163,10 +163,10 @@ export class Home extends Component {
</EuiFlexItem>

{stackManagement ? (
<EuiFlexItem className="homHeader__actionItem">
<EuiFlexItem className="homHeader__actionItem" grow={false}>
<EuiButtonEmpty
onClick={createAppNavigationHandler(stackManagement.path)}
iconType="gear"
onClick={createAppNavigationHandler(stackManagement.path)}
>
{i18n.translate('home.pageHeader.stackManagementButtonLabel', {
defaultMessage: 'Manage',
Expand All @@ -176,10 +176,10 @@ export class Home extends Component {
) : null}

{devTools ? (
<EuiFlexItem className="homHeader__actionItem">
<EuiFlexItem className="homHeader__actionItem" grow={false}>
<EuiButtonEmpty
onClick={createAppNavigationHandler(devTools.path)}
iconType="wrench"
onClick={createAppNavigationHandler(devTools.path)}
>
{i18n.translate('home.pageHeader.devToolsButtonLabel', {
defaultMessage: 'Dev tools',
Expand Down Expand Up @@ -226,7 +226,7 @@ export class Home extends Component {
size="xs"
>
<FormattedMessage
id="home.changeHomeRouteLink"
id="home.footer.changeHomeRouteLink"
defaultMessage="Display a different page on log in"
/>
</EuiButtonEmpty>
Expand All @@ -238,11 +238,10 @@ export class Home extends Component {
data-test-subj="allPlugins"
href="#/feature_directory"
size="xs"
flush="right"
iconType="apps"
>
<FormattedMessage
id="home.appDirectory.appDirectoryButtonLabel"
id="home.footer.appDirectoryButtonLabel"
defaultMessage="View app directory"
/>
</EuiButtonEmpty>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,12 @@ export const SolutionsSection: FC<Props> = ({ addBasePath, solutions }) => {
<>
<section aria-labelledby="homSolutions__title" className="homSolutions">
<EuiScreenReaderOnly>
<EuiTitle size="s">
<h2 id="homSolutions__title">
<FormattedMessage
id="home.solutionsSection.sectionTitle"
defaultMessage="Pick your solution"
/>
</h2>
</EuiTitle>
<h2 id="homSolutions__title">
<FormattedMessage
id="home.solutionsSection.sectionTitle"
defaultMessage="Pick your solution"
/>
</h2>
</EuiScreenReaderOnly>

<EuiFlexGroup className="homSolutions__content" justifyContent="spaceAround">
Expand Down
72 changes: 52 additions & 20 deletions src/plugins/kibana_overview/public/components/_overview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,82 @@
// Local page variables
$pageWidth: 1200px;

.kibanaOverviewWrapper {
.kbnOverviewWrapper {
background-color: $euiColorEmptyShade;
display: flex;
flex-direction: column;
min-height: calc(100vh - #{$euiHeaderHeightCompensation});
}

.kibanaOverviewHeader {
.kbnOverviewHeader {
background-color: $euiPageBackgroundColor;
border-bottom: $euiBorderWidthThin solid $euiColorLightShade;
}

.kibanaOverviewHeader__inner {
.kbnOverviewHeader__inner {
margin: 0 auto;
max-width: $pageWidth;
padding: $euiSizeXL $euiSize;
}

#kibanaOverviewHeader__title {
@include euiBreakpoint('xs', 's') {
text-align: center;
}
// Accounting for no `flush="both"` prop on EuiButtonEmpty
.kbnOverviewHeader__actionItem .euiButtonEmpty__content {
padding-left: 0;
padding-right: 0;
}

.kibanaOverviewHeader__actionItem {
@include euiBreakpoint('xs', 's') {
margin-bottom: 0 !important;
margin-top: 0 !important;
}
}

.kibanaOverviewContent {
.kbnOverviewContent {
margin: 0 auto;
max-width: $pageWidth;
padding: $euiSizeXL $euiSize;
width: 100%;
}

.kibanaOverviewData--expanded {
flex-direction: column;
// Prevent children from rendering as flex items
.kbnOverviewGettingStarted__content {
display: block;
}

.kbnOverviewGettingStarted__apps .euiIcon__fillSecondary {
fill: $euiColorDarkestShade;
}

.kbnOverviewApps__item {
.kbnOverviewApps__group--primary & {
@include euiBreakpoint('m', 'l', 'xl') {
max-width: calc(50% - #{$euiSizeM * 2});
}
}

.kbnOverviewApps__group--secondary & {
@include euiBreakpoint('m', 'l', 'xl') {
max-width: calc(25% - #{$euiSizeM * 2});
}
}
}

.kbnOverviewNews__content article {
& + article {
margin-top: $euiSizeL;
}

&,
& > * {
margin-bottom: 0 !important;
margin-top: 0 !important;
header {
& > * + * {
margin-top: $euiSizeXS;
}
}
}

.kbnOverviewFooter {
// Prevent children from rendering as flex items
.euiFlexItem {
display: block;
}

// Accounting for no `flush="both"` prop on EuiButtonEmpty
.euiButtonEmpty__content {
padding-left: 0;
padding-right: 0;
}
}
Loading