stable
Clone or download
part of story #29240 reply to pull request comment Since the paradigm to handle comment placeholders has changed, a couple of things remained to be done differently. Placeholders height computation was failing in a couple of cases: - A comment is displayed in the middle of an added group of lines --> The placeholder on the opposite side was too small - Two different comments are displayed side by side, one on the left and one on the right --> No placeholder was added since there was the same number of widgets on each lines. - When a line widget is added, the placeholder height is computed several times while it shouldn't. Now we recompute it only when a new-inline-comment component is added. Since this component has no callback to retrigger the computation, it is the only case where we have to do it. How to test: - Spot a group of added lines (or removed) and add a comment in the middle --> The placeholder on the opposite side has a proper height, event when you refresh the page - Pick up a random line, add a comment on the right side - add a comment on the opposite side, same line --> If the two sides have the same height, no placeholder is displayed --> If they have not the same height, a placeholder is displayed to fill the gap Change-Id: Ie3731aeaa155055d3bf58631a9c3d950e4ab798d
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-diff-component.js | +9 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-line-height-equalizer.js | +1 | −38 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-line-height-equalizer.test.js | +0 | −45 | Go to diff View file |