Skip to content

Show "-" for the MR Changes tab when the number of changes is 0

Thomas Randolph requested to merge tor/feature/unknown-change-count into master

What does this MR do and why?

For #388310 (closed)

Changes the display of "0" MR changes ("the diff size") to be "-".

Please see the linked issue for more in-depth discussion of why - exactly - this display was chosen.

Summary: Sometimes the diff size is computed asynchronously and isn't done before the MR page is loaded. In situations like these, showing "0" isn't quite accurate, and leads to users being confused ("My branch DOES have changes, though!?").
While we don't have a real number, we'll show this indeterminate display value instead of zero.

Screenshots or screen recordings

- Before After
Main MR "Overview" tab zero-changes-overview-tab-before zero-changes-overview-tab-after
MR "Changes" tab zero-changes-diffs-tab-before zero-changes-diffs-tab-after

How to set up and validate locally

  1. Create an MR from a branch with no changes.
  2. Visit the MR page and/or any of the sub-tabs on that page

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Randolph

Merge request reports