Allow truncated snippets to be expanded
Proposal
A max-height was introduced to snippets within !75942 (merged) to limit vertical space. This feels overly limiting in preventing larger files from being viewable, see example snippet https://gitlab.com/-/snippets/1748912 with no way of viewing full blob.
In discussion there are several usability reasons why the max-height can be useful:
- Snippets can contain multiple files. If you have 3 files that are each 2.500 lines long, getting from the first to the second file can be a huge pain
- Below the files, we always have the comment box. In Snippets with multiple thousand lines, it can be annoying to scroll all the way down to get there
- Rendering large snippets can be have significant performance issues historically
The first two issues could be addressed by allowing file snippets to be collapsed, similar to our blog MR view. By allowing collapse we can remove this arbitrary max-height to allow full file snippets to be viewable
Edited by Eric Schurter