diff --git a/client/coral-admin/src/routes/Dashboard/components/ActivityWidget.js b/client/coral-admin/src/routes/Dashboard/components/ActivityWidget.js index 5f974971c..d92b2bd14 100644 --- a/client/coral-admin/src/routes/Dashboard/components/ActivityWidget.js +++ b/client/coral-admin/src/routes/Dashboard/components/ActivityWidget.js @@ -17,11 +17,11 @@ const ActivityWidget = ({assets}) => { ? assets.map((asset) => { return (
- Moderate + Moderate

{asset.commentCount}

- +

{asset.title}

- +

{asset.author} — Published: {new Date(asset.created_at).toLocaleDateString()}

); diff --git a/client/coral-admin/src/routes/Dashboard/components/FlagWidget.js b/client/coral-admin/src/routes/Dashboard/components/FlagWidget.js index ef0974fbd..ef4a6857e 100644 --- a/client/coral-admin/src/routes/Dashboard/components/FlagWidget.js +++ b/client/coral-admin/src/routes/Dashboard/components/FlagWidget.js @@ -24,11 +24,11 @@ const FlagWidget = ({assets}) => { return (
- Moderate + Moderate

{flagSummary ? flagSummary.actionCount : 0}

- +

{asset.title}

- +

{asset.author} — Published: {new Date(asset.created_at).toLocaleDateString()}

); diff --git a/client/coral-admin/src/routes/Dashboard/components/LikeWidget.js b/client/coral-admin/src/routes/Dashboard/components/LikeWidget.js index 2188e38dd..a61f888bf 100644 --- a/client/coral-admin/src/routes/Dashboard/components/LikeWidget.js +++ b/client/coral-admin/src/routes/Dashboard/components/LikeWidget.js @@ -19,11 +19,11 @@ const LikeWidget = ({assets}) => { const likeSummary = asset.action_summaries.find((s) => s.type === 'LikeAssetActionSummary'); return (
- Moderate + Moderate

{likeSummary ? likeSummary.actionCount : 0}

- +

{asset.title}

- +

{asset.author} — Published: {new Date(asset.created_at).toLocaleDateString()}

); diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css index 802cd2e5b..6ba376096 100644 --- a/client/coral-embed-stream/style/default.css +++ b/client/coral-embed-stream/style/default.css @@ -13,7 +13,7 @@ body { width: 100%; font-size: 14px; margin: 0px; - padding: 0px 0px 50px 0px; + padding: 0px 0px 100px 0px; height: auto !important; } diff --git a/client/coral-framework/hocs/withMutation.js b/client/coral-framework/hocs/withMutation.js index c9108c0fe..7e2c3d09d 100644 --- a/client/coral-framework/hocs/withMutation.js +++ b/client/coral-framework/hocs/withMutation.js @@ -92,13 +92,13 @@ export default (document, config = {}) => (WrappedComponent) => { // Do not run updates when we have mutation errors. return prev; } - return map[key](prev, result); + return map[key](prev, result) || prev; }; } else { const existing = res[key]; res[key] = (prev, result) => { const next = existing(prev, result); - return map[key](next, result); + return map[key](next, result) || next; }; } }); diff --git a/client/coral-framework/hocs/withQuery.js b/client/coral-framework/hocs/withQuery.js index adb67b7b3..82c9c29d4 100644 --- a/client/coral-framework/hocs/withQuery.js +++ b/client/coral-framework/hocs/withQuery.js @@ -128,8 +128,10 @@ export default (document, config = {}) => (WrappedComponent) => { const reducer = withSkipOnErrors( reducerCallbacks.reduce( - (a, b) => (prev, ...rest) => - b(a(prev, ...rest), ...rest), + (a, b) => (prev, ...rest) => { + const next = a(prev, ...rest); + return b(next, ...rest) || next; + } )); return { diff --git a/plugins/talk-plugin-auth/client/components/CreateUsernameDialog.js b/plugins/talk-plugin-auth/client/components/CreateUsernameDialog.js index 12916b4dd..4b0babed6 100644 --- a/plugins/talk-plugin-auth/client/components/CreateUsernameDialog.js +++ b/plugins/talk-plugin-auth/client/components/CreateUsernameDialog.js @@ -32,7 +32,7 @@ const CreateUsernameDialog = ({ className={styles.fakeComment} username={formData.username} created_at={Date.now()} - comment={{body:t('createdisplay.fake_comment_body')}} + body={t('createdisplay.fake_comment_body')} />

{t('createdisplay.if_you_dont_change_your_name')} diff --git a/plugins/talk-plugin-auth/client/components/FakeComment.css b/plugins/talk-plugin-auth/client/components/FakeComment.css new file mode 100644 index 000000000..8b5521aea --- /dev/null +++ b/plugins/talk-plugin-auth/client/components/FakeComment.css @@ -0,0 +1,37 @@ +.root { + border-top: 1px solid rgba(0, 0, 0, 0.1); + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + margin-bottom: 10px; + padding: 8px 0px 10px 0px; + position: relative; +} + +.body { + +} + +.footer { + display: flex; + justify-content: space-between; +} + +.button { + color: #2a2a2a; + margin: 5px 10px 5px 0px; + background: none; + padding: 0px; + border: none; + font-size: inherit; + vertical-align: middle; + + &:hover { + color: #767676; + cursor: pointer; + } +} + +.icon { + font-size: 12px; + padding: 0 2px 0 5px; + vertical-align: middle; +} diff --git a/plugins/talk-plugin-auth/client/components/FakeComment.js b/plugins/talk-plugin-auth/client/components/FakeComment.js index b6b4e7609..eefada587 100644 --- a/plugins/talk-plugin-auth/client/components/FakeComment.js +++ b/plugins/talk-plugin-auth/client/components/FakeComment.js @@ -2,65 +2,43 @@ import React from 'react'; import t from 'coral-framework/services/i18n'; import {ReplyButton} from 'talk-plugin-replies'; import PubDate from 'talk-plugin-pubdate/PubDate'; -import Slot from 'coral-framework/components/Slot'; import AuthorName from 'talk-plugin-author-name/AuthorName'; -import styles from 'coral-embed-stream/src/components/Comment.css'; +import styles from './FakeComment.css'; +import {Icon} from 'plugin-api/beta/client/components/ui'; -export const FakeComment = ({username, created_at, comment}) => ( -

-
- +export const FakeComment = ({username, created_at, body}) => ( +
+ - -
-
- + {}} + parentCommentId={'commentID'} + currentUserId={{}} + />
- {}} - parentCommentId={'commentID'} - currentUserId={{}} - /> -
-
-
- -
-
-
diff --git a/plugins/talk-plugin-featured-comments/client/index.js b/plugins/talk-plugin-featured-comments/client/index.js index 82cba8b91..ad10f87ca 100644 --- a/plugins/talk-plugin-featured-comments/client/index.js +++ b/plugins/talk-plugin-featured-comments/client/index.js @@ -26,6 +26,9 @@ export default { IgnoreUser: ({variables}) => ({ updateQueries: { CoralEmbedStream_Embed: (previous) => { + if (!previous.asset.featuredComments) { + return previous; + } const ignoredUserId = variables.id; const newNodes = previous.asset.featuredComments.nodes.filter((n) => n.user.id !== ignoredUserId); const removedCount = previous.asset.featuredComments.nodes.length - newNodes.length; diff --git a/plugins/talk-plugin-offtopic/client/components/OffTopicFilter.js b/plugins/talk-plugin-offtopic/client/components/OffTopicFilter.js index 171bafeb2..426dea29a 100644 --- a/plugins/talk-plugin-offtopic/client/components/OffTopicFilter.js +++ b/plugins/talk-plugin-offtopic/client/components/OffTopicFilter.js @@ -16,7 +16,6 @@ export default class OffTopicFilter extends React.Component { this.props.removeCommentClassName(idx); this.props.toggleCheckbox(); } - this.props.closeViewingOptions(); } render() { diff --git a/plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js b/plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js index 9548b764e..7eab8c526 100644 --- a/plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js +++ b/plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js @@ -3,9 +3,6 @@ import {bindActionCreators} from 'redux'; import {toggleCheckbox} from '../actions'; import {commentClassNamesSelector} from 'plugin-api/alpha/client/selectors'; import OffTopicFilter from '../components/OffTopicFilter'; -import { - closeViewingOptions -} from 'plugins/talk-plugin-viewing-options/client/actions'; import { addCommentClassName, removeCommentClassName @@ -20,7 +17,6 @@ const mapDispatchToProps = (dispatch) => bindActionCreators( { toggleCheckbox, - closeViewingOptions, addCommentClassName, removeCommentClassName },