zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

Add title-to-title scroll feature to Help Menu

Open Niloth-p opened this issue 1 year ago • 1 comments

What does this PR do, and why?

Adds 2 new commands to refocus to view the previous/next help category section.

Hotkeys linting exclusion updated. Hotkeys document regenerated.

Why? This could be helpful when we have several help menu sections.

Outstanding aspect(s)

  • Would need to come up with a better way to display the navigation keys inside the Help Menu. This merely adds the functionality. The prompting for the user can be improved.
  • We could add an extra field to key bindings - something like exclude_from_help_menu to remove entries like these from being listed in the help menu. Currently, these are probably the only 2 commands that may need to be removed from the help menu, but with the addition of contexts, there may be more.
  • Does not add any tests

External discussion & connections

  • [x] Discussed in #zulip-terminal in New hotkeys to scroll title-to-title in Help Menu #T1527
  • [ ] Fully fixes #
  • [ ] Partially fixes issue #
  • [ ] Builds upon previous unmerged work in PR #
  • [ ] Is a follow-up to work in PR #
  • [ ] Requires merge of PR #
  • [ ] Merge will enable work on #
  • [x] Merge may or may not help with work on #1516

How did you test this?

  • [x] Manually - Behavioral changes
  • [ ] Manually - Visual changes
  • [ ] Adapting existing automated tests
  • [ ] Adding automated tests for new behavior (or missing tests)
  • [ ] Existing automated tests should already cover this (only a refactor of tested code)

Self-review checklist for each commit

  • [x] It is a minimal coherent idea
  • [x] It has a commit summary following the documented style (title & body)
  • [ ] It has a commit summary describing the motivation and reasoning for the change
  • [x] It individually passes linting and tests
  • [ ] It contains test additions for any new behavior
  • [ ] It flows clearly from a previous branch commit, and/or prepares for the next commit

Niloth-p avatar Jun 28 '24 09:06 Niloth-p

@Niloth-p For some more direct feedback here, this looks to work OK, though I've not reviewed the code as there are other PRs underway!

Points to consider:

  • ?, n/p 'scrolls' quite cleanly (if abruptly, like J/K)
  • ?, jj, n leaves me half way into a category (navigation), needing kkkk to show the title?

Right now this works well separately from scrolling, but including that it gets confused - at least if the intention is to have a category title visible at the top? (on each title-to-title, except if the bottom is not 'aligned')

neiljp avatar Aug 20 '24 06:08 neiljp