Add keyboard shortcuts to navigate between files in pull request "File Changes" tab #3267
Zak Siddiqui opened 11 hours ago

Problem

In the pull request File Changes tab, changes are reviewed one file at a time. Reviewing a large pull request means repeatedly moving the mouse to the file list and clicking each file in turn. There is currently no way to view all changes in a single scrolling page, so file-by-file navigation is the only workflow available.

Proposal

Add keyboard shortcuts to move to the next / previous file in the File Changes tab without leaving the keyboard:

  • J — go to next changed file
  • K — go to previous changed file

Optionally also support the arrow keys (Down / Up) as aliases, so the behavior is discoverable for users who don't know the vim-style bindings.

Expected behavior

  • Pressing the shortcut selects the next/previous file in the changed-file list and loads its diff, consistent with what clicking that file does today.
  • The currently selected file stays visually highlighted, and the file list scrolls to keep it in view.
  • Shortcuts should not fire while the user is typing in a text input, textarea, or code editor (e.g. when writing an inline review comment), and should not conflict with existing editor/comment bindings.
  • When the first or last file is reached, navigation should stop (no wrap-around) — or wrap, whichever is consistent with other one-file-at-a-time navigation in OneDev.
  • Ideally the shortcut hints are surfaced somewhere, e.g. a tooltip or help entry, so the bindings are discoverable.

Motivation

Makes reviewing large pull requests substantially faster and matches the keyboard-driven review workflow offered by other code review tools.

  • Zak Siddiqui commented 11 hours ago

    I almost was going to ask for the "long" page view that shows all the files, but I stopped myself because I can understand that this may cause extra server or browser load.

    However, as a person who finds it difficult to use the mouse, this feature is very important to me.

1/1
Type
Enhancement
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-3267
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover