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

[K7]: Responsive page layout components #13162

Merged
merged 5 commits into from
Jul 28, 2017

Conversation

snide
Copy link
Contributor

@snide snide commented Jul 27, 2017

Adds components for page layouts.

  • Layouts are modular and you can mix and match components. Spacing works no matter what you do.
  • Layouts are responsive and will stack in mobile layouts.
  • The actual page content can be optionally centered within the browser.

@snide snide requested a review from cjcenizal July 27, 2017 20:10
display: flex;
flex-direction: row;
align-items: stretch;
min-height: 400px; // Temporary till we have a better doc system.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a non-destructive hack I have I needed so that I can show off the centering in the documentation layer. Once the doc tools allow me to view these on their own, a lot of heights will likely turn to 100%.

When that happens, if we decide to fix the header, we'll lightly adjust .kuiPage to compensate.

@snide
Copy link
Contributor Author

snide commented Jul 27, 2017

@cjcenizal I didn't end up putting everything in folders. Mostly because the files are so minimal, it seemed pretty weird to make all that cruft and require more index.js / injex.scss files. Maybe this can be set up more similar to how you have typography and all in one file? I figured I'd leave it to you to find the best way. Feel free to just write overtop anything I have.

@snide snide added the Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. label Jul 27, 2017
Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy moly this is cool! I had one small suggestion. I'll reorganize the folder structure after we merge.

&.kuiPageContent--horizontalCenter {
width: auto;
margin: auto;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we unnest these modifiers to avoid the added specificity?

.kuiPageContent {
  padding: $kuiSizeL;
  background: $kuiColorEmptyShade;
  border: $kuiBorderThin;
  border-radius: $kuiBorderRadius;
  width: 100%;
}

.kuiPageContent--verticalCenter {
  align-self: center;
}

.kuiPageContent--horizontalCenter {
  width: auto;
  margin: auto;
}

@@ -0,0 +1,19 @@
.kuiPageContentHeaderSection {

& + & {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗️ ❗️ ❗️ ❗️ ❗️ ❗️ ❗️ ❗️ ❗️

);
};

KuiPageContent.PropTypes = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add additional tests for these after we merge.

@snide snide merged commit 9eb0a4e into elastic:k7-ui-framework Jul 28, 2017
@snide snide deleted the k7/pageheader branch July 28, 2017 00:05
cjcenizal pushed a commit to cjcenizal/kibana that referenced this pull request Aug 16, 2017
cjcenizal pushed a commit to cjcenizal/kibana that referenced this pull request Aug 26, 2017
cjcenizal pushed a commit that referenced this pull request Sep 19, 2017
Page layout components added to KUI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants