{this.getCopy()} + {this.props.action === 'reject' && + {t('comment.undo_reject')} + }
); @@ -32,6 +35,7 @@ class CommentTombstone extends React.Component { CommentTombstone.propTypes = { action: PropTypes.string, + onUndo: PropTypes.func, }; export default CommentTombstone; diff --git a/client/coral-embed-stream/src/containers/Comment.js b/client/coral-embed-stream/src/containers/Comment.js index 694314bd7..26fc872d5 100644 --- a/client/coral-embed-stream/src/containers/Comment.js +++ b/client/coral-embed-stream/src/containers/Comment.js @@ -3,6 +3,7 @@ import React from 'react'; import Comment from '../components/Comment'; import {withFragments} from 'coral-framework/hocs'; import {getSlotFragmentSpreads} from 'coral-framework/utils'; +import {withSetCommentStatus} from 'coral-framework/graphql/mutations'; import {THREADING_LEVEL} from '../constants/stream'; import hoistStatics from 'recompose/hoistStatics'; import {nest} from '../graphql/utils'; @@ -75,6 +76,9 @@ const singleCommentFragment = gql` id username } + status_history { + type + } action_summaries { __typename count @@ -130,6 +134,7 @@ const withCommentFragments = withFragments({ const enhance = compose( withAnimateEnter, withCommentFragments, + withSetCommentStatus, ); export default enhance(Comment); diff --git a/client/coral-embed-stream/src/graphql/index.js b/client/coral-embed-stream/src/graphql/index.js index 3f6fd4832..d18cdc435 100644 --- a/client/coral-embed-stream/src/graphql/index.js +++ b/client/coral-embed-stream/src/graphql/index.js @@ -102,6 +102,9 @@ export default { } } } + status_history { + type + } action_summaries { count current_user { @@ -182,6 +185,7 @@ export default { editableUntil: new Date().toISOString(), edited: false, }, + status_history: [], id: `pending-${uuid()}`, } } diff --git a/client/coral-framework/components/Slot.js b/client/coral-framework/components/Slot.js index 0fe0d8896..e1acd82f4 100644 --- a/client/coral-framework/components/Slot.js +++ b/client/coral-framework/components/Slot.js @@ -3,6 +3,7 @@ import cn from 'classnames'; import styles from './Slot.css'; import {connect} from 'react-redux'; import omit from 'lodash/omit'; +import kebabCase from 'lodash/kebabCase'; import PropTypes from 'prop-types'; import isEqual from 'lodash/isEqual'; import {getShallowChanges} from 'coral-framework/utils'; @@ -58,6 +59,7 @@ class Slot extends React.Component { childFactory, defaultComponent: DefaultComponent, queryData, + fill, } = this.props; const {plugins} = this.context; let children = this.getChildren(); @@ -72,7 +74,7 @@ class Slot extends React.Component { } return ( -