stable

Clone or download

Read-only

Autocollapse common code sections for unified diff

part of story #11667 - display diff side by side How to test: - Choose a modified file large enough - Set the display mode to unidiff --> Common lines are collapsed - click the "skipped n common lines" label --> Code section is expanded More about the code collapse! - a code section is collapsed if: --> no comment is inside the section --> is is composed of at least 10 common LOCs --> the amount of common lines between two modified blocks is more than 20 LOCs (in order to keep context to help the reviewer understand the changes) More generally: - Each modified block must have 10 LOCs of context before and after Change-Id: Ief8a0329dba2f0cf79b8faf0e4afa7dfea82fd0e

Modified Files

Name
M plugins/pullrequest/www/scripts/po/fr.po +7 −1 Go to diff View file
M plugins/pullrequest/www/scripts/po/template.pot +6 −0 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/app.js +2 −0 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/app.spec.js +2 −0 Go to diff View file
A plugins/pullrequest/www/scripts/src/app/code-collapse/code-collapse-service.fixtures.spec.js +98 −0 Go to diff View file
A plugins/pullrequest/www/scripts/src/app/code-collapse/code-collapse-service.js +131 −0 Go to diff View file
A plugins/pullrequest/www/scripts/src/app/code-collapse/code-collapse-service.spec.js +115 −0 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/file-diff/codemirror-helper-service.js +41 −2 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/file-diff/diff-modes/unidiff-component.js +14 −2 Go to diff View file
M plugins/pullrequest/www/themes/BurningParrot/css/includes/_file-diff.scss +4 −0 Go to diff View file