diff --git a/.babelrc b/.babelrc
index 3dcf42eb7..92a64c2a4 100644
--- a/.babelrc
+++ b/.babelrc
@@ -10,5 +10,12 @@
"transform-async-to-generator",
"transform-react-jsx",
"syntax-dynamic-import"
- ]
+ ],
+ "env": {
+ "test": {
+ "plugins": [
+ ["transform-es2015-modules-commonjs", "dynamic-import-node"]
+ ]
+ }
+ }
}
diff --git a/.gitignore b/.gitignore
index 9c55f2708..0ab845e4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,5 +45,6 @@ plugins/*
!plugins/talk-plugin-deep-reply-count
!plugins/talk-plugin-subscriber
!plugins/talk-plugin-flag-details
+!plugins/talk-plugin-slack-notifications
**/node_modules/*
diff --git a/README.md b/README.md
index 919093750..057b29cf1 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,14 @@
# Talk [](https://circleci.com/gh/coralproject/talk)
+
[](https://dashboard.heroku.com/new?template=https%3A%2F%2Fgithub.com%2Fcoralproject%2Ftalk&env[TALK_FACEBOOK_APP_ID]=ignore&env[TALK_FACEBOOK_APP_SECRET]=ignore)
Online comments are broken. Our open-source Talk tool rethinks how moderation, comment display, and conversation function, creating the opportunity for safer, smarter discussions around your work. [Read more about Talk here](https://coralproject.net/products/talk.html).
-## Documentation
+Built with <3 by The Coral Project & Mozilla.
-Developer Documentation & Setup Guides https://coralproject.github.io/talk/.
+## Getting Started
+
+Check out our Docs: https://coralproject.github.io/talk/
## Relevant Links
diff --git a/client/coral-admin/src/components/ui/Header.css b/client/coral-admin/src/components/ui/Header.css
index f85a7cdf9..1bb08b8a2 100644
--- a/client/coral-admin/src/components/ui/Header.css
+++ b/client/coral-admin/src/components/ui/Header.css
@@ -16,19 +16,18 @@
}
.header {
- background-color: transparent;
box-shadow: none;
min-height: 58px;
display: block;
+ background-color: #696969;
+ box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
}
.header > div {
- background-color: #696969;
position: relative;
padding: 0;
- min-width: 1280px;
+ width: 1280px;
margin: 0 auto;
- box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
height: 58px;
}
diff --git a/client/coral-admin/src/components/ui/Layout.css b/client/coral-admin/src/components/ui/Layout.css
index a3cc7b7b6..924c6ced7 100644
--- a/client/coral-admin/src/components/ui/Layout.css
+++ b/client/coral-admin/src/components/ui/Layout.css
@@ -1,5 +1,4 @@
.layout {
- max-width: 1280px;
margin: 0 auto;
background-color: #FAFAFA;
}
diff --git a/client/coral-admin/src/routes/Community/components/FlaggedAccounts.css b/client/coral-admin/src/routes/Community/components/FlaggedAccounts.css
index 4e9600cbd..a41bda485 100644
--- a/client/coral-admin/src/routes/Community/components/FlaggedAccounts.css
+++ b/client/coral-admin/src/routes/Community/components/FlaggedAccounts.css
@@ -2,6 +2,8 @@
padding: 10px;
display: flex;
padding-bottom: 200px;
+ max-width: 1280px;
+ margin: 0 auto;
}
.mainFlaggedContent {
diff --git a/client/coral-admin/src/routes/Configure/components/Configure.css b/client/coral-admin/src/routes/Configure/components/Configure.css
index 0b7319132..eae75caba 100644
--- a/client/coral-admin/src/routes/Configure/components/Configure.css
+++ b/client/coral-admin/src/routes/Configure/components/Configure.css
@@ -3,6 +3,8 @@
*/
.container {
+ max-width: 1280px;
+ margin: 0 auto;
display: flex;
h3 {
diff --git a/client/coral-admin/src/routes/Dashboard/components/Dashboard.css b/client/coral-admin/src/routes/Dashboard/components/Dashboard.css
index 586ff6c08..aee7e702b 100644
--- a/client/coral-admin/src/routes/Dashboard/components/Dashboard.css
+++ b/client/coral-admin/src/routes/Dashboard/components/Dashboard.css
@@ -4,6 +4,8 @@
.Dashboard {
display: flex;
+ max-width: 1280px;
+ margin: 0 auto;
}
.heading {
diff --git a/client/coral-admin/src/routes/Stories/components/Stories.css b/client/coral-admin/src/routes/Stories/components/Stories.css
index d8a75a4ce..be6b6f921 100644
--- a/client/coral-admin/src/routes/Stories/components/Stories.css
+++ b/client/coral-admin/src/routes/Stories/components/Stories.css
@@ -1,6 +1,8 @@
.container {
padding: 10px;
display: flex;
+ max-width: 1280px;
+ margin: 0 auto;
}
.leftColumn {
diff --git a/client/coral-embed-stream/src/components/CountdownSeconds.js b/client/coral-embed-stream/src/components/CountdownSeconds.js
index 789b674b5..46b6b1fbf 100644
--- a/client/coral-embed-stream/src/components/CountdownSeconds.js
+++ b/client/coral-embed-stream/src/components/CountdownSeconds.js
@@ -35,16 +35,23 @@ export class CountdownSeconds extends React.Component {
const {until, classNameForMsRemaining} = this.props;
const msRemaining = until - now;
const secRemaining = msRemaining / 1000;
- const wholeSecRemaining = Math.floor(secRemaining);
- const plural = secRemaining !== 1;
- const units = t(plural ? 'edit_comment.seconds_plural' : 'edit_comment.second');
+ const minRemaining = secRemaining / 60;
+ const secToMinRemaining = secRemaining % 60;
+ const wholeMinRemaining = Math.floor(minRemaining);
+ const wholeSecRemaining = Math.floor(secToMinRemaining);
+ const secUnit = t(wholeSecRemaining !== 1 ? 'edit_comment.seconds_plural' : 'edit_comment.second');
+ const minUnit = t(wholeMinRemaining !== 1 ? 'edit_comment.minutes_plural' : 'edit_comment.minute');
let classFromProp;
if (typeof classNameForMsRemaining === 'function') {
classFromProp = classNameForMsRemaining(msRemaining);
}
+ const text = wholeMinRemaining > 0
+ ? `${wholeMinRemaining} ${minUnit} ${wholeSecRemaining} ${secUnit}`
+ : `${wholeSecRemaining} ${secUnit}`;
+
return (
- {`${wholeSecRemaining} ${units}`}
+ {text}
);
}
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index a20c94d1a..0dcbf856e 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -270,6 +270,7 @@ button.comment__action-button[disabled],
width: 75%;
font-size: 16px;
border: 1px solid #ccc;
+ max-width: calc(100% - 40px);
}
/* Close comments */
diff --git a/client/talk-plugin-infobox/__tests__/markdown.spec.js b/client/coral-framework/components/__tests__/Markdown.spec.js
similarity index 81%
rename from client/talk-plugin-infobox/__tests__/markdown.spec.js
rename to client/coral-framework/components/__tests__/Markdown.spec.js
index 1d98dabae..ab2c1afd1 100644
--- a/client/talk-plugin-infobox/__tests__/markdown.spec.js
+++ b/client/coral-framework/components/__tests__/Markdown.spec.js
@@ -1,6 +1,5 @@
import React from 'react';
import {shallow} from 'enzyme';
-import {expect} from 'chai';
import Markdown from '../Markdown';
const render = (props) => shallow();
@@ -9,12 +8,12 @@ describe('Markdown', () => {
it('should convert Markdown to html', () => {
const wrapper = render({content: '*test*'});
const html = wrapper.html();
- expect(html).to.contain('');
+ expect(html).toMatch('');
});
it('should set target="_parent" for links', () => {
const wrapper = render({content: '[link](https://coralproject.net)'});
const html = wrapper.html();
- expect(html).to.contain('target="_parent"');
+ expect(html).toMatch('target="_parent"');
});
});
diff --git a/client/coral-framework/services/i18n.js b/client/coral-framework/services/i18n.js
index 1a4910b21..87e375853 100644
--- a/client/coral-framework/services/i18n.js
+++ b/client/coral-framework/services/i18n.js
@@ -13,7 +13,7 @@ import pt_BR from '../../../locales/pt_BR.yml';
// Translations are happening at https://translate.lingohub.com/the-coral-project/dashboard
-const defaultLanguage = 'en';
+const defaultLanguage = process.env.TALK_DEFAULT_LANG;
const translations = {...en, ...es, ...fr, ...pt_BR};
let lang;
diff --git a/client/talk-plugin-commentbox/CommentForm.js b/client/talk-plugin-commentbox/CommentForm.js
index f4bbbd139..55d248994 100644
--- a/client/talk-plugin-commentbox/CommentForm.js
+++ b/client/talk-plugin-commentbox/CommentForm.js
@@ -85,8 +85,8 @@ export class CommentForm extends React.Component {
render() {
const {maxCharCount, submitEnabled, cancelButtonClassName, submitButtonClassName, charCountEnable, body, loadingState} = this.props;
- const length = body.length;
- const isRespectingMaxCount = (length) => charCountEnable && maxCharCount && length > maxCharCount;
+ const length = body.trim().length;
+ const isRespectingMaxCount = (length) => charCountEnable && maxCharCount && length > maxCharCount;
const disableSubmitButton = !length || isRespectingMaxCount(length) || !submitEnabled({body}) || loadingState === 'loading';
const disableCancelButton = loadingState === 'loading';
const disableTextArea = loadingState === 'loading';
diff --git a/client/talk-plugin-commentbox/__tests__/commentBox.spec.js b/client/talk-plugin-commentbox/__tests__/commentBox.spec.js
deleted file mode 100644
index 6ae09e786..000000000
--- a/client/talk-plugin-commentbox/__tests__/commentBox.spec.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import React from 'react';
-import {shallow} from 'enzyme';
-import {expect} from 'chai';
-import CommentBox from '../CommentBox';
-
-describe('CommentBox', () => {
- let comment;
- let render;
- beforeEach(() => {
- comment = {};
- const postItem = (item) => {
- comment.posted = item;
- return Promise.resolve(4);
- };
- render = shallow( comment.text = e.target.value}
- item_id={'1'}
- comments={['1', '2', '3']}/>);
- });
-
- it('should render the CommentBox appropriately', () => {
- expect(render.contains('