stable

Clone or download

Read-only

feat: Have a shared comment webcomponent between timeline and file-diff views

part of story #29228 Replace the current management of comments by a WebComponent in Overview and Changes view. This contribution introduce a webcomponent displaying pull request comments. This webcomponent is shared between the timeline view and the file diff view. It will allow us to have a common base to develop threaded comments features in something else than Angular.js, so it can be both displayed in the future Vue.js overview page and the angular app. How to test: - In the overview tab: --> Inline comments (a.k.a comments on files) have a link to the file-diff on which they have been posted --> Global comments (a.k.a the ones you submit using the textarea at the bottom of the timeline) have no files displayed --> Events are displayed (abandon, merge, rebase etc.) - In the file-diff view --> The comments are displayed, there are no links to the file since they are already displayed in their own context. --> Comments having line returns are displayed properly (not inlined) --> When you scroll a file having comments outside the viewport, comment placeholders are generated on the opposite side. Change-Id: I9b1214cc1cbc6e6daa743a151b5e5b6cfaa09a35

Modified Files

Name
M plugins/pullrequest/scripts/pullrequests-app/package.json +5 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/pnpm-lock.yaml +33 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/app.js +4 −2 Go to diff View file
A plugins/pullrequest/scripts/pullrequests-app/src/app/comments/PullRequestComment.test.ts +143 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequests-app/src/app/comments/PullRequestComment.ts +135 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequests-app/src/app/comments/pullrequest-comment-presenter-builder.test.ts +112 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequests-app/src/app/comments/pullrequest-comment-presenter-builder.ts +130 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/codemirror-helper-service.js +25 −13 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-comment-placeholder-builder.js +4 −3 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-comment-placeholder-builder.test.js +31 −13 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-diff-component.js +72 −48 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-line-height-equalizer.js +10 −2 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 +78 −11 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/file-diff-component.js +14 −3 Go to diff View file
D plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/inline-comment-component.js +0 −29 Go to diff View file
D plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/inline-comment.tpl.html +0 −30 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/gettext-catalog.ts +8 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/overview/timeline/timeline-service.js +39 −44 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/overview/timeline/timeline-service.test.js +3 −154 Go to diff View file
M plugins/pullrequest/scripts/pullrequests-app/src/app/overview/timeline/timeline.tpl.html +5 −23 Go to diff View file
M plugins/pullrequest/themes/includes/_file-diff.scss +0 −1 Go to diff View file
D plugins/pullrequest/themes/includes/_inline-comment.scss +0 −45 Go to diff View file
M plugins/pullrequest/themes/includes/_timeline.scss +4 −43 Go to diff View file