Commits view: Add a 'Browse files' button pointing to the Tree/Blob view of current path
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
Seeks to address #536446 (closed) by adding a "Browse files" button to the Commits view that can be used to quickly jump to the Tree or Blob view for the current path.
For example, in gitlab-org/gitlab/-/commits/master/README.md the button would point to gitlab-org/gitlab/-/blob/master/README.md.
(The proposed label is consistent with the button currently shown in the Commit view.)
Screenshots or screen recordings
Scenario | Before | After |
---|---|---|
Directory in default branch | ![]() |
![]() |
File in default branch | ![]() |
![]() |
File in arbitrary branch | ![]() |
![]() |
Responsiveness
Widths:
How to set up and validate locally
- Set up the GitLab Development Kit (GDK) locally (instructions here).
- Check out the changes from this branch into the GDK tree.
- Load http://gdk.local:3000/gitlab-org/gitlab-test/.
- Click on a file/directory.
- Optional: switch branches with the ref-picker dropdown.
- Click on the History button for the last commit affecting the file/directory.
- Click on the new Browse files button. Check that it effectively returns to 4).
Closes #536446 (closed).
Edited by 🤖 GitLab Bot 🤖