jjui icon indicating copy to clipboard operation
jjui copied to clipboard

help menu doesn't display properly in tmux

Open baggiiiie opened this issue 2 months ago • 4 comments

Description

  • when jjui is invoke in a tmux window with horizontal split, help menu doesn't not display properly
  • this is properly caused by the help menu gets its width and height from calculating the content's row length and column length, instead of dynamically adjusted with viewport
  • jjui --version: 0.9.4

Steps to Reproduce the Problem

  1. open a tmux session with horizontal split
  2. invoke jjui
  3. invoke help menu
Image

Expected Behavior

  • help menu adjust its side to the view port

Actual Behavior

  • help menu does not display properly and goes beyond the view port

Specifications

  • Platform: macOS
  • Version: 0.9.4

others

  • note that other secondary stacked-over menu are fine though:
Image

baggiiiie avatar Oct 17 '25 15:10 baggiiiie

I think this is happening because help page is simply too large and wide. It needs to be trimmed down.

idursun avatar Oct 17 '25 16:10 idursun

@idursun i've been looking into different TUI tools for this kind of larger menu display.

i think lazygit's help menu is pretty neat (tho might not be so applicable for jjui as i do think it's nice to have more items shown in one sight). maybe scrollable two columns would work!

another approach i've seen is (losing some aesthetic): Image

baggiiiie avatar Oct 17 '25 16:10 baggiiiie

I've always loved how vim-whichkey or emacs-transient display menus: incrementally while also being able to search key-bindings, and bellow the status bar, that was my inspiration when I implemented jjui's leader feature. I would love if jjui had a overall which-key menu bellow, instead of a "help panel" or let the help panel be just that.

vic avatar Oct 17 '25 18:10 vic

Hey folks, thanks for the suggestions here.

While working on the v0.10 branch, I found myself having to reimagine how to show the possible key bindings in a nice unified way. Since v0.10 allows single and multi key presses, the current way of showing them in the status line is not going to scale.

Among all the possible options, I like the which-key approach more than the others. I will probably get rid of the help window in v0.10, and replace it with a view that displays under the status line to show the possible key bindings with a longer explanation next to each key press.

idursun avatar Oct 17 '25 21:10 idursun