-
Notifications
You must be signed in to change notification settings - Fork 841
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
[EuiHeader] Stacked example #3538
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_3538/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3538/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are small quibbles and shouldn't be considered blockers for merge. I REALLY like the way you're demoing the fixed headers and my immediately want was to see this with the collapsable nav so we can see the fully completed death start.
I'd err towards the final patterns in your examples
It's good to show the flexibility of these components, but you might want to show the end result patterns as the examples, especially in the stacked view.
Preview documentation changes for this PR: https://eui.elastic.co/pr_3538/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Reasoning for holding for changes till the next PR makes sense to me.
Preview documentation changes for this PR: https://eui.elastic.co/pr_3538/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a word in the changelog, but otherwise LGTM!
CHANGELOG.md
Outdated
@@ -35,6 +35,10 @@ | |||
- Removed borders from `EuiFlyout` and `EuiPopover` ([#3477](https://github.com/elastic/eui/pull/3477)) | |||
- Updated `EuiHeader` and components ([#3524](https://github.com/elastic/eui/pull/3524)) | |||
|
|||
**Breaking changes** | |||
|
|||
- A fixed `EuiHeader` no longer automatically padding directly to the `<body>` element ([#3538](https://github.com/elastic/eui/pull/3538)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- A fixed `EuiHeader` no longer automatically padding directly to the `<body>` element ([#3538](https://github.com/elastic/eui/pull/3538)) | |
- A fixed `EuiHeader` no longer automatically adds padding directly to the `<body>` element ([#3538](https://github.com/elastic/eui/pull/3538)) |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3538/ |
**Break**: EuiHeader now requires consumer to use mixin to apply padding to account for fixed position
- Darker in actual dark theme
Co-authored-by: Dave Snider <dave.snider@gmail.com>
Preview documentation changes for this PR: https://eui.elastic.co/pr_3538/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested locally and looked at the code.
@cchaos I think this PR sneaked in a couple of issues into the documentation.
I think this should be Also I am having problems actually applying this without specifying the value (seems the default is not working): @import '@elastic/eui/src/global_styling/variables';
@import '@elastic/eui/src/global_styling/mixins';
body {
@include euiHeaderAffordForFixed;
} results in the error:
Do I need to import a specific other sass file to have this variable working or could this be an issue? Looking for the variable looks like it's only set in any of the global files (that we advice in the documentation to include) for the amsterdam theme, but not any other theme (and only local in the header component, which I assume another project should not directly import)? |
Good catch @timroes , thanks for this. I'll create an issue based on that and get them fixed. |
Part 2/3 for next iteration of K8 support; Fixes #3504
This PR is mostly a docs example as it does not add any new props. However it does contain a breaking change to the way the
position="fixed"
version handles adding body padding. Spoiler, it no longer does.Rendered example:
Dark mode
theme="dark"
now renders slightly darker to create visual separation when they're stacked.Breaking change
Before, when a consumer added
position="fixed"
it would add theeuiBody--headerIsFixed
body class and apply top padding styles. However, some consumers may want this and some may not, but there's no configuration option. And with the allowed stacked headers, EUI cannot know how many headers they are stacking.So now it's on the now consumer to apply the appropriate padding and EUI provides both variables and mixins to help. The fixed header example was updated to describe this in description and snippet.
The stacked example provides a SASS snippet as well.
Known visual problem
In Amsterdam, the new flyout shadows extend top and bottom instead of just to the left of flyouts, so they will overlap any fixed headers. We can’t simply use z-index because of nesting (flyout lives inside of header DOM) and we’d still have issues if they used portals because the flyout would always come after. We may need a specific shadow for flyouts or use clip-mask.
I've added to list of Amsterdam bugs and will be fixed in a later PR.
Checklist
[ ] Props have proper autodocs[ ] Added or updated jest tests[ ] Checked for accessibility including keyboard-only and screenreader modes