Automatically expand file when viewing a commit with changes to single file

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

The following discussion from !44629 (merged) should be addressed:

  • @pedroms started a discussion: (+2 comments)

    @kerrizor I tested this locally and it works great. I also tested the upper-limit, hitting the max bytes, and it correctly threw the "too large" case 👍

    One aspect that was failing for me though was viewing a single-file commit. For example, a diff with ~10.8 KB was auto-collapsed when viewing the commit in its own detail page or in the context of the MR. Can we also make this work when viewing a commit? It would be strange if I was able to view an expanded diff in the MR but not when viewing the commit.

Edited by 🤖 GitLab Bot 🤖