Skip to content

[New Nav Feature] EuiPinnableListGroup - #3061

Merged
cchaos merged 12 commits into
elastic:feature/collapsible_navfrom
cchaos:into-feature/collapsible_list
Mar 16, 2020
Merged

cchaos merged 12 commits into
elastic:feature/collapsible_navfrom
cchaos:into-feature/collapsible_list

Conversation

@cchaos

@cchaos cchaos commented Mar 12, 2020 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@elizabetdev elizabetdev 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.

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

@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.

This is a good idea 👍

I think we need i18n for the labels

@cchaos

cchaos commented Mar 13, 2020

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

👉 cchaos#31

@kibanamachine

Copy link
Copy Markdown
Contributor

@cchaos

cchaos commented Mar 13, 2020

Copy link
Copy Markdown
Contributor Author

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

cchaos commented Mar 13, 2020

Copy link
Copy Markdown
Contributor Author

@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.

@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 👍

@cchaos

cchaos commented Mar 16, 2020

Copy link
Copy Markdown
Contributor Author

Jenkins, test this

@kibanamachine

Copy link
Copy Markdown
Contributor

@cchaos
cchaos merged commit 942cc34 into elastic:feature/collapsible_nav Mar 16, 2020
@cchaos cchaos mentioned this pull request Mar 16, 2020
8 tasks done
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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