+const NewCount = ({commentCount, countCache}) =>
{
countCache && commentCount - countCache > 0 &&
@@ -12,7 +11,8 @@ const NewCount = ({commentCount, countCache}) =>
NewCount.propTypes = {
commentCount: PropTypes.number.isRequired,
- countCache: PropTypes.number
+ countCache: PropTypes.number,
+ loadMore: PropTypes.func.isRequired
};
export default NewCount;
diff --git a/client/coral-embed-stream/src/Stream.js b/client/coral-embed-stream/src/Stream.js
index d59521484..e68a223ca 100644
--- a/client/coral-embed-stream/src/Stream.js
+++ b/client/coral-embed-stream/src/Stream.js
@@ -24,7 +24,7 @@ class Stream extends React.Component {
componentDidMount() {
const {asset, getCounts, updateCountCache} = this.props;
- updateCountCache(asset.id, asset.comments.length);
+ updateCountCache(asset.id, asset.commentCount);
// Note: Apollo's built-in polling doesn't work with fetchMore queries, so a
// setInterval is being used instead.
From 2acd099f3f598252e604bffcf98dc5205d4c75d6 Mon Sep 17 00:00:00 2001
From: Riley Davis
Date: Wed, 22 Feb 2017 11:15:13 -0700
Subject: [PATCH 09/23] add empty state for asset search
---
.../src/containers/Streams/Streams.js | 36 ++++++++++---------
client/coral-admin/src/translations.json | 2 ++
2 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/client/coral-admin/src/containers/Streams/Streams.js b/client/coral-admin/src/containers/Streams/Streams.js
index 62f2f009e..96130fcba 100644
--- a/client/coral-admin/src/containers/Streams/Streams.js
+++ b/client/coral-admin/src/containers/Streams/Streams.js
@@ -8,6 +8,7 @@ import {Link} from 'react-router';
import {Pager, Icon} from 'coral-ui';
import {DataTable, TableHeader, RadioGroup, Radio} from 'react-mdl';
+import EmptyCard from 'coral-admin/src/components/EmptyCard';
const limit = 25;
@@ -142,22 +143,25 @@ class Streams extends Component {
{lang.t('streams.oldest')}
-
-
- {lang.t('streams.article')}
-
- {lang.t('streams.pubdate')}
-
-
- {lang.t('streams.status')}
-
-
-
-
+ {
+ assetsIds.length
+ ?
+
+ {lang.t('streams.article')}
+
+ {lang.t('streams.pubdate')}
+
+
+ {lang.t('streams.status')}
+
+
+
+
+ :
{lang.t('streams.empty_result')}
+ }
);
}
diff --git a/client/coral-admin/src/translations.json b/client/coral-admin/src/translations.json
index debfdcc08..7219a22ca 100644
--- a/client/coral-admin/src/translations.json
+++ b/client/coral-admin/src/translations.json
@@ -114,6 +114,7 @@
"comment_count": "Comments"
},
"streams": {
+ "empty_result": "No assets match this search. Maybe try widening your search?",
"search": "Search",
"filter-streams": "Filter Streams",
"stream-status": "Stream Status",
@@ -222,6 +223,7 @@
"comment_count": "Comentarios"
},
"streams": {
+ "empty_result": "No se encuentro articulo con esta busqueda. Tal vez extender la busqueda?",
"search": "",
"filter-streams": "",
"stream-status": "",
From 096bd12df6e2b73c6d3878544a2dd9039952c960 Mon Sep 17 00:00:00 2001
From: David Jay
Date: Wed, 22 Feb 2017 13:45:02 -0500
Subject: [PATCH 10/23] Loading new comments.
---
client/coral-embed-stream/src/Embed.js | 7 ++++
client/coral-embed-stream/src/LoadMore.js | 2 +-
client/coral-embed-stream/src/NewCount.js | 35 ++++++++++++++-----
.../coral-framework/graphql/queries/index.js | 5 +--
graph/typeDefs.graphql | 2 +-
5 files changed, 38 insertions(+), 13 deletions(-)
diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js
index ac9acc931..487437203 100644
--- a/client/coral-embed-stream/src/Embed.js
+++ b/client/coral-embed-stream/src/Embed.js
@@ -100,6 +100,10 @@ class Embed extends Component {
return ;
}
+ // Find the created_at date of the first comment. If no comments exist, set the date to a week ago.
+ const firstCommentDate = asset.comments[0] ? asset.comments[0].created_at
+ : new Date(Date.now() - 604800000);
+
return (
@@ -155,6 +159,9 @@ class Embed extends Component {
commentCount={asset.commentCount}
countCache={countCache[asset.id]}
loadMore={this.props.loadMore}
+ firstCommentDate={firstCommentDate}
+ assetId={asset.id}
+ updateCountCache={this.props.updateCountCache}
/>
{
}
const cursor = parentId
- ? comments[1].created_at
+ ? comments[0].created_at
: comments[comments.length - 1].created_at;
loadMore({
diff --git a/client/coral-embed-stream/src/NewCount.js b/client/coral-embed-stream/src/NewCount.js
index ded006325..99e1297e9 100644
--- a/client/coral-embed-stream/src/NewCount.js
+++ b/client/coral-embed-stream/src/NewCount.js
@@ -1,18 +1,35 @@
import React, {PropTypes} from 'react';
-const NewCount = ({commentCount, countCache}) =>
- {
- countCache && commentCount - countCache > 0 &&
-
- Load {commentCount - countCache} More Comments
-
- }
-
;
+const onLoadMoreClick = ({loadMore, commentCount, firstCommentDate, assetId, updateCountCache}) => (e) => {
+ e.preventDefault();
+ updateCountCache(assetId, commentCount);
+ loadMore({
+ limit: 500,
+ cursor: firstCommentDate,
+ assetId,
+ sort: 'CHRONOLOGICAL'
+ }, true);
+};
+
+const NewCount = (props) => {
+ const newComments = props.commentCount - props.countCache;
+
+ return
+ {
+ props.countCache && newComments > 0 &&
+
+ Load {newComments} More Comments
+
+ }
+
;
+};
NewCount.propTypes = {
commentCount: PropTypes.number.isRequired,
countCache: PropTypes.number,
- loadMore: PropTypes.func.isRequired
+ loadMore: PropTypes.func.isRequired,
+ assetId: PropTypes.string.isRequired,
+ firstCommentDate: PropTypes.string.isRequired
};
export default NewCount;
diff --git a/client/coral-framework/graphql/queries/index.js b/client/coral-framework/graphql/queries/index.js
index 494ffa30e..9b8a55134 100644
--- a/client/coral-framework/graphql/queries/index.js
+++ b/client/coral-framework/graphql/queries/index.js
@@ -39,7 +39,7 @@ export const getCounts = (data) => ({asset_id, limit, sort}) => {
});
};
-export const loadMore = (data) => ({limit, cursor, parent_id, asset_id, sort}) => {
+export const loadMore = (data) => ({limit, cursor, parent_id, asset_id, sort}, newComments) => {
return data.fetchMore({
query: LOAD_MORE,
variables: {
@@ -68,7 +68,8 @@ export const loadMore = (data) => ({limit, cursor, parent_id, asset_id, sort}) =
...oldData,
asset: {
...oldData.asset,
- comments: [...oldData.asset.comments, ...new_top_level_comments]
+ comments: newComments ? [...new_top_level_comments.reverse(), ...oldData.asset.comments]
+ : [...oldData.asset.comments, ...new_top_level_comments]
}
}
});
diff --git a/graph/typeDefs.graphql b/graph/typeDefs.graphql
index 72a54a0cd..7db4dbad8 100644
--- a/graph/typeDefs.graphql
+++ b/graph/typeDefs.graphql
@@ -448,7 +448,7 @@ type RootQuery {
# Comments returned based on a query.
comments(query: CommentsQuery!): [Comment]
- # Returne the count of comments satisfied by the query. Note that this edge is
+ # Return the count of comments satisfied by the query. Note that this edge is
# expensive as it is not batched. Requires the `ADMIN` role.
commentCount(query: CommentCountQuery!): Int
From 6becb88b560306842726acd90a54f07ad9d93696 Mon Sep 17 00:00:00 2001
From: David Jay
Date: Wed, 22 Feb 2017 15:07:32 -0500
Subject: [PATCH 11/23] Adding style to new comments button.
---
client/coral-embed-stream/src/NewCount.js | 13 +++++++++----
client/coral-embed-stream/style/default.css | 12 ++++++++++--
client/coral-framework/translations.json | 3 +++
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/client/coral-embed-stream/src/NewCount.js b/client/coral-embed-stream/src/NewCount.js
index 99e1297e9..429ecc113 100644
--- a/client/coral-embed-stream/src/NewCount.js
+++ b/client/coral-embed-stream/src/NewCount.js
@@ -1,4 +1,7 @@
import React, {PropTypes} from 'react';
+import I18n from 'coral-framework/modules/i18n/i18n';
+import translations from 'coral-framework/translations.json';
+const lang = new I18n(translations);
const onLoadMoreClick = ({loadMore, commentCount, firstCommentDate, assetId, updateCountCache}) => (e) => {
e.preventDefault();
@@ -14,12 +17,14 @@ const onLoadMoreClick = ({loadMore, commentCount, firstCommentDate, assetId, upd
const NewCount = (props) => {
const newComments = props.commentCount - props.countCache;
- return
+ return
{
props.countCache && newComments > 0 &&
-
- Load {newComments} More Comments
-
+
}
;
};
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index 1deae6026..0e4f7e4a6 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -336,18 +336,26 @@ button.coral-load-more {
text-align: center;
color: #FFF;
background-color: #2376D8;
+ cursor: pointer;
}
button.coral-load-more:hover {
background-color: #4399FF;
}
-.coral-load-more-replies {
+.coral-load-more-replies, .coral-new-comments {
width: 100%;
display: flex;
justify-content: center;
+ cursor: pointer;
}
-.coral-load-more-replies button.coral-load-more {
+.coral-new-comments {
+ position: relative;
+ top: 1.8em;
+ z-index: 100;
+}
+
+.coral-load-more-replies button.coral-load-more, .coral-new-comments button.coral-load-more{
width: initial;
}
diff --git a/client/coral-framework/translations.json b/client/coral-framework/translations.json
index 2884178b6..23405d2d8 100644
--- a/client/coral-framework/translations.json
+++ b/client/coral-framework/translations.json
@@ -11,6 +11,9 @@
"button": "Submit",
"error": "Usernames can contain letters, numbers and _ only"
},
+ "newCount": "View {0} more {1}",
+ "comment": "comment",
+ "comments": "comments",
"error": {
"emailNotVerified": "Email address {0} not verified.",
"email": "Not a valid E-Mail",
From bb0b3f461a7a7809f7adf5821e59dc7e37c55317 Mon Sep 17 00:00:00 2001
From: David Jay
Date: Wed, 22 Feb 2017 15:11:50 -0500
Subject: [PATCH 12/23] Moving polling interval to constant.
---
client/coral-embed-stream/src/Stream.js | 3 ++-
client/coral-framework/constants/comments.js | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/client/coral-embed-stream/src/Stream.js b/client/coral-embed-stream/src/Stream.js
index e68a223ca..89a637ceb 100644
--- a/client/coral-embed-stream/src/Stream.js
+++ b/client/coral-embed-stream/src/Stream.js
@@ -1,5 +1,6 @@
import React, {PropTypes} from 'react';
import Comment from './Comment';
+import {NEW_COMMENT_COUNT_POLL_INTERVAL} from 'coral-framework/constants/comments';
class Stream extends React.Component {
@@ -33,7 +34,7 @@ class Stream extends React.Component {
asset_id: asset.id,
limit: asset.comments.length,
sort: 'REVERSE_CHRONOLOGICAL'
- }), 5000),
+ }), NEW_COMMENT_COUNT_POLL_INTERVAL),
});
}
diff --git a/client/coral-framework/constants/comments.js b/client/coral-framework/constants/comments.js
index 17ea2223e..28db9cdf9 100644
--- a/client/coral-framework/constants/comments.js
+++ b/client/coral-framework/constants/comments.js
@@ -1 +1,2 @@
export const ADDTL_COMMENTS_ON_LOAD_MORE = 10;
+export const NEW_COMMENT_COUNT_POLL_INTERVAL = 20000;
From 27bd1404b38181b15e7ea31528215a8841f566f8 Mon Sep 17 00:00:00 2001
From: David Jay
Date: Wed, 22 Feb 2017 15:13:46 -0500
Subject: [PATCH 13/23] Adding es translation.
---
client/coral-framework/translations.json | 3 +++
1 file changed, 3 insertions(+)
diff --git a/client/coral-framework/translations.json b/client/coral-framework/translations.json
index 23405d2d8..c817925eb 100644
--- a/client/coral-framework/translations.json
+++ b/client/coral-framework/translations.json
@@ -42,6 +42,9 @@
"bannedAccountMsg": "Tu cuenta se encuentra suspendida. Esto significa que no puedes dar Like, Marcar o escribir commentarios. Por favor, contacta moderator@fakeurl for more information",
"editNameMsg": "",
"loadMore": "Ver más",
+ "newCount": "Ver {0} {1} más",
+ "comment": "commentario",
+ "comments": "commentarios",
"error": {
"emailNotVerified": "Dirección de correo electrónico {0} no verificada.",
"email": "No es un email válido",
From 953c749bd2521806308387bedd06ee22dfa78708 Mon Sep 17 00:00:00 2001
From: Riley Davis
Date: Wed, 22 Feb 2017 16:14:14 -0700
Subject: [PATCH 14/23] show login page instead of communicorn :'(
---
client/coral-admin/src/actions/auth.js | 2 +-
client/coral-admin/src/containers/LayoutContainer.js | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/client/coral-admin/src/actions/auth.js b/client/coral-admin/src/actions/auth.js
index bdb101362..c2f3a8056 100644
--- a/client/coral-admin/src/actions/auth.js
+++ b/client/coral-admin/src/actions/auth.js
@@ -9,7 +9,7 @@ const checkLoginFailure = error => ({type: actions.CHECK_LOGIN_FAILURE, error});
export const checkLogin = () => dispatch => {
dispatch(checkLoginRequest());
- coralApi('/auth')
+ return coralApi('/auth')
.then(result => {
const isAdmin = !!result.user.roles.filter(i => i === 'ADMIN').length;
dispatch(checkLoginSuccess(result.user, isAdmin));
diff --git a/client/coral-admin/src/containers/LayoutContainer.js b/client/coral-admin/src/containers/LayoutContainer.js
index 225e92884..5ce208503 100644
--- a/client/coral-admin/src/containers/LayoutContainer.js
+++ b/client/coral-admin/src/containers/LayoutContainer.js
@@ -8,7 +8,11 @@ import {PermissionRequired} from '../components/PermissionRequired';
class LayoutContainer extends Component {
componentWillMount () {
const {checkLogin} = this.props;
- checkLogin();
+ checkLogin().then(() => {
+ if (!this.props.auth.isAdmin) {
+ location.href = '/admin/login';
+ }
+ });
}
render () {
const {isAdmin, loggedIn, loadingUser} = this.props.auth;
From 7ae81fd17269e3954a233fcb28b3a9959f9b147b Mon Sep 17 00:00:00 2001
From: Riley Davis
Date: Thu, 23 Feb 2017 09:43:50 -0700
Subject: [PATCH 15/23] fixing mixed types
---
client/coral-embed-stream/src/Embed.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js
index 487437203..5e979d243 100644
--- a/client/coral-embed-stream/src/Embed.js
+++ b/client/coral-embed-stream/src/Embed.js
@@ -101,8 +101,9 @@ class Embed extends Component {
}
// Find the created_at date of the first comment. If no comments exist, set the date to a week ago.
- const firstCommentDate = asset.comments[0] ? asset.comments[0].created_at
- : new Date(Date.now() - 604800000);
+ const firstCommentDate = asset.comments[0]
+ ? asset.comments[0].created_at
+ : new Date(Date.now() - 1000 * 60 * 60 * 24 * 7).toISOString();
return (
From e3b9799d4a2125377679652723eeaf8b3679fe50 Mon Sep 17 00:00:00 2001
From: Riley Davis
Date: Thu, 23 Feb 2017 09:58:31 -0700
Subject: [PATCH 16/23] nested ternaries hurt me
---
.../coral-framework/graphql/queries/index.js | 49 +++++++++++--------
1 file changed, 29 insertions(+), 20 deletions(-)
diff --git a/client/coral-framework/graphql/queries/index.js b/client/coral-framework/graphql/queries/index.js
index 9b8a55134..c993dfb6a 100644
--- a/client/coral-framework/graphql/queries/index.js
+++ b/client/coral-framework/graphql/queries/index.js
@@ -49,29 +49,38 @@ export const loadMore = (data) => ({limit, cursor, parent_id, asset_id, sort}, n
asset_id,
sort
},
- updateQuery: (oldData, {fetchMoreResult:{data:{new_top_level_comments}}}) =>
+ updateQuery: (oldData, {fetchMoreResult:{data:{new_top_level_comments}}}) => {
- // If loading more replies
- parent_id ? {
- ...oldData,
- asset: {
- ...oldData.asset,
- comments: oldData.asset.comments.map((comment) =>
- comment.id === parent_id
- ? {...comment, replies: [...comment.replies, ...new_top_level_comments]}
- : comment)
- }
+ let updatedAsset;
+
+ if (parent_id) {
+
+ // If loading more replies
+ updatedAsset = {
+ ...oldData,
+ asset: {
+ ...oldData.asset,
+ comments: oldData.asset.comments.map((comment) =>
+ comment.id === parent_id
+ ? {...comment, replies: [...comment.replies, ...new_top_level_comments]}
+ : comment)
+ }
+ };
+ } else {
+
+ // If loading more top-level comments
+ updatedAsset = {
+ ...oldData,
+ asset: {
+ ...oldData.asset,
+ comments: newComments ? [...new_top_level_comments.reverse(), ...oldData.asset.comments]
+ : [...oldData.asset.comments, ...new_top_level_comments]
+ }
+ };
}
- // If loading more top-level comments
- : {
- ...oldData,
- asset: {
- ...oldData.asset,
- comments: newComments ? [...new_top_level_comments.reverse(), ...oldData.asset.comments]
- : [...oldData.asset.comments, ...new_top_level_comments]
- }
- }
+ return updatedAsset;
+ }
});
};
From da732ece14e6cb940db0227ac1abbbc33e62daa9 Mon Sep 17 00:00:00 2001
From: David Jay
Date: Thu, 23 Feb 2017 15:03:09 -0500
Subject: [PATCH 17/23] Updating button padding and font size.
---
client/coral-embed-stream/style/default.css | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index 1deae6026..a99ec1bc7 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -7,7 +7,7 @@ body {
font-family: 'Lato', sans-serif;
font-family: 'Open Sans', sans-serif;
width: 100%;
- font-size: 12px;
+ font-size: 14px;
margin: 0px;
padding: 0px 0px 50px 0px;
}
@@ -18,9 +18,10 @@ body {
button {
padding: 5px 10px;
- margin: 5px;
+ margin: 5px 10px 5px 0px;
background: none;
border: none;
+ font-size: inherit;
}
button:hover {
@@ -208,6 +209,7 @@ hr {
.coral-plugin-pubdate-text {
color: #CCC;
display: inline-block;
+ font-size: .75rem;
}
.coral-plugin-permalinks-container {
From d73a6a87a4ed7592bda1dddc495a47db4142c3ff Mon Sep 17 00:00:00 2001
From: David Jay
Date: Thu, 23 Feb 2017 15:19:38 -0500
Subject: [PATCH 18/23] Adding border radius to tag label.
---
client/coral-embed-stream/style/default.css | 12 ++++++++++++
client/coral-plugin-tag-label/TagLabel.js | 4 +---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index a99ec1bc7..315db2dd3 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -171,6 +171,18 @@ hr {
float: right;
}
+/* Tag Labels */
+
+.coral-plugin-tag-label {
+ background-color: #4C1066;
+ color: white;
+ display: inline-block;
+ margin: 10px 10px;
+ padding: 5px 5px;
+ border-radius: 2px;
+}
+
+
/* Reply styles */
diff --git a/client/coral-plugin-tag-label/TagLabel.js b/client/coral-plugin-tag-label/TagLabel.js
index 0bceca225..ba7403f5c 100644
--- a/client/coral-plugin-tag-label/TagLabel.js
+++ b/client/coral-plugin-tag-label/TagLabel.js
@@ -1,8 +1,6 @@
import React from 'react';
-import styles from './styles.css';
-
-const TagLabel = ({isStaff}) =>
+const TagLabel = ({isStaff}) =>
{isStaff ? 'Staff' : ''}
;
From 471607403ca184f6bea4e4485d87f80704252a50 Mon Sep 17 00:00:00 2001
From: David Jay
Date: Thu, 23 Feb 2017 15:26:02 -0500
Subject: [PATCH 19/23] Switching font.
---
client/coral-embed-stream/style/default.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index 315db2dd3..375dd0097 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -4,8 +4,8 @@ html, body {
}
body {
- font-family: 'Lato', sans-serif;
font-family: 'Open Sans', sans-serif;
+ font-family: 'Lato', sans-serif;
width: 100%;
font-size: 14px;
margin: 0px;
From 4cc3426af483983ae469ccf54b796ef88ad0e53b Mon Sep 17 00:00:00 2001
From: David Jay
Date: Thu, 23 Feb 2017 16:07:41 -0500
Subject: [PATCH 20/23] Adding bolding, adding translations to settings page.
---
client/coral-embed-stream/style/default.css | 9 ++++-----
client/coral-plugin-author-name/AuthorName.js | 4 +---
client/coral-plugin-tag-label/styles.css | 7 -------
client/coral-settings/components/NotLoggedIn.js | 10 +++++-----
client/coral-settings/translations.json | 10 ++++++++--
client/coral-ui/components/Tab.css | 1 +
views/embed/stream.ejs | 2 +-
7 files changed, 20 insertions(+), 23 deletions(-)
delete mode 100644 client/coral-plugin-tag-label/styles.css
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index 375dd0097..35305f309 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -66,10 +66,9 @@ hr {
background: rgb(35,118,216);
color: white;
width: 100%;
- text-align: center;
+ text-align: left;
padding: 10px;
margin-bottom: 10px;
- font-weight: bold;
display: block;
}
@@ -163,8 +162,8 @@ hr {
.coral-plugin-author-name-text {
display: inline-block;
- margin-right: 10px;
- font-weight: bolder;
+ margin: 10px 8px 10px 0;
+ font-weight: bold;
}
.coral-plugin-author-name-bio-flag {
@@ -219,7 +218,7 @@ hr {
}
.coral-plugin-pubdate-text {
- color: #CCC;
+ color: #696969;
display: inline-block;
font-size: .75rem;
}
diff --git a/client/coral-plugin-author-name/AuthorName.js b/client/coral-plugin-author-name/AuthorName.js
index bca1d716b..67f61bc33 100644
--- a/client/coral-plugin-author-name/AuthorName.js
+++ b/client/coral-plugin-author-name/AuthorName.js
@@ -1,6 +1,5 @@
import React, {Component} from 'react';
const packagename = 'coral-plugin-author-name';
-import styles from './styles.css';
export default class AuthorName extends Component {
@@ -24,8 +23,7 @@ export default class AuthorName extends Component {
const {author} = this.props;
return (
+ className={`${packagename}-text`}>
{author && author.name}
);
diff --git a/client/coral-plugin-tag-label/styles.css b/client/coral-plugin-tag-label/styles.css
deleted file mode 100644
index 03dc3dbc8..000000000
--- a/client/coral-plugin-tag-label/styles.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.staff {
- background-color: #4C1066;
- color: white;
- display: inline-block;
- margin: 10px 10px;
- padding: 5px 5px;
-}
diff --git a/client/coral-settings/components/NotLoggedIn.js b/client/coral-settings/components/NotLoggedIn.js
index 095d43a8f..2e2b64181 100644
--- a/client/coral-settings/components/NotLoggedIn.js
+++ b/client/coral-settings/components/NotLoggedIn.js
@@ -1,6 +1,9 @@
import React from 'react';
import styles from './NotLoggedIn.css';
import SignInContainer from '../../coral-sign-in/containers/SignInContainer';
+import translations from '../translations';
+import I18n from 'coral-framework/modules/i18n/i18n';
+const lang = new I18n(translations);
export default ({showSignInDialog}) => (
- From the Settings Page you can
-
- - See your comment history
-
+ {lang.t('fromSettingsPage')}
);
diff --git a/client/coral-settings/translations.json b/client/coral-settings/translations.json
index 2a827a4f0..953708e61 100644
--- a/client/coral-settings/translations.json
+++ b/client/coral-settings/translations.json
@@ -3,12 +3,18 @@
"userNoComment": "This user has not yet left a comment.",
"allComments": "All Comments",
"profileSettings": "Profile Settings",
- "myCommentHistory": "My comment History"
+ "myCommentHistory": "My comment History",
+ "signIn": "Sign in",
+ "toAccess": " to access Settings",
+ "fromSettingsPage": "From the Settings Page you can see your comment history."
},
"es":{
"userNoComment": "Aún no ha escrito ningún comentario.",
"allComments": "Todos los comentarios",
"profileSettings": "Configuración del perfil",
- "myCommentHistory": "Mi historial de comentarios"
+ "myCommentHistory": "Mi historial de comentarios",
+ "signIn": "Entrar",
+ "toAccess": "para acceder a la configuración",
+ "fromSettingsPage": "Desde la peagina de configuración puede ver su historia de comentarios."
}
}
diff --git a/client/coral-ui/components/Tab.css b/client/coral-ui/components/Tab.css
index dfd8d65f1..1d353c8fe 100644
--- a/client/coral-ui/components/Tab.css
+++ b/client/coral-ui/components/Tab.css
@@ -1,5 +1,6 @@
li.base--active {
background: white;
+ font-weight: bold;
}
li.material--active {
diff --git a/views/embed/stream.ejs b/views/embed/stream.ejs
index 77b392b5f..fe7baf919 100644
--- a/views/embed/stream.ejs
+++ b/views/embed/stream.ejs
@@ -3,7 +3,7 @@
-
+
<% if (locals.customCssUrl) { %>
From c1e3aec1816b4b463f18456cb34987c49024cc09 Mon Sep 17 00:00:00 2001
From: David Jay
Date: Thu, 23 Feb 2017 16:20:20 -0500
Subject: [PATCH 21/23] Updating styles.
---
client/coral-embed-stream/style/default.css | 7 +++++++
client/coral-settings/components/NotLoggedIn.css | 1 -
client/coral-sign-in/components/styles.css | 1 +
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index 35305f309..9d6723082 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -59,6 +59,13 @@ hr {
font-weight: bold;
}
+/* Coral sign in button */
+
+#coralSignInButton {
+ background-color: #2a2a2a;
+ color: #FFF;
+}
+
/* Info Box Styles */
.coral-plugin-infobox-info {
top: 0;
diff --git a/client/coral-settings/components/NotLoggedIn.css b/client/coral-settings/components/NotLoggedIn.css
index f65e96507..c15c44c98 100644
--- a/client/coral-settings/components/NotLoggedIn.css
+++ b/client/coral-settings/components/NotLoggedIn.css
@@ -11,5 +11,4 @@
cursor: pointer;
margin: 0px;
padding-bottom: 2px;
- border-bottom: solid 1px black;
}
diff --git a/client/coral-sign-in/components/styles.css b/client/coral-sign-in/components/styles.css
index 60a252a20..87e762ebf 100644
--- a/client/coral-sign-in/components/styles.css
+++ b/client/coral-sign-in/components/styles.css
@@ -36,6 +36,7 @@
.signInButton {
margin-top: 10px;
+ background-color: #2a2a2a;
}
.close {
From e735fb800abfdbc81a513cd8e7c241e0a779a2e8 Mon Sep 17 00:00:00 2001
From: David Jay
Date: Thu, 23 Feb 2017 17:02:35 -0500
Subject: [PATCH 22/23] Updating button and signin style.
---
client/coral-embed-stream/style/default.css | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index 9d6723082..a4bec2400 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -17,17 +17,16 @@ body {
}
button {
- padding: 5px 10px;
margin: 5px 10px 5px 0px;
background: none;
+ padding: 0px;
border: none;
font-size: inherit;
}
button:hover {
border-radius: 2px;
- color: #FFF;
- background-color: rgb(155, 155, 155);
+ color: #767676;
}
button i {
@@ -66,6 +65,10 @@ hr {
color: #FFF;
}
+#coralSignInButton:hover {
+ background-color: #767676;
+}
+
/* Info Box Styles */
.coral-plugin-infobox-info {
top: 0;
From 39536046c969b7de2ec3509e82ffefe5a5d7b09b Mon Sep 17 00:00:00 2001
From: David Jay
Date: Thu, 23 Feb 2017 17:08:35 -0500
Subject: [PATCH 23/23] Fixing permalink icon and adding padding to comment
content.
---
client/coral-embed-stream/style/default.css | 2 +-
client/coral-plugin-commentcontent/CommentContent.js | 2 +-
client/coral-plugin-permalinks/PermalinkButton.js | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index a4bec2400..61965519b 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -167,7 +167,7 @@ hr {
}
.coral-plugin-commentcontent-text {
- margin-bottom: 10px;
+ margin-bottom: 7px;
}
.coral-plugin-author-name-text {
diff --git a/client/coral-plugin-commentcontent/CommentContent.js b/client/coral-plugin-commentcontent/CommentContent.js
index 2dab237dd..501005b3d 100644
--- a/client/coral-plugin-commentcontent/CommentContent.js
+++ b/client/coral-plugin-commentcontent/CommentContent.js
@@ -1,5 +1,5 @@
import React from 'react';
-const name = 'coral-plugin-content';
+const name = 'coral-plugin-commentcontent';
const Content = ({body, styles}) => {
const textbreaks = body.split('\n');
diff --git a/client/coral-plugin-permalinks/PermalinkButton.js b/client/coral-plugin-permalinks/PermalinkButton.js
index 1a99a5627..4c6cbb571 100644
--- a/client/coral-plugin-permalinks/PermalinkButton.js
+++ b/client/coral-plugin-permalinks/PermalinkButton.js
@@ -49,8 +49,8 @@ class PermalinkButton extends React.Component {
return (