gitlab-org--gitlab-foss/app
Douwe Maan ef9ba9050e Merge branch 'single-file-diffs' into 'master'
Single file diffs

Closes #14103. Related (not part of this MR): #19553.

This adds a `diff_for_path` action to each place we render diffs (commit, compare, new MR, existing MR) which renders the diff for a single path. The action is always available with the same params as the 'parent' action, to make it simpler to generate the URIs.

If a diff is bigger than 10 KB, it will be collapsed by default and have a data attribute added. You can then click the message or the filename to expand that diff. For expanded files, you can collapse and expand them, but they won't make any AJAX requests.

![Expand_and_collapse_diffs](/uploads/a4072029085082b85c47006f67ac531c/Expand_and_collapse_diffs.gif)

See merge request !4990
2016-07-11 17:51:57 +00:00
..
assets Merge branch 'single-file-diffs' into 'master' 2016-07-11 17:51:57 +00:00
controllers Merge branch 'single-file-diffs' into 'master' 2016-07-11 17:51:57 +00:00
finders Expose target, filter by state as string 2016-07-01 14:52:04 +02:00
helpers Merge branch 'single-file-diffs' into 'master' 2016-07-11 17:51:57 +00:00
mailers Display new diff notes and allow creation through the web interface 2016-07-06 18:51:00 -04:00
models Handle more than two paths in MergeRequest#diffs 2016-07-11 18:17:00 +01:00
services Merge branch 'master' into single-file-diffs 2016-07-11 09:38:11 +01:00
uploaders Enable Style/SpaceAfterComma Rubocop cop 2016-06-29 15:23:44 +02:00
validators refactor url validator to use sanitizer for check 2016-07-01 09:02:45 +02:00
views Merge branch 'master' into single-file-diffs 2016-07-11 09:38:11 +01:00
workers Represent DiffRefs as proper class instead of tuple array 2016-07-06 18:50:58 -04:00