Skip to content

UX: Add one-key shortcuts for direct panel navigation - #84

Open
lecheel wants to merge 3 commits into
git-bahn:masterfrom
lecheel:master
Open

lecheel wants to merge 3 commits into
git-bahn:masterfrom
lecheel:master

Conversation

@lecheel

@lecheel lecheel commented Aug 24, 2026

Copy link
Copy Markdown

git-igitt is a great project, and the existing arrow navigation works really well for linear browsing. However, jumping from panel 1 to 4 currently takes multiple keystrokes. This PR adds complementary one-key shortcuts (with numeric labels in the UI) so users can jump directly to any panel while keeping the arrow flow intact. Tested locally—would appreciate your review!

image

- Implement `jump_to_panel` to switch active views
- Map keys 0-3 to specific panels in `main.rs`
- Update `create_title` to display panel IDs in the UI
- Remove redundant newline in `app.rs`
- Format style chain in `ui.rs` for better readability
@peso

peso commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

First of all, thank you for your contribution. It is really appreciated. Below I have tried to argue for why I think it is not the best way to achieve your goal. Also there are some extra requests from my side to make your code fit better into the project. I hope you have time to consider these suggestions.

Your patch
This works, but you have "0" as the branches window, which breaks the left-right flow because that key is to the far right on the keyboard. Also, there is no key "4" for the diff panel. It would also be nice to have it mentioned on the help page (F1). Of course "0" could be left out, as we already have "B" to toggle the branch list (see F1 help page). It is not the same thing, but close.

Motivation
Why do you want to navigate fast to the files panel? I believe it is to see the diff.
I think this illustrates a workflow "locate commit, look at diff" that is worth optimizing the UI for.

Suggested change A
We could make it a zero-keystroke operation by changing the 3 commit-files-diff panels to one panel showing a combined message and diff, which looks like the output of git show
We could add key "F" to toggle between file display (3-panels) and show display (1-panel).

Suggested change B
If this is too much work, I suggest you change your code to let "F" jump between log (current key 1) and files (key 3). This would go under heading "Layout/panels" on the help page.
The show panel mentioned above will then become a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants