Skip to content

[Feature] Added EuiCollapsibleNav component - #2977

Merged
cchaos merged 7 commits into
elastic:feature/collapsible_navfrom
cchaos:into-feature/collapsible_nav/nav
Mar 9, 2020
Merged

cchaos merged 7 commits into
elastic:feature/collapsible_navfrom
cchaos:into-feature/collapsible_nav/nav

Conversation

@cchaos

@cchaos cchaos commented Mar 3, 2020 •

Copy link
Copy Markdown
Contributor

Feature branch

This is the primary container for the new EuiCollapsibleNav component. It doesn't do much but

  • extend EuiFlyout,
  • push to the left side,
  • add docked ability, and
  • setup some responsive behavior

Basic flyout behavior

Screen Recording 2020-03-03 at 06 40 PM

Responsive behavior with docking

Screen Recording 2020-03-03 at 06 40 PM

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in IE11 and Firefox
  • Props have proper autodocs
  • Added documentation examples
  • Added or updated jest tests
  • [ ] Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • [ ] A changelog entry exists and is marked appropriately Will be added via the Feature Branch

@cchaos

cchaos commented Mar 3, 2020

Copy link
Copy Markdown
Contributor Author

@myasonik What kind of aria-alert or whatever do you think we will need for when the user initiates the opening of the navigation drawer?

@thompsongl Is there any way to add tests for the responsive behavior? Can it mock setting the window to a certain size?

@kibanamachine

Copy link
Copy Markdown
Contributor

@cchaos
cchaos requested review from elizabetdev and thompsongl March 4, 2020 01:20

@snide snide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some smaller stuff I noticed. Couple questions.

@myasonik myasonik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When undocking the nav, I was surprised when the nav was still open. What do you think about closing the nav when undocked?

@cchaos

cchaos commented Mar 4, 2020

Copy link
Copy Markdown
Contributor Author

When undocking the nav, I was surprised when the nav was still open. What do you think about closing the nav when undocked?

The current behavior is how it was working during the Usability tests. We didn't hear any feedback specifically on this interaction so I'm not inclined to change it.

@cchaos

cchaos commented Mar 4, 2020

Copy link
Copy Markdown
Contributor Author

I should also mention that the example for CollapsibleNav is not complete. It will get fleshed out with all the other inner content, but for now I'm just trying to nail the actual "drawer" part.

@thompsongl

thompsongl commented Mar 4, 2020 •

Copy link
Copy Markdown
Contributor

Is there any way to add tests for the responsive behavior? Can it mock setting the window to a certain size?

I'm not sure that any @media queries would get used (jsdom does not actually draw anything), but render changes based on window.innerwidth in JS should get picked with something like

https://gist.github.com/thompsongl/cec1e5be12078ff9e56dc78296b88e27

Also added a `close` button
@cchaos

cchaos commented Mar 5, 2020

Copy link
Copy Markdown
Contributor Author

Ok the component has been updated to not render a EuiFlyout, but just reuses some styles and copies some functionality over. I addressed (most) of the other comments as well.

I also added a visable "close" button (though I supposed we could make it a accessibleOnFocus element instead).

@cchaos
cchaos requested review from myasonik and snide March 5, 2020 21:57
@kibanamachine

Copy link
Copy Markdown
Contributor

@myasonik

myasonik commented Mar 9, 2020

Copy link
Copy Markdown
Contributor

Is there any way to have the portal render at the start of the document for when rendering the docked version of the nav? Having it at the end of the document, I think, is pretty confusing from a tab order perspective.

@snide snide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My issues were addressed and I did a quick code review of the new restructuring. I'd suggest like DataGrid, setting up a PR for the feature branch merge (in draft mode) and then keeping links to these sub PRs in that PR. That way you'll have a nice reference when you need to write your CL.

We don't often use extends, but looks OK here. Mixing might be better so you can pass stuff to it eventually. Very small comment though.

@cchaos

cchaos commented Mar 9, 2020

Copy link
Copy Markdown
Contributor Author

Is there any way to have the portal render at the start of the document for when rendering the docked version of the nav? Having it at the end of the document, I think, is pretty confusing from a tab order perspective.

The component does not live in a portal. It's DOM will get inserted wherever you place the component. The example in the EUI docs is at the tail end of the DOM structure so that's where it gets rendered.

@cchaos

cchaos commented Mar 9, 2020

Copy link
Copy Markdown
Contributor Author

I'd suggest setting up a PR for the feature branch merge (in draft mode)

Yep, I have to have new commits in the branch before Github allows me to create a PR, so I need this one in first.

@thompsongl thompsongl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM; works as expected

@cchaos cchaos changed the title Added EuiCollapsibleNav component [Feature] Added EuiCollapsibleNav component Mar 9, 2020
@cchaos
cchaos merged commit 7d7df65 into elastic:feature/collapsible_nav Mar 9, 2020
@cchaos
cchaos deleted the into-feature/collapsible_nav/nav branch March 9, 2020 20:19
@cchaos cchaos mentioned this pull request Mar 9, 2020
8 tasks done
cchaos added a commit that referenced this pull request Mar 17, 2020
* Setting up file structure

* Added EuiFlyout to render, moved to left, and added docking

* mock euioverlaymask

* Better docs for EuiCollapsibleNav

* Cleanup css

* Adding responsive behavior

* No longer using EuiFlyout directly

*  added a `close` button
cchaos added a commit that referenced this pull request Mar 18, 2020
* Setting up file structure

* Added EuiFlyout to render, moved to left, and added docking

* mock euioverlaymask

* Better docs for EuiCollapsibleNav

* Cleanup css

* Adding responsive behavior

* No longer using EuiFlyout directly

*  added a `close` button
cchaos added a commit that referenced this pull request Mar 26, 2020
* Setting up file structure

* Added EuiFlyout to render, moved to left, and added docking

* mock euioverlaymask

* Better docs for EuiCollapsibleNav

* Cleanup css

* Adding responsive behavior

* No longer using EuiFlyout directly

*  added a `close` button
cchaos added a commit that referenced this pull request Mar 27, 2020
* [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)
elizabetdev pushed a commit to elizabetdev/eui that referenced this pull request Mar 30, 2020
* [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)
@snide snide mentioned this pull request May 15, 2020
38 of 48 tasks
@cchaos cchaos mentioned this pull request Sep 23, 2020
7 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants