-
Notifications
You must be signed in to change notification settings - Fork 842
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
[New Nav Feature] Final docs examples and patterns #3117
[New Nav Feature] Final docs examples and patterns #3117
Conversation
The main reason this is a Draft is because I tried creating a wrapping component guides that does the full screen overlay. The main reason I'm trying to create a component for this is then it will remove all that irrelevant logic from the JS tab. However, I'm having problems, as always, where I want to control the full screen state within the component, but also want to be able to force the component to change state from an external button.... @chandlerprall or @thompsongl Can you help me with this one. I'd really rather not have to control the state externally if at all possible. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3117/ |
43dab28
to
e322ded
Compare
58da630
to
3974d84
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_3117/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3117/ |
Including the addition of the EuiCollapsibleNavToggle component
Preview documentation changes for this PR: https://eui.elastic.co/pr_3117/ |
With @thompsongl's help ❤️ , This is now ready for review. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3117/ |
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.
Looks pretty clean. Nice work. I know I should have caught this earlier, but for the screen reader stuff it would be nice to use a role group or something that gave the number of items in the various groups [2 of 7]...etc.
docked={navIsDocked} | ||
onClose={() => setNavIsOpen(false)}> | ||
{/* Dark deployments section */} | ||
<EuiFlexItem grow={false} style={{ flexShrink: 0 }}> |
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.
There's a bunch of style tags in here. I know it's just docs, but likely this stuff will just be copy pasted. Should we make some selectors for these things since they'll need to make it anyway?
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.
That's actually good....? Just because they're necessary for the scrolling to work properly...
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.
Sorry, I guess I just meant, none of these looked dynamic. Should we make some actual css selectors rather than style tags, since they seem necessary for the component to work.
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.
Ok so here's what's going on with the style tags. Really the only ones are:
flex-shrink: 0
on EuiFlexItemsmaxHeight
on the collapsible nav group
Remove both of those and the nav still works it's just all one big scroll. This implementation is a custom one where we (Kibana) wants the pinned section to scroll independently of the rest. They're not necessary for the Collapsible nav to work.
If we add a class for no. 1, It would be some arbitrary .eui-flexShrinkNone
which I really don't think we want to go down this utility class path. Or it would be a specific .euiCollapsibleNavGroup__wrapper
that simply adds the that one property in which case most consumers won't know why they need it or what it's doing.
We can't add a class for no. 2, because the value is completely dependent on the consumer and honestly just a best guess by me right now.
So really then it's back to, do we really want to add some random class for flex-shrink: 0
when ,honestly, shrink
should just be a prop on EuiFlexItem like grow
. But I tried adding this and it got a bit complicated so I abandoned.
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.
I was thinking it was more something like euiCollapsableNav__something
that just applied that stuff. Either way, your call. Just felt weird copy/pasting style tags.
@snide I'm not sure where you need this. No matter which component i add it to, it doesn't read out as you want. EuiListGroup's do say the total number of list items per group. |
@myasonik This is probably a good time to do an a11y assessment. 🙏 |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3117/ |
You can make me an issue. I can tackle it at a later time. I always forget how to do it. It's often tied extremely closely to the semantics in the page. It's just a nice to have I always try to apply for |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3117/ |
Not 100% sure where all feedback should go (whether it's part of this work specifically or not) but I'll put everything I have here and whatever you want can be pulled out into future tickets if you like.
Happy to hop on a call or something if any of this isn't clear 🙂 |
- Focus state for accordions without arrow toggles (underline) - Added link name in pin/unpin titles
Preview documentation changes for this PR: https://eui.elastic.co/pr_3117/ |
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.
From a functionality standpoint, I think this looks pretty good. Code issues were cleaned up or are minor. I think we should consider doing a mobile pass for this component beyond what currently exists. Specifically, the double scrolling interface should probably be dropped on small screens. I think that can be done in a later PR so that we can start on the harder Kibana implementation details first.
Most of the a11y issues have now been addressed with the exception of the toggle button focus. It's semi-hard to consistently reproduce and to be done properly, would require EuiCollapsibleNav to accept a @thompsongl Would you mind doing a quick pass on the code side (at least just for anything in |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3117/ |
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.
src
changes LGTM 👍
* Fixed the passing of `size` from EuiListGroup to items * Fix padding of `EuiCollapsibleNavGroup` if extra action is passed * Reset line-height of heading in button * Fix `title` type for EuiCollapsibleNavGroup * Starting full pattern example * Adjusted EuiFlyout position based on fixed EuiHeader * Utility CSS helper for simple overflow scroll without shadows * Adding GuideFullScreen component * Adding content and storing states * Fixing incompatible type with `href` * Fix EuiHorizontalSizing when in flex groups * Cleanup * Quick fix to nav heading * Using subdued text color * Ghost button in dark section for now * Some browser fixes * Fixes for mobile - Including the addition of the EuiCollapsibleNavToggle component * render prop pattern * clean up * Adding accessibility (?) * One more a11y piece * Addressing some a11y concerns - Focus state for accordions without arrow toggles (underline) - Added link name in pin/unpin titles * More a11y fixes
* [Feature] Added `EuiCollapsibleNav` component (#2977) * [New Nav Feature] Added `ghost` colored EuiListGroupItem (#3018) * [New Nav Feature] Created `EuiCollapsibleGroup` (#3031) * [New Nav Feature] EuiPinnableListGroup (#3061) * [K8 Nav Feature] Added `home` and `menu` glyphs to EuiIcon (#3109) * [New Nav Feature] Final docs examples and patterns (#3117) * [New Nav Feature] Move collapsible nav toggle button to be part of EuiCollapsibleNav (#3168)
* [Feature] Added `EuiCollapsibleNav` component (elastic#2977) * [New Nav Feature] Added `ghost` colored EuiListGroupItem (elastic#3018) * [New Nav Feature] Created `EuiCollapsibleGroup` (elastic#3031) * [New Nav Feature] EuiPinnableListGroup (elastic#3061) * [K8 Nav Feature] Added `home` and `menu` glyphs to EuiIcon (elastic#3109) * [New Nav Feature] Final docs examples and patterns (elastic#3117) * [New Nav Feature] Move collapsible nav toggle button to be part of EuiCollapsibleNav (elastic#3168)
This PR is primarily docs
1. Example showing different types of children that can be passed to EuiCollapsibleNavGroup
Including EuiPinnableListGroup, simple EuiListGroup, custom content to create a callout style.
2. Full screen example with header and saved pinning/open/closed states
This saves the states in local storage, but encourages consumers to use the correct data store for their application.
Checklist
[ ] Props have proper autodocs[ ] Checked for breaking changes and labeled appropriately[ ] A changelog entry exists and is marked appropriatelyWill be added in feature PR