Add collapsible commit component for blob page on narrow viewports

What does this MR do and why?

This MR adds a new vue component that renders for blob page on narrow viewports.

This is based on !172632 (merged) and is half of the work for closing #504359 (closed).

Description MR

For both blob and repository view:

Move history button to commit box on larger viewport

Keep the button in header on small viewport

!172632 (merged)

For repository page:

Add new Vue component in app/assets/javascripts/repository/components/ for narrow viewpoint

!172634 (merged)

For blob page:

Add new haml component in app/views/projects/commits/ for narrow viewpoint

👈🏻 this MR

References

Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

Blob page

Note: this link is good as it has a commit message body to test the collapse/expand of commit message details

Screenshot 2024-11-12 at 1.47.59 AM.png

Screenshot 2024-11-13 at 7.31.45 PM.png

Blob page - narrow viewport

Note: this link is good as it has a commit message body to test the collapse/expand of commit message details

Screenshot 2024-11-12 at 1.48.58 AM.png

Screenshot 2024-11-13 at 10.05.44 PM.png

How to set up and validate locally

  • Avatar: Displayed to show the who in the latest change
    • Not displaying name as there could be long names and/or multiple author/commiters that could affect the layout. This could be revealed in the expanded state.
  • Time: Displayed to show the when was the latest change
  • Commit: Reference to the latest change, clicks on it goes to the commit detail view
  • ellipsis: View commit details inline
  • History: Links to the commit list

Related to #504359 (closed)

Edited by Diana Zubova

Merge request reports

Loading