comments: introduce new draft comments.

- private to author
- not triggering any notifications
- sidebar doesn't display draft comments
- They are just placeholders for longer review.
This commit is contained in:
Milka Kuzminski 2020-10-21 17:53:23 +02:00
parent cf30382fbc
commit afd3357349
15 changed files with 343 additions and 81 deletions

View file

@ -980,9 +980,11 @@ window.setObserversData = ${c.pull_request_set_observers_data_json | n};
$(btns).each(fn_display);
});
// register submit callback on commentForm form to track TODOs
window.commentFormGlobalSubmitSuccessCallback = function () {
refreshMergeChecks();
// register submit callback on commentForm form to track TODOs, and refresh mergeChecks conditions
window.commentFormGlobalSubmitSuccessCallback = function (comment) {
if (!comment.draft) {
refreshMergeChecks();
}
};
ReviewerAutoComplete('#user', reviewersController);
@ -995,6 +997,12 @@ $(document).ready(function () {
var channel = '${c.pr_broadcast_channel}';
new ReviewerPresenceController(channel)
window.finalizeDrafts = function(commentIds) {
alert('okok !' + commentIds)
}
})
</script>