stable

Clone or download

Read-only

Add comment in side-by-side diff

Part of story #11667 display diff side by side How to test: - Browse a pull request in side-by-side diff - On the left side, you can only add comments on deleted lines. The CSS hover class on the gutter reflects that. - On the right side, you can only add comments on unchanged lines or added lines. - When there was already an opposite placeholder, its height is adjusted when showing the new comment form, after adding a comment (submit) and after cancelling so that scrolling stays aligned. - When there was no existing placeholder for unmoved lines, a new placeholder will be created. Its height will be adjusted the same way so that scrolling stays aligned. Change-Id: I3f3b2640ea77181816c16356d9da4e1b7c7175c1

Modified Files

Name
M plugins/pullrequest/www/scripts/src/app/file-diff/codemirror-helper-service.js +42 −15 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/file-diff/diff-modes/side-by-side-diff-component.js +116 −10 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/file-diff/diff-modes/side-by-side-lines-state.js +15 −3 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/file-diff/diff-modes/side-by-side-widget-builder.js +25 −1 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/file-diff/diff-modes/side-by-side-widget-builder.spec.js +31 −1 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/file-diff/diff-modes/unidiff-component.js +11 −9 Go to diff View file
M plugins/pullrequest/www/themes/BurningParrot/css/includes/_file-diff.scss +16 −14 Go to diff View file