Collapse file tree by default if the merge request changes only one file

When there's only changes in a single file, the file browser has a lot less value. Sure, it shows you the location of the file, but that generally shows up in the file name line anyway. Maybe fore really deep hierarchies, it gets cropped too much, but that's not a strong value. How about defaulting to hiding the file browser if there's only one file in the MR?

Proposal

If user preference is unset and the merge request only changes one file, hide the file tree.

Otherwise respect the user preference.

Files changed Preference: unset Preference: tree shown Preference: tree hidden
One file hidden shown (respect user preference) hidden (respect user preference)
Multiple files shown shown (respect user preference) hidden (respect user preference)

Links / references

Edited by James Ramsay (ex-GitLab)