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

Add option to KeyCombo component to hide key text #1980

Closed
tnrich opened this issue Jan 9, 2018 · 8 comments
Closed

Add option to KeyCombo component to hide key text #1980

tnrich opened this issue Jan 9, 2018 · 8 comments

Comments

@tnrich
Copy link
Contributor

tnrich commented Jan 9, 2018

It would be nice to have the option to not have the little text next to the special keys.
image
Aka there would no longer be "shift", just the icon.

@cmslewis
Copy link
Contributor

cmslewis commented Jan 9, 2018

Cool idea / makes sense. Would happily review a PR if you want to try tackling this, @tnrich!

@giladgray
Copy link
Contributor

while i'm not opposed a feature that hides the name, i will say that we deliberately decided to always include the key name because the special symbols are not as widely known or used. omitting the name is a quick path to accessibility problems.

@tnrich
Copy link
Contributor Author

tnrich commented Jan 10, 2018

@giladgray I think that makes sense most of the time but I was interested in a condensed version for use as context menu labels.

@giladgray
Copy link
Contributor

@tnrich I think this component will be too visually heavy for menu item labels -- it's got a strong shadow so it looks like a keyboard key.

@tnrich
Copy link
Contributor Author

tnrich commented Jan 10, 2018

@cmslewis I put in a PR above. @giladgray I am just updating the css in my app to make it look nice but I think it would be a cool use case to build this component into blueprint MenuItem component as a keyCombo prop or something.

@llorca
Copy link
Contributor

llorca commented Jan 10, 2018

Why not use the icon directly if you need it as a label within a context menu?

@tnrich
Copy link
Contributor Author

tnrich commented Jan 10, 2018 via email

@giladgray
Copy link
Contributor

@tnrich yo i actually implemented this in #2256 without realizing there was an issue! <KeyCombo minimal> removes the <kbd> frames and the "Shift" text. see it in action in the new docs sidebar for button hotkeys.

@giladgray giladgray added this to the 2.0.0 milestone Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants