Skip to content

Move "History" button into the commit box on directory and file blob pages

Proposal

From !128124 (comment 1495516113)

Move the "History" button that is current in the area of buttons closer to the commit area box.

  • It solves the issue of hiding the button
  • It would be in the same spot regardless of overview (when files is selected as the view), directory, or single file blob view
  • This also addresses a bug where if you click into a file and then use the browser back button, the History button reappears
  • The "History" button is a link now because it navigates you to another page.

image

Expanded state

Alignment of buttons are changed from center to "top"

image

Narrow viewports

In narrow viewports, the History button currently goes full width but the change in this issue makes the change that the History is combined with the commit information.

At narrow viewports instead of the button we will display a gray information box that starts the size of the current button but with progressive disclosure we can show more information.

Things to display:

  • 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
    • This is a nice to have as there is no existing issue asking for this information but since we already do this for the wider viewports it feels natural to include this behaviour in for narrow viewports too. Also having it expandable would reveal the name of the authors.
  • History: Links to the commit list (current behaviour)
Current Proposal - Default Proposal - Expanded
image image image

Technical breakdown

Spike: Repository Usability Improvements: Propose a Vue app structure for Repository and Blob

Edited by Paulina Sedlak-Jakubowska