Ability to collapse/hide commit list in compare view

Description

Very simply, when there are multiple commits (especially 10+), one must scroll quite far to view the diffs in the branch compare view. It would be nice to be able to hide/collapse the commit list so that one doesn't have to scroll past the commits to get to the diffs.

image

Design proposal

Add a collapse/expand arrow. By default, the section should be expanded so that commits are visible, but users have the option to collapse the section if needed. The same collapse/expand element used in the merge request page should be used.

proposal.png

Implementation guide

  • Primary file to modify
    • _commit_list.html.haml
  • Use collapsing functionality in new variant of Crud component being introduced by @seggenberger (in progress)
    • Vue: https://gitlab-org.gitlab.io/gitlab/storybook/?path=/story/vue-shared-crud--default

Feature checklist

Make sure these are completed before closing the issue, with a link to the relevant commit.

  • Feature assurance
  • Documentation
  • Added to features.yml
Edited Jan 22, 2025 by Alyssa Trinh
Assignee Loading
Time tracking Loading