Add to next and previous commit buttons when viewing commits in merge request
Feature flag: mr_commit_neighbor_nav
(default: true
)
Problem to solve
To review a merge request commit by commit (one commit at a time), I have to open each commit from the commits tab and wait for the whole page to reload. This is inconvenient and makes commit by commit review workflows in GitLab very painful.
Further details
The minimal improvement we can make is once in the commit mode, providing basic navigation. Further improvements are also needed to make this workflow cleaner.
Proposal
- add simple buttons
Next commit
andPrevious commit
buttons - add keybindings to switch between commits
-
n
for next commit -
p
for previous commit
-
Mockup |
---|
![]() |
Availability & Testing
- No risk to availability expected
- New unit tests should provide enough coverage of the small change needed to facilitate the navigation (to the
diffs.json
response), and the navigation itself. - It would be worthwhile confirming nothing unexpected happens when commits are added/changed (including after a force push), and when viewing different versions.
- No need for a new E2E test, and the change isn't expected to affect existing E2E tests.