-
I'm in the process of converting the menus we have in DV from MUI to the @cooper-joe told me ideally the functionality should be kept as it was there before. Is this something we want to add in The opening/closing of the menu is handled by the apps via conditional rendering, but by supporting somehow the Esc functionality in |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
We've come across requests for keyboard shortcuts for other components as well. I think if we want to do something like this, we should first take a look at how we'd want to solve this across all our components, before diving into the specifics. Probably good to see how libs like https://github.com/uber/baseweb and https://evergreen.segment.com/ are solving it. Then once we have a general approach we could look towards specific usecases, like this one. |
Beta Was this translation helpful? Give feedback.
-
I've created an issue to track keybinds for the It's part of an Epic that covers all keyboard shortcuts for components. As @ismay mentions, we have some research work to do before deciding on how this is going to work. We've run into global vs. local keybind problems in the past and need to investigate on how to make sure that we have a sound strategy to avoid problematic collisions. |
Beta Was this translation helpful? Give feedback.
-
The workaround I recommend before UI has native functionality to handle keybinds is to implement it in the Application in a way that makes it easy to remove once UI support keybinds. The caveat here is to only implement the absolutely bare minimum in the App and only if it is not possible to wait for the UI implementation. For example, that How |
Beta Was this translation helpful? Give feedback.
The workaround I recommend before UI has native functionality to handle keybinds is to implement it in the Application in a way that makes it easy to remove once UI support keybinds.
The caveat here is to only implement the absolutely bare minimum in the App and only if it is not possible to wait for the UI implementation.
For example, that
Esc
should close aMenu
can quickly be verified (by @cooper-joe) and may be reasonable to implement.How
Tab
or arrow keys should behave is not reasonable to add on the Application side and it is much better to wait for UI to support.