Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a
keyboard
glyph to EuiIcon. This icon is required to finish #6036. We could use the iconkeyboardShortcut
but as we can see from the screenshots on #6036 it's hard to tell what the icon does just looking at it. That's why we decide to create a new icon.I tried different designs that can be found here: Figma
I run multiple tests in Figma to see how this icon would look in a EuiDataGrid. The prototype can be found here: Figma prototype.
After that, I showed the prototype to @chandlerprall and @constancecchen and both of them picked option 6. I run more tests and this icon didn't work out for non-retina displays (IMO). It gets blurry because the circles are not in the grid and they are not 1px but 1.5px.
So I went back to design and this time I focused on an icon that would work for non-retina displays. From all the tests option 8 worked the best and that's the option I'm adding to EUI.
Final Design
Final design light and dark theme
Deprecation of
keyboardShortcut
in favor ofkeyboard
Because the new icon
keyboard
is more generic we're deprecating the iconkeyboardShortcut
in favor of the new one. I asked @ryankeairns about his opinion (#6058 (comment)) and we're on the same page.I searched all Elastic usages of the
keyboardShortcut
icon and only found the following one: https://github.com/elastic/kibana/blob/f990f31023784f71dde3bb8a74ba52c9c60bbf69/x-pack/plugins/canvas/public/components/help_menu/help_menu.component.tsx#L55I created a mock in Figma to show how the new icon would look in Kibana. I also replaced one icon usage in our EUI docs.
Checklist