+ {comment &&
+
}
{open
?
);
}
diff --git a/client/coral-embed-stream/src/constants/stream.js b/client/coral-embed-stream/src/constants/stream.js
index 992767455..622a86c18 100644
--- a/client/coral-embed-stream/src/constants/stream.js
+++ b/client/coral-embed-stream/src/constants/stream.js
@@ -4,3 +4,4 @@ export const VIEW_ALL_COMMENTS = 'VIEW_ALL_COMMENTS';
export const ADD_COMMENT_CLASSNAME = 'ADD_COMMENT_CLASSNAME';
export const REMOVE_COMMENT_CLASSNAME = 'REMOVE_COMMENT_CLASSNAME';
export const THREADING_LEVEL = process.env.TALK_THREADING_LEVEL;
+export const SET_ACTIVE_TAB = 'CORAL_STREAM_SET_ACTIVE_TAB';
diff --git a/client/coral-embed-stream/src/containers/Embed.js b/client/coral-embed-stream/src/containers/Embed.js
index bf05caf29..fff925a0f 100644
--- a/client/coral-embed-stream/src/containers/Embed.js
+++ b/client/coral-embed-stream/src/containers/Embed.js
@@ -16,7 +16,6 @@ import {addNotification} from 'coral-framework/actions/notification';
import t from 'coral-framework/services/i18n';
import {setActiveTab} from '../actions/embed';
-import {viewAllComments} from '../actions/stream';
const {logout, checkLogin} = authActions;
const {fetchAssetSuccess} = assetActions;
@@ -185,7 +184,6 @@ const mapDispatchToProps = (dispatch) =>
logout,
checkLogin,
setActiveTab,
- viewAllComments,
fetchAssetSuccess,
addNotification,
},
diff --git a/client/coral-embed-stream/src/containers/Stream.js b/client/coral-embed-stream/src/containers/Stream.js
index 28947b77e..21a29dd38 100644
--- a/client/coral-embed-stream/src/containers/Stream.js
+++ b/client/coral-embed-stream/src/containers/Stream.js
@@ -10,7 +10,7 @@ import {
import {notificationActions, authActions} from 'coral-framework';
import {editName} from 'coral-framework/actions/user';
-import {setActiveReplyBox} from '../actions/stream';
+import {setActiveReplyBox, setActiveTab, viewAllComments} from '../actions/stream';
import Stream from '../components/Stream';
import Comment from './Comment';
import {withFragments} from 'coral-framework/hocs';
@@ -308,6 +308,8 @@ const mapStateToProps = (state) => ({
assetUrl: state.stream.assetUrl,
activeTab: state.embed.activeTab,
previousTab: state.embed.previousTab,
+ activeStreamTab: state.stream.activeTab,
+ previousStreamTab: state.stream.previousTab,
commentClassNames: state.stream.commentClassNames
});
@@ -317,6 +319,8 @@ const mapDispatchToProps = (dispatch) =>
addNotification,
setActiveReplyBox,
editName,
+ viewAllComments,
+ setActiveStreamTab: setActiveTab,
}, dispatch);
export default compose(
diff --git a/client/coral-embed-stream/src/reducers/stream.js b/client/coral-embed-stream/src/reducers/stream.js
index 2d6e3e8b2..4f4fcf47f 100644
--- a/client/coral-embed-stream/src/reducers/stream.js
+++ b/client/coral-embed-stream/src/reducers/stream.js
@@ -20,11 +20,19 @@ const initialState = {
assetId: getQueryVariable('asset_id'),
assetUrl: getQueryVariable('asset_url'),
commentId: getQueryVariable('comment_id'),
- commentClassNames: []
+ commentClassNames: [],
+ activeTab: 'all',
+ previousTab: '',
};
export default function stream(state = initialState, action) {
switch (action.type) {
+ case actions.SET_ACTIVE_TAB:
+ return {
+ ...state,
+ activeTab: action.tab,
+ previousTab: state.activeTab,
+ };
case authActions.LOGOUT:
return {
...state,
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index bd56cb748..4d7d534dd 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -25,24 +25,24 @@ body {
min-height: 600px;
}
-button {
- margin: 5px 0px 5px 0px;
+.coralButton {
+ margin: 5px 10px 5px 0px;
background: none;
padding: 0px;
border: none;
font-size: inherit;
}
-button:hover {
+.coralButton:hover {
border-radius: 2px;
color: #767676;
}
-button i {
+.coralButton i {
margin-right: 3px;
}
-hr {
+.coralHr {
border: 0;
height: 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
diff --git a/client/coral-framework/styles/reset.css b/client/coral-framework/styles/reset.css
new file mode 100644
index 000000000..14ae4e723
--- /dev/null
+++ b/client/coral-framework/styles/reset.css
@@ -0,0 +1,29 @@
+.buttonReset {
+
+ /* reset button */
+ user-select: none;
+ outline: invert none medium;
+ border: none;
+ touch-action: manipulation;
+ padding: 0;
+
+ position: relative;
+ overflow: hidden;
+
+ /* Unify anchor and button. */
+ cursor: pointer;
+ display: inline-block;
+ box-sizing: border-box;
+ text-align: center;
+ text-decoration: none;
+ align-items: flex-start;
+ vertical-align: middle;
+ whiteSpace: nowrap;
+ background: transparent;
+ font-size: inherit;
+
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
+ &::-moz-focus-inner: {
+ border: 0;
+ }
+}
diff --git a/client/coral-plugin-best/BestButton.css b/client/coral-plugin-best/BestButton.css
new file mode 100644
index 000000000..b1f169ff6
--- /dev/null
+++ b/client/coral-plugin-best/BestButton.css
@@ -0,0 +1,4 @@
+.button {
+ composes: buttonReset from "coral-framework/styles/reset.css";
+ margin: 5px 10px 5px 0px;
+}
diff --git a/client/coral-plugin-best/BestButton.js b/client/coral-plugin-best/BestButton.js
index 59204bbb8..ac6d03fd8 100644
--- a/client/coral-plugin-best/BestButton.js
+++ b/client/coral-plugin-best/BestButton.js
@@ -3,7 +3,8 @@ import React, {Component, PropTypes} from 'react';
import t from 'coral-framework/services/i18n';
import {Icon} from 'coral-ui';
-import classnames from 'classnames';
+import cn from 'classnames';
+import styles from './BestButton.css';
// tag string for best comments
export const BEST_TAG = 'BEST';
@@ -95,7 +96,7 @@ export class BestButton extends Component {
return (
diff --git a/client/coral-plugin-comment-count/CommentCount.js b/client/coral-plugin-comment-count/CommentCount.js
deleted file mode 100644
index cca99e729..000000000
--- a/client/coral-plugin-comment-count/CommentCount.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import React, {PropTypes} from 'react';
-
-import t from 'coral-framework/services/i18n';
-
-const name = 'coral-plugin-comment-count';
-
-const CommentCount = ({count}) => {
- return
- {`${count} ${count === 1 ? t('comment_singular') : t('comment_plural')}`}
-
;
-};
-
-CommentCount.propTypes = {
- count: PropTypes.number.isRequired
-};
-
-export default CommentCount;
diff --git a/client/coral-plugin-flags/components/styles.css b/client/coral-plugin-flags/components/styles.css
index 6de9df387..0990252b4 100644
--- a/client/coral-plugin-flags/components/styles.css
+++ b/client/coral-plugin-flags/components/styles.css
@@ -1,4 +1,5 @@
.button {
+ composes: buttonReset from "coral-framework/styles/reset.css";
margin: 5px 0px 5px 10px;
}
diff --git a/client/coral-plugin-replies/ReplyButton.css b/client/coral-plugin-replies/ReplyButton.css
new file mode 100644
index 000000000..b1f169ff6
--- /dev/null
+++ b/client/coral-plugin-replies/ReplyButton.css
@@ -0,0 +1,4 @@
+.button {
+ composes: buttonReset from "coral-framework/styles/reset.css";
+ margin: 5px 10px 5px 0px;
+}
diff --git a/client/coral-plugin-replies/ReplyButton.js b/client/coral-plugin-replies/ReplyButton.js
index a66e3c156..5c0b6b918 100644
--- a/client/coral-plugin-replies/ReplyButton.js
+++ b/client/coral-plugin-replies/ReplyButton.js
@@ -2,15 +2,17 @@ import React, {PropTypes} from 'react';
import t from 'coral-framework/services/i18n';
-import classnames from 'classnames';
+import styles from './ReplyButton.css';
+import cn from 'classnames';
const name = 'coral-plugin-replies';
const ReplyButton = ({onClick}) => {
return (
diff --git a/plugins/coral-plugin-like/client/styles.css b/plugins/coral-plugin-like/client/styles.css
index cb372fa47..6e9fdb517 100644
--- a/plugins/coral-plugin-like/client/styles.css
+++ b/plugins/coral-plugin-like/client/styles.css
@@ -23,3 +23,7 @@
}
}
}
+
+.icon {
+ padding: 0 2px;
+}
diff --git a/plugins/coral-plugin-love/client/LoveButton.js b/plugins/coral-plugin-love/client/LoveButton.js
index 7450ad668..d97803195 100644
--- a/plugins/coral-plugin-love/client/LoveButton.js
+++ b/plugins/coral-plugin-love/client/LoveButton.js
@@ -46,7 +46,7 @@ class LoveButton extends React.Component {
onClick={this.handleClick}
>