From dea62d8895b361baace2c55a8ef4f958338236a4 Mon Sep 17 00:00:00 2001 From: David Jay Date: Tue, 22 Nov 2016 16:16:10 -0500 Subject: [PATCH 01/18] Fixing bug with reply author name. --- client/coral-embed-stream/src/CommentStream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/coral-embed-stream/src/CommentStream.js b/client/coral-embed-stream/src/CommentStream.js index 9887b46ac..2139df3d9 100644 --- a/client/coral-embed-stream/src/CommentStream.js +++ b/client/coral-embed-stream/src/CommentStream.js @@ -162,7 +162,7 @@ class CommentStream extends Component { let reply = this.props.items.comments[replyId]; return

- +
From 6e6ba89706ad07be942ad2d95b60476e380320b0 Mon Sep 17 00:00:00 2001 From: David Jay Date: Tue, 22 Nov 2016 16:51:22 -0500 Subject: [PATCH 02/18] Hiding reply box on post. --- client/coral-embed-stream/src/CommentStream.js | 17 +++++++++++++++-- client/coral-plugin-commentbox/CommentBox.js | 4 ++-- client/coral-plugin-replies/ReplyButton.js | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/client/coral-embed-stream/src/CommentStream.js b/client/coral-embed-stream/src/CommentStream.js index 2139df3d9..a0eaca044 100644 --- a/client/coral-embed-stream/src/CommentStream.js +++ b/client/coral-embed-stream/src/CommentStream.js @@ -121,7 +121,8 @@ class CommentStream extends Component {
+ id={commentId} + showReply={comment.showReply}/> + id={replyId} + showReply={reply.showReply}/>
+
; }) } diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js index 76f7e43be..79641d856 100644 --- a/client/coral-plugin-commentbox/CommentBox.js +++ b/client/coral-plugin-commentbox/CommentBox.js @@ -22,7 +22,7 @@ class CommentBox extends Component { } postComment = () => { - const {postItem, updateItem, id, parent_id, addNotification, appendItemArray, premod, author} = this.props; + const {postItem, updateItem, id, parent_id, child_id, addNotification, appendItemArray, premod, author} = this.props; let comment = { body: this.state.body, asset_id: id, @@ -38,7 +38,7 @@ class CommentBox extends Component { related = 'comments'; parent_type = 'assets'; } - updateItem(parent_id, 'showReply', false, 'comments'); + updateItem(child_id || parent_id, 'showReply', false, 'comments'); postItem(comment, 'comments') .then((comment_id) => { if (premod === 'pre') { diff --git a/client/coral-plugin-replies/ReplyButton.js b/client/coral-plugin-replies/ReplyButton.js index 4fbfd5f60..8e39af663 100644 --- a/client/coral-plugin-replies/ReplyButton.js +++ b/client/coral-plugin-replies/ReplyButton.js @@ -6,7 +6,7 @@ const name = 'coral-plugin-replies'; const ReplyButton = (props) =>