+
@@ -34,4 +30,8 @@ class CommentTombstone extends React.Component {
}
}
+CommentTombstone.propTypes = {
+ action: PropTypes.string,
+};
+
export default CommentTombstone;
diff --git a/client/coral-embed-stream/src/components/NoComments.css b/client/coral-embed-stream/src/components/NoComments.css
new file mode 100644
index 000000000..51dc053f5
--- /dev/null
+++ b/client/coral-embed-stream/src/components/NoComments.css
@@ -0,0 +1,6 @@
+.message {
+ padding: 20px 10px;
+ background-color: #f7f7f7;
+ margin: 20px 0;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/client/coral-embed-stream/src/components/NoComments.js b/client/coral-embed-stream/src/components/NoComments.js
new file mode 100644
index 000000000..378c908d6
--- /dev/null
+++ b/client/coral-embed-stream/src/components/NoComments.js
@@ -0,0 +1,25 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import cn from 'classnames';
+import t from 'coral-framework/services/i18n';
+import styles from './NoComments.css';
+
+const NoComments = ({assetClosed}) => (
+
+ {assetClosed ? (
+
+ {t('stream.no_comments_and_closed')}
+
+ ) : (
+
+ {t('stream.no_comments')}
+
+ )}
+
+);
+
+NoComments.propTypes = {
+ assetClosed: PropTypes.bool,
+};
+
+export default NoComments;
diff --git a/client/coral-embed-stream/src/components/Stream.js b/client/coral-embed-stream/src/components/Stream.js
index 1ec780e63..96101c1e5 100644
--- a/client/coral-embed-stream/src/components/Stream.js
+++ b/client/coral-embed-stream/src/components/Stream.js
@@ -303,11 +303,32 @@ class Stream extends React.Component {
}
Stream.propTypes = {
+ activeStreamTab: PropTypes.string,
+ data: PropTypes.object,
+ root: PropTypes.object,
+ activeReplyBox: PropTypes.string,
+ setActiveReplyBox: PropTypes.func,
+ commentClassNames: PropTypes.array,
+ setActiveStreamTab: PropTypes.func,
+ loadMoreComments: PropTypes.func,
+ postFlag: PropTypes.func,
+ postDontAgree: PropTypes.func,
+ deleteAction: PropTypes.func,
+ showSignInDialog: PropTypes.func,
+ loadNewReplies: PropTypes.func,
+ auth: PropTypes.object,
+ emit: PropTypes.func,
+ sortOrder: PropTypes.string,
+ sortBy: PropTypes.string,
+ loading: PropTypes.bool,
+ editName: PropTypes.func,
+ appendItemArray: PropTypes.func,
+ updateItem: PropTypes.func,
+ viewAllComments: PropTypes.func,
notify: PropTypes.func.isRequired,
postComment: PropTypes.func.isRequired,
-
- // edit a comment, passed (id, asset_id, { body })
- editComment: PropTypes.func
+ editComment: PropTypes.func,
+ userIsDegraged: PropTypes.bool,
};
export default Stream;
diff --git a/client/coral-embed-stream/src/containers/AutomaticAssetClosure.js b/client/coral-embed-stream/src/containers/AutomaticAssetClosure.js
index 8d336bb24..487e927a8 100644
--- a/client/coral-embed-stream/src/containers/AutomaticAssetClosure.js
+++ b/client/coral-embed-stream/src/containers/AutomaticAssetClosure.js
@@ -17,6 +17,7 @@ function getFragmentId(assetId) {
* AutomaticAssetClosure updates the graphql state of the provide asset
* to `isClosed=true` when passed `closedAt`.
*/
+
class AutomaticAssetClosure extends React.Component {
static contextTypes = {
client: PropTypes.object.isRequired,
diff --git a/locales/en.yml b/locales/en.yml
index 76e0f4bac..2d560fedc 100644
--- a/locales/en.yml
+++ b/locales/en.yml
@@ -325,6 +325,8 @@ en:
all_comments: "All Comments"
temporarily_suspended: "In accordance with {0}'s community guidelines, your account has been temporarily suspended. Please rejoin the conversation {1}."
comment_not_found: "Comment was not found"
+ no_comments: "There are no comments yet, why don’t you write one?"
+ no_comments_and_closed: "There were no comments on this article."
step_1_header: "Report an issue"
step_2_header: "Help us understand"
step_3_header: "Thank you for your input"
diff --git a/locales/es.yml b/locales/es.yml
index de3d06692..3f01b8457 100644
--- a/locales/es.yml
+++ b/locales/es.yml
@@ -350,6 +350,8 @@ es:
all_comments: "Todos los comentarios"
temporarily_suspended: "De acuerdo con la guía de la comunidad de {0}, su cuenta ha sido temporalmente suspendida. Por favor unirse a la conversación {1}."
comment_not_found: "Comentario no encontrado"
+ no_comments: "Todavía no hay comentarios. ¿Por qué no escribes uno?"
+ no_comments_and_closed: "No hubo comentarios en este artículo."
streams:
all: "Todos"
article: "Artículo"