[next] Comment Moderation Actions (#2068)

* fix: renamed snake case to camel case

* fix: changed case for mutators

* fix: renamed all snake case to camel case for db

* feat: added support for comment revisions + split comment actions

* fix: updated tests

* feat: implemented CommentModerationAction

* fix: fixed case issues

* feat: enabled WeakMap for wordList processsing

* chore: npm audit
This commit is contained in:
Wyatt Johnson
2018-11-21 16:42:47 +00:00
committed by Kiwi
parent 13147c4ba4
commit 21e1a5cbef
66 changed files with 2323 additions and 2224 deletions
@@ -39,6 +39,7 @@ class ReactionButtonContainer extends React.Component<
const input = {
commentID: this.props.comment.id,
commentRevisionID: this.props.comment.revision.id,
};
const { createCommentReaction, removeCommentReaction } = this.props;
@@ -50,6 +51,7 @@ class ReactionButtonContainer extends React.Component<
? removeCommentReaction(input)
: createCommentReaction(input);
};
public render() {
const {
actionCounts: {
@@ -90,6 +92,9 @@ export default withShowAuthPopupMutation(
comment: graphql`
fragment ReactionButtonContainer_comment on Comment {
id
revision {
id
}
myActionPresence {
reaction
}
@@ -106,7 +106,7 @@ it("cancel edit", async () => {
.findByProps({ id: "comments-commentContainer-editButton-comment-0" })
.props.onClick();
// Cacnel edit form.
// Cancel edit form.
testRenderer.root
.findByProps({ id: "comments-editCommentForm-cancelButton-comment-0" })
.props.onClick();
+3
View File
@@ -52,6 +52,9 @@ export const users = [
export const baseComment = {
author: users[0],
body: "Comment Body",
revision: {
id: "revision-0",
},
createdAt: "2018-07-06T18:24:00.000Z",
replies: { edges: [], pageInfo: { endCursor: null, hasNextPage: false } },
replyCount: 0,