lntop
lntop copied to clipboard
Proposal: Navigation overhaul
I propose a rather radical navigation UI overhaul depicted in above partial screenshot. We would get rid of the menu completely. Instead, navigation between views would be completely based on keyboard shortcuts. Hints of the shortcuts would be shown in the footer with the current view highlighted.
I would maybe also get rid of the Enter and Quit hints as these feel quite self-evident and intuitive. Any user familiar with CLI tools such as top
, would try <q> or <Ctrl-c> to quit, which are already supported. Optionally, these hints could be left in the footer. What do you think?
Currently, switching to the routing view requires a total of five key presses: <F2> <down> <down> <enter> <F2>. In contrast, in the proposed navigation logic, only one key press is needed, <r>. I think, the former is a representation of GUI style logic while the latter represents a more traditional CLI thinking. This would also simplify the code as we would get rid of the menu view completely.
The above screenshot is from a non-functional mock-up. If this proposal is endorsed by the developers and the users, I will proceed with the actual implementation.
@juhi24 I like the idea. Even though the current vim-like navigation eases things you still need a couple of keystrokes to navigate through the menu. One drawback I see with your solution is that with increasing number of tabs the main view will get crowded and takes away space to display info. Maybe we could display the tab description optionally? Would also be curious to hear @rkfg's opinion on this.
Sounds very nice! I think for now it should work fine, we only have 3 tabs. If there will be more it can be refactored further. I'd propose using F1/F2/F3 or 1/2/3 for tabs. Also, I think the transactions tab is the least used one. Maybe we can add Tab as an additional key to switch between channels and routing quickly? I do it all the time to check my channels and then see the activity, whether there are failed txs on my node, how big they are and how many forwards there were. Note to self: add tx forward frequencies (total/successful) to the summary header, it's a great stat.
Thanks for the comments and taking the idea further. Based on this feedback and once I've got my new node set up, I can start implementing this. Perhaps as a hacktoberfest project. Adding the "hacktoberfest" topic/tag to the repo would be appreciated.
I personally have no strong opinion on the keybinds to change tabs. However, for the sake of consistency I think 1/2/3 would be better as that's how pages are switched in ncmpcpp
, a TUI interface for MPD player. And Fn keys in htop are used for actions, not switching. In the recent htop version it's also possible to switch to I/O mode with Tab hence the suggestion for lntop.