Skip to content

Draft: Expose and use viewable instead of readable_text

Marc Shaw requested to merge expose_and_use_viewable into master

What does this MR do and why?

In #442497 (comment 1789079353), we noticed that introducing a new limit for the diffs, was causing files to show a download link, instead of expanding.

This is related to us not expanding the diff when it is not readable_text. Readable is considered: text_in_repo? && !stored_externally? && !truncated?. But this doesn't make sense to not allow the expand, except when the diff is larger than the hard limit (method too_large?).

I propose we change this to look for the hard limit on whether or not to show the expand link.

Edited by Marc Shaw

Merge request reports