Collapsing a file scrolls awkwardly
@lbennett added this comment to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4990, but it's not there any more
Thinking about it, this could work nicely if we add some conditional logic to the scroll and expand easing. I do quite like the benefit of it taking me to the top of the diff it just expanded, but at the moment its too jumpy and unpredictable. For example it jumping to the file when collapsing the diff isn't so desirable. It also has some odd behaviours at the bottom of a long diff files list.
This gif shows that collapsing files isn't super smooth, as it scrolls the top of the page to the file header, which ends up behind the page header: