Skip to content

Fix bold font not being applied on viewed file after further changes. Add viewed file count to diff.

What does this MR do and why?

This fixes the bold text in the file list tree of Merge Request changes not updating after a new commit changes the file again - #366647

It also adds a simple text count of how many files have been viewed - #420399

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Run GitLab without changes applied
  2. Create/view a merge request, mark as "Viewed"
  3. Observe the bold font in the file tree disappears for this file
  4. Change the file with another commit, using the single file editor is easiest
  5. Observe the font on the file is not bold despite no longer being marked as Viewed

or

  1. Run GitLab with changes applied
  2. Create/view a merge request, mark as "Viewed"
  3. Observe the bold font in the file tree disappears for this file
  4. Observe the "viewed" count next to the file count has increased
  5. Change the file with another commit, using the single file editor is easiest
  6. Observe the the bold font returns on the file and the file is no longer marked as Viewed
  7. Observe the "viewed" count next to the file count has decreased

MR acceptance checklist

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

Merge request reports