sparkle
sparkle copied to clipboard
keyboard shortcuts: are they there or todo?
primary use case to show/hide chat (while it is a floating one).
I see that some provisions were done already to https://github.com/sparkletown/sparkle/commit/45108f229a94d560233442ec39c7a129e8676cc1 provide support for shortcuts, but I wondered -- are any already there and it is just a matter of documentation (and having some "Help" pane) or it ended up non-trivial to support?
I see that some provisions were done already to 45108f2 provide support for shortcuts, but I wondered -- are any already there
Keyboard shortcuts only exist currently for the 'grid view' of the PartyMap
(when enabled), and navigating around that.
- https://github.com/sparkletown/sparkle/search?q=useMousetrap
- https://github.com/sparkletown/sparkle/search?q=useKeyboardControls
- https://github.com/sparkletown/sparkle/blob/staging/src/hooks/useKeyboardControls.ts#L8-L13
- https://github.com/sparkletown/sparkle/blob/staging/src/components/templates/PartyMap/components/Map/Map.tsx#L174-L180
and it is just a matter of documentation (and having some "Help" pane) or it ended up non-trivial to support
It's fairly easy to add new keyboard shortcuts in general, though we would need to be mindful about what is used, where they are added, the scope they apply to, and ensuring they are documented well/etc.
Personally I quite like the model/look of GitHub's ?
shortcut for help:
yeah, I like github's too but probably we wouldn't be in time to add as extensive one. my immediate desire would be c - toggle Chat
, s - toggle Schedule
. If there is f - focus in Search bar
would also be handy. There could also be C - focus in Chat
(might need 2-3 extra lines ;)) which would not only ensure that chat pain is visible, but that focus moves to the message edit box.
Those are AFAIK relevant on most if not all screens.
ok, a working prototype with some gotchas is in https://github.com/sparkletown/sparkle/pull/1416
yeah, I like github's too but probably we wouldn't be in time to add as extensive one.
@yarikoptic Yup, agreed. Was more sharing for the type/style of the ?
help menu modal, rather than suggesting we should implement as comprehensive a collection of shortcuts right now.
migrated to zenhub, check!