-
Notifications
You must be signed in to change notification settings - Fork 6
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 keyboard hint to button (streamlit-extras) #7
Comments
Add a little explanation. |
Ah, yeah, I did, but the action closed the issue when I changed the wording, here it was. Let me past it here for reference: https://arnaudmiribel.github.io/streamlit-extras/extras/keyboard_text/ It'd be great if button showed this kind of hint inside, not sure how feasible is it, but it would greatly improve UX, should probably be optional. streamlit_shortcuts.button("delete", on_click=delete_callback, shortcut="Ctrl+Shift+X", hint=True) |
So the shortcut key binding should show on the button if hint is set to true right? |
Yes |
Resolves: adriangalilea#7
The st.button() doesn't evaluate html, when you pass the key() as the label. |
Hey @quantum-ernest, that could def work, maybe under would be better instead on the side, care to share a screenshot? |
Nice! Looks a bit rough since it's non responsive(white on dark theme) and the lack of alignment with the button. But could work as a bare implementation, well done! Perhaps scrapping streamlit extras and adding some styled text inside the button would work better. (not sure if possible, just thinking out loud, can't dedicate time atm sadly) Feel free to PR if you think it's good ;) Thank you so much @quantum-ernest |
Closed in 04cf302 |
Resolves: adriangalilea#7
Resolves: adriangalilea#7
https://arnaudmiribel\.github\.io/streamlit\-extras/extras/keyboard\_text/
streamlit-shortcuts/src/streamlit_shortcuts/streamlit_shortcuts.py
Line 7 in eb0ca95
The text was updated successfully, but these errors were encountered: