Repository navigation
GitHawk 0.6.0
The release that makes the mouse optional. Hold Shift and the panel tells you
every key it has; the graph takes a cursor and the arrows move it; three chords
reach git from the editor.
Still marked Preview on the Marketplace: the known limitations at the bottom
of the README are real, and a 1.0 should not have them.
Added
-
Hold Shift to see the keyboard. Every control that has a shortcut shows
its key on the control itself while Shift is held; keep holding and press the
key to run it. Basecamp's idea, and it works because the list of shortcuts is
the screen rather than a page in the documentation — always accurate, always
beside the thing it acts on.A badge appears only where the key does something, and the same list decides
both, so the two can never disagree: fold the branch list away and its four
keys leave with its badges.Refresh, fetch, pull and push are
R F U P; the repository picker isO; the
two side panes areBandD; the branch filter isK; the three managers
areM,WandS; a multi-commit selection addsCandX. -
Check out a branch from the toolbar, or with
Shift+T. The branch name
beside the repository was a label; it is a picker now, for the same reason the
repository next to it is one. Switching branch was the most common thing a git
tool does and the only one that needed the sidebar, a filter, three tabs and a
menu to reach. -
Three keys in the editor, all chords under
Cmd/Ctrl+K, none of them
bound by VS Code already:Cmd+K BBlame on, and off again Cmd+K HWho wrote this line Cmd+K GShow this line's commit in the graph All three are in the editor's right-click menu too, under a GitHawk
submenu, which is where they announce themselves: VS Code prints each item's
chord beside it, and a shortcut nobody can find is a shortcut nobody has. The
hover card namesCmd+K Gnext to its "show in the graph" link for the same
reason.Cmd+K Hshows the card the mouse already gets, at the caret, and works
whether or not the annotations are on — turning the column on to ask one
question and off again afterwards is the work it saves.The card moved from the decorations to a real hover provider to get there:
only a provider's contribution can be opened from the keyboard. That also
fixed it being drawn twice, once from each source, and means a hover anywhere
on the line answers rather than only one over the label.
Fixed
-
"Show in the graph" no longer errors when the file is in another
repository. A workspace usually holds several, and the file being read is
often not in the one the panel is pointed at. The commit was looked up in the
wrong repository and the answer wasGitHawk could not compare: fatal: bad object— nothing was missing and nothing was wrong, the question had simply
gone to the wrong place. GitHawk now follows the file: it switches to the
repository the line belongs to, waits for that graph, and then shows the
commit. -
"Show in the graph" works with the panel closed. Opening the panel does
not build it, so the reveal was sent to a webview that did not exist yet and
dropped: the Changes tree filled, the graph selected nothing, and it read as
the request being ignored. The message now waits for somewhere to send to, and
the graph holds a reveal that names a commit whose rows have not arrived. -
Drive the graph without the mouse.
Shift+Gputs a cursor on a commit;
the arrows,Home,End,PgUpandPgDnmove it;Enteris the left click
andShift+Enterthe right one. The cursor is not the selection, which is
what makes it cheap: reading your way down a branch asks the host nothing,
where a cursor that selected as it moved would spawn a worktree per keystroke.Shift+VturnsSpaceinto a picker, with a banner that says so — a mode
you can be in without knowing is the one thing wrong with modes. Nothing is
sent while you choose, which is the whole point:Enterthen shows the
combined changes and leaves,Escleaves and keeps the picks.Shift+Aasks for the selection's changes at any time, however it was made.Rows are a real listbox now — one roving tab stop rather than five hundred, a
focus ring on the cursor, androle="option"witharia-selected, so a screen
reader is told what a sighted reader can see.The three graph keys act on the whole list rather than on any one control, so
they have nowhere to hang a badge. They get a strip of their own in the corner
of the graph, on the sameShift, with a word each — a bare letter is enough
on a button that already says "Refresh" and says nothing floating over a graph. -
Expand the panel to the window, with the
⇕button in the toolbar or
Shift+E. The panel's height belongs to the workbench, so this asks VS Code
to run its owntoggleMaximizedPanel— which is also why it is one toggle and
not two buttons: there is no way to ask which state the panel is in.VS Code already has a chevron for this in the panel's title bar. Duplicating it
is deliberate: a graph is the one thing in that panel that always wants more
height, the title bar is chrome most readers never look at, and a shortcut has
to have a control to put its badge on.The badges wait a quarter of a second before appearing, because Shift is
already a modifier here — Shift-click extends a selection in the graph — and
without the pause every range made the panel flash a dozen badges. A capital
typed into the branch filter stays a capital, and Ctrl, Cmd and Alt
combinations are left to VS Code.