Open neiljp opened 4 years ago
@neiljp I pulled the https://github.com/neiljp/zulip-terminal/tree/rebased-348-for-contextual-help and played with it a bit. I was able to show stream_list
keys whenever the user presses q
to search streams.
It is a good jumping-off point though I am not sure in what context should we display keys from general
, navigation
and searching
categories?
@preetmishra I think we could probably add some contexts, like you've indicated, without needing to achieve a complete solution straight away.
However general
mostly applies everywhere, though ctrl-l is a duplicate (so confusing) and ? will just draw that character in edit mode (search boxes, compose boxes).
It is possible that we will want to separate the help description from the actual contexts to apply it to, and certainly that multiple contexts may apply to particular keys/help being shown.
That said, the help menu categories at the moment are not fixed, and we could expand them to make some things clearer - like esc
does different things in different circumstances, but we just say 'go back' and assume it makes sense. That would have to balance making the help menu too wordy against their use in particular circumstances as hints being perhaps more descriptive?
It is possible that we will want to separate the help description from the actual contexts to apply it to, and certainly that multiple contexts may apply to particular keys/help being shown.
@neiljp I am not sure if I understand the separation bit properly. Could you give an example?
Regarding esc
and other similar keys, we can append the context we're in to change its help text dynamically. For instance, if we're in a write box, we can say 'Go back from the write box'.
Should I proceed with adding some contexts which seem apparent right now?
Hello @zulip/server-hotkeys members, this issue was labeled with the "area: hotkeys" label, so you may want to check it out!
@shreyamalviya did some excellent work on this in #348, which I've rebased against master as of now as the latest commit at https://github.com/neiljp/zulip-terminal/tree/rebased-348-for-contextual-help
That should be able to act as a jumping off point to improve the hints.
It also provides some thoughts for improvements as to where other keys could work.
It would be useful to have this work transparently so that adding keys or context allows the hints to just keep working.