Skip to content

Handle collapsable DiffCollection

Paco Guzman requested to merge diff-collection-collapsable into master

We want to give the user the opportunity to see more files while preserving safe limits on rendering diffs so files bigger than 10KB (we consider too large 100KB) their lines are not taking into account to decide if the collection overflow and you can decide if you want to expand them on click or no. And those files will be collapsed by default (they are just quite big).

Besides to keep good performance we start collapsing all the files since we are over the safe limits (what we used before as hard limits). So we can start measuring rendering files with expand links and in the future move to higher the safe limits maybe.

To do that you have to methods collapsed? and collapse which means if it's quite large and the other if the collection collapsed it when iterated as a whole.

It's quite similar to the too_largeconcept but give us a little bit more flexibility.

Related with: https://gitlab.com/gitlab-org/gitlab-ce/issues/19820

Merge request reports