-
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
[EuiCollapsibleNav] Fixed docked states on mobile and added more props #3330
Conversation
window.addEventListener('resize', functionToCallOnWindowResize); | ||
|
||
if (navIsDocked) { |
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.
This is where the magic happened 😆 🧙
3e1d46a
to
ce2240f
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_3330/ |
1 similar comment
Preview documentation changes for this PR: https://eui.elastic.co/pr_3330/ |
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 has been requested before and I'll look into it. But it might be a bit complicated at the moment. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3330/ |
retest |
0982f9b
to
48f907a
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_3330/ |
WTF Jenkins.... come on... test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3330/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3330/ |
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.
Changes still LGTM :)
Fixes #3302
There were a couple requests addressed in this PR.
1. Fix the
onClick
handler of the close button whenisDocked
but in mobile versionThe logic here didn't account for this possible state and was updated.
2. Allow the docking breakpoint to be customized
The new
dockedBreakpoint
allows the consumer to pass a number in pixels to replace the hard-coded internal value (now default) of992
. Eventually this should get updated to be one of our tokens or a global constant, but 🤷 for now.3. Allow hiding of the floating
x close
buttonI added
showCloseButton
(with default oftrue
). This thing:4. [Breaking] Flip the prop name of
hideButtonIfDocked
toshowButtonIfDocked
I didn't catch this before when I was creating the component, but negative props can be difficult to understand, so I flipped this from
hide
toshow
. And flipped the default (obviously). At least this was caught pretty early though it is a breaking change.Checklist