Better display of tags and branches in commit detail view
Release notes
In the commit detail view, you can now see at a glance the tag(s) a commit has been tagged with (if at all) and the list of branches that have the commit at the tip. This can for instance help you contextualize the commit with information from the tag (e.g. critical-hot-fix).
You can further expand the UI elements to see the list of tags and branches that contain the commit in their history. This helps you for instance to understand the list of branches a commit that introduced a bug has propagated to, to know in which you have to revert the commit.
Problem to solve
The individual commit view (commit/<SHA>
) makes no distinction between branches/tags containing the commit and those whose tip is at the commit. The ...
collapsed list may also not be a discoverable way to display this information.
Also on large projects the system fails to show the tags or branches, saying there are too many of them.
Proposal
- In the commit view (
commit/<SHA>
) addtags
row to the details section- Display tags the commit has been tagged with
-
If the commit has not been tagged, display(DisplayingNo tags
No tags
takes up more space and doesn't provide the user with any more context compared to not displaying anything at all. In the future we could explore and validate the need to direct the user to a way to create new tags from this page.) - Show a collapsable list of tags that contain the commit
- do this even when there are many, many tags
- The fact that this list is collapsed by default addresses the performance problem raised in #325871 (comment 1122797403). Load the data only when the user requests it by uncollapsing.
- In the commit view (
commit/<SHA>
) addbranches
row to the details section- Display branches that match the commit
- Show a collapsable list of branches that contain the commit
- do this even when there are many, many branches
- The fact that this list is collapsed by default addresses the performance problem raised in #325871 (comment 1122797403). Load the data only when the user requests it by uncollapsing.
- When there is an error retrieving branches or tags, instead of displaying "Branches unavailable", display the friendly error message. Currently, the friendly error message is what is in the tooltip of "Branches unavailable" like "Project has too many branches to search"
- If there is an error message that has not been considered let's handle it as it comes up.
Desc | Mock |
---|---|
Default view | |
Expanded | |
Scenarios |
Figma: https://www.figma.com/file/8GWAlmeXXnzf2yAarE42Qh/Commits?node-id=1024%3A21026&t=h1gBIFvatuX2gglK-1
Testing
If implemented following spike stage, exploratory and regression testing in the MR recommended. Please ensure all tests (including package-and-test
) pass and include a SET in the MR review.