stable
Clone or download
part of story #31143 Add the pull-request description as first possible comment This contribution introduces a new comment component to manage the display of the pull-request description. Because it is displayed as a comment, while it is not at all a comment, I've decided to have a dedicated component. How to test: - Go to a pull request having a description --> The description is displayed as a comment, at the very start of the timeline. --> You can't edit it (yet) nor add a reply to it (never). - Go to a pull-request without any description where you have the WRITE permission --> The first comment displays an empty state text saying that there is no description yet please provide one kindly asap. - As another user without the WRITE permission, go to the same pull-request --> Same expectation than the previous one, expect that you don't have the "Please add one" part. Change-Id: I46591c05f78b4ad287fcd0c3ca917e7d6339277a
Modified Files
Name | ||||
---|---|---|---|---|
M | lib/frontend/rest-api-types/src/main.ts | +1 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/po/fr_FR.po | +6 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestComment.ts | +3 | −8 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentBodyTemplate.ts | +6 | −19 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCommentController.ts | +3 | −3 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/ReplyCommentFormPresenter.test.ts | +1 | −1 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/ReplyCommentFormPresenter.ts | +1 | −1 | Go to diff View file |
A | plugins/pullrequest/scripts/lib/pullrequest-comments/src/description-comment/PullRequestDescriptionComment.test.ts | +78 | −0 | Go to diff View file |
A | plugins/pullrequest/scripts/lib/pullrequest-comments/src/description-comment/PullRequestDescriptionComment.ts | +71 | −0 | Go to diff View file |
R | plugins/pullrequest/scripts/pullrequests-app/tests/stubs/CurrentPullRequestUserPresenterStub.ts | Go to diff View file | ||
A | plugins/pullrequest/scripts/lib/pullrequest-comments/src/description-comment/PullRequestDescriptionContentTemplate.test.ts | +79 | −0 | Go to diff View file |
A | plugins/pullrequest/scripts/lib/pullrequest-comments/src/description-comment/PullRequestDescriptionContentTemplate.ts | +62 | −0 | Go to diff View file |
R | plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/relative-dates-helper.ts | Go to diff View file | ||
M | plugins/pullrequest/scripts/lib/pullrequest-comments/src/main.ts | +6 | −1 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/src/new-comment-form/NewCommentForm.test.ts | +1 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/src/new-comment-form/NewCommentForm.ts | +2 | −7 | Go to diff View file |
A | plugins/pullrequest/scripts/lib/pullrequest-comments/src/templates/CommentAvatarTemplate.test.ts | +39 | −0 | Go to diff View file |
R | plugins/pullrequest/scripts/lib/pullrequest-comments/src/comment/PullRequestCurrentUserPresenter.ts | Go to diff View file | ||
A | plugins/pullrequest/scripts/lib/pullrequest-comments/src/templates/CommentHeaderTemplate.test.ts | +56 | −0 | Go to diff View file |
A | plugins/pullrequest/scripts/lib/pullrequest-comments/src/templates/CommentHeaderTemplate.ts | +54 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/src/types.ts | +9 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/tests/stubs/CurrentPullRequestUserPresenterStub.ts | +1 | −1 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/tests/stubs/PullRequestCommentPresenterStub.ts | +1 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/pullrequest-comments/tests/stubs/RelativeDateHelperStub.ts | +2 | −1 | Go to diff View file |
R | plugins/pullrequest/scripts/pullrequests-app/tests/stubs/CurrentPullRequestPresenterStub.ts | Go to diff View file | ||
M | plugins/pullrequest/scripts/lib/pullrequest-comments/themes/style.scss | +1 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/lib/rest-api-types/src/pull-request.ts | +2 | −2 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-overview/po/fr_FR.po | +0 | −3 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-overview/src/components/OverviewPane.test.ts | +40 | −11 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-overview/src/components/OverviewPane.vue | +22 | −12 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestAuthor.test.ts | +10 | −60 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestAuthor.vue | +10 | −32 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-overview/src/components/Threads/CommentPresenterBuilder.test.ts | +1 | −0 | Go to diff View file |
A | plugins/pullrequest/scripts/pullrequest-overview/src/components/Threads/DescriptionCommentPresenterBuilder.test.ts | +48 | −0 | Go to diff View file |
A | plugins/pullrequest/scripts/pullrequest-overview/src/components/Threads/DescriptionCommentPresenterBuilder.ts | +38 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-overview/src/components/Threads/OverviewThreads.test.ts | +30 | −15 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequest-overview/src/components/Threads/OverviewThreads.vue | +74 | −43 | Go to diff View file |
D | plugins/pullrequest/scripts/pullrequest-overview/src/components/Threads/OverviewThreadsEmptyState.vue | +0 | −240 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/src/app/comments/PullRequestCommentPresenterBuilder.test.ts | +1 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/widgets/SideBySideCodeMirrorWidgetCreator.test.ts | +1 | −0 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/tests/stubs/PullRequestCommentPresenterStub.ts | +1 | −0 | Go to diff View file |