stable

Clone or download

Read-only

refactor: Extract NewInlineCommentFormWidget insertion part

part of request #29602 Migrate pullrequest file-diffs to TypeScript This contribution aims to extract the part where we insert NewInlineCommentFormWidget in code mirrors. Now we also have unit tests for the placeholder height recomputation mecanism each time a widget is added How to test: --> No functional change expected in both diff modes Change-Id: I2a00ddc4d66202f664c3123b630f5eb5a524feef

Modified Files

Name
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/file-line-widget-placement-helper.test.ts +19 −13 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/file-line-widget-placement-helper.ts +6 −4 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-code-mirror-widget-creator.test.ts +4 −4 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-code-mirror-widget-creator.ts +16 −26 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-code-mirror-widgets-creation-manager.test.ts +282 −17 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-code-mirror-widgets-creation-manager.ts +47 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-diff-component.js +46 −94 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/types-codemirror-overriden.ts +10 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/unidiff-component.js +5 −5 Go to diff View file
A plugins/pullrequest/scripts/pullrequests-app/tests/stubs/CreateNewInlineCommentFormWidgetStub.ts +45 −0 Go to diff View file