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

[New Nav Feature] EuiPinnableListGroup #3061

Merged

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Mar 12, 2020

EuiPinnableListGroup

Collapsible nav groups can take any children they want. Users can put a simple list of links or use EuiListGroup. To support the "pinning" action for K8, I created a component that simply extends EuiListGroup and applies a standardized pinnable action.

I had originally created this as EuiCollapsibleList but felt it really wasn't tied to the collapsible nav but just another pattern on top of list group.

Screen Shot 2020-03-12 at 16 30 02 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

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3061/

Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

It looks good! I reviewed the code and tested the build preview.

I'm just wondering if the "Pinned button with onClick" focus state shouldn't be similar to the active link state.

Screenshot 2020-03-13 at 16 06 53

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

This is a good idea 👍

I think we need i18n for the labels

@cchaos
Copy link
Contributor Author

cchaos commented Mar 13, 2020

I'm just wondering if the "Pinned button with onClick" focus state shouldn't be similar to the active link state.

Yeah that's an artificat from EuiListGroup itself. I think I can fix though

@thompsongl
Copy link
Contributor

👉 cchaos#31

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3061/

@cchaos
Copy link
Contributor Author

cchaos commented Mar 13, 2020

I have pushed a commit that fixes the EuiListGroup focus/hover states and added the ability for consumers to override the default titles for the pin icons.

@cchaos cchaos requested a review from thompsongl March 13, 2020 20:45
@cchaos
Copy link
Contributor Author

cchaos commented Mar 13, 2020

@myasonik The one thing we should consider with a11y in the underlying EuiListGroup is the tabbing. It might get really cumbersome for users to have to tab from link -> pin icon -> link -> pin icon, etc... I'm really not sure how to handle this off-hand but is not a problem specific to this PR.

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@cchaos
Copy link
Contributor Author

cchaos commented Mar 16, 2020

Jenkins, test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3061/

@cchaos cchaos merged commit 942cc34 into elastic:feature/collapsible_nav Mar 16, 2020
@cchaos cchaos mentioned this pull request Mar 16, 2020
8 tasks
cchaos added a commit that referenced this pull request Mar 17, 2020
* Added EuiCollapsibleNavGroupList component

* Added content to EuiCollapsibleNavList

* Update to use latest props from EuiListGroup

* Passing `color` to EuiListGroup

* Added active link to examples

* Better docs for nav list and added snippets

* cleanup

* Renamed `EuiCollapsibleList` to `EuiPinnableListGroup` and moved to `list_group`

Also made `onPinClick` required

* i18n

* Fix focus and focus-within states

With IE fallback

* Allowing pin icon title/aria-labels to be custom

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
cchaos added a commit that referenced this pull request Mar 18, 2020
* Added EuiCollapsibleNavGroupList component

* Added content to EuiCollapsibleNavList

* Update to use latest props from EuiListGroup

* Passing `color` to EuiListGroup

* Added active link to examples

* Better docs for nav list and added snippets

* cleanup

* Renamed `EuiCollapsibleList` to `EuiPinnableListGroup` and moved to `list_group`

Also made `onPinClick` required

* i18n

* Fix focus and focus-within states

With IE fallback

* Allowing pin icon title/aria-labels to be custom

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
cchaos added a commit that referenced this pull request Mar 26, 2020
* Added EuiCollapsibleNavGroupList component

* Added content to EuiCollapsibleNavList

* Update to use latest props from EuiListGroup

* Passing `color` to EuiListGroup

* Added active link to examples

* Better docs for nav list and added snippets

* cleanup

* Renamed `EuiCollapsibleList` to `EuiPinnableListGroup` and moved to `list_group`

Also made `onPinClick` required

* i18n

* Fix focus and focus-within states

With IE fallback

* Allowing pin icon title/aria-labels to be custom

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
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)
@cchaos cchaos deleted the into-feature/collapsible_list branch March 27, 2020 14:51
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)
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.

4 participants