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

EuiNavDrawerGroup default icon #1729

Merged
merged 4 commits into from
Mar 13, 2019
Merged

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Mar 13, 2019

Fixes #1724

Instead of forcing a consumer to pass an icon, if they don't provide one, one will be created a la Avatar style and use the name to provide initials to display in collapsed view.

In order to do so, I also pulled the initials calculation out from EuiAvatar to a string service. This could probably be generalized further ( still kind of Avatar specific ) but in the interest of time, it all still works.

Checklist

  • This was checked in mobile
  • This was checked in IE11
  • This was checked in dark mode
  • [ ] Any props added have proper autodocs
  • Documentation examples were added
  • A changelog entry exists and is marked appropriately
  • [ ] This was checked for breaking changes and labeled appropriately
  • Jest tests were updated or added to match the most common scenarios
  • [ ] This was checked against keyboard-only and screenreader scenarios
  • [ ] This required updates to Framer X components

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

LGTM, though apparently I can't JavaScript right now.

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Tested for functionality and scanned the code. Also tested ie11. LGTM

@chandlerprall
Copy link
Contributor

jenkins test this

@cchaos
Copy link
Contributor Author

cchaos commented Mar 13, 2019

Tested in Kibana:

before

after

@cchaos cchaos merged commit de5bfb4 into elastic:master Mar 13, 2019
@cchaos cchaos deleted the nav-drawer-default-icon branch March 13, 2019 22:20
Shigawire pushed a commit to Shigawire/eui that referenced this pull request May 10, 2019
* Pulled the initials calculation out from EuiAvatar to a string service

* Added a line-height fix for images

* Added a custom icon to nav drawer items that don’t provide one
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.

3 participants