From eb3a9431f9d11725d45546bfc3db980ee9d3a8ad Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 20 Jul 2017 11:50:13 -0300 Subject: [PATCH 01/14] Renaming --- .eslintignore | 18 ++++---- .gitignore | 18 ++++---- bin/templates/plugin/client/translations.yml | 4 +- .../src/routes/Community/components/User.js | 2 +- .../src/components/Comment.js | 10 ++--- .../src/components/EditableCommentContent.js | 4 +- .../src/components/Stream.js | 8 ++-- client/coral-embed-stream/style/default.css | 44 +++++++++---------- client/coral-framework/reducers/index.js | 2 +- client/coral-plugin-author-name/AuthorName.js | 2 +- .../components/FlagButton.js | 2 +- client/coral-plugin-history/Comment.js | 2 +- client/coral-plugin-infobox/InfoBox.js | 2 +- client/coral-plugin-pubdate/PubDate.js | 2 +- .../coral-plugin-questionbox/QuestionBox.js | 2 +- client/coral-plugin-replies/ReplyBox.js | 4 +- client/coral-plugin-replies/ReplyButton.js | 2 +- client/coral-plugin-tag-label/TagLabel.js | 2 +- .../containers/ProfileContainer.js | 2 +- docs/architecture-tags.md | 4 +- docs/pages/plugins/client.md | 4 +- docs/plugins-client.md | 4 +- docs/plugins-experimental.md | 2 +- plugin-api/alpha/client/actions/index.js | 2 +- plugins.default.json | 18 ++++---- .../client/components/FakeComment.js | 30 ++++++------- .../client/components/CommentContent.js | 2 +- .../coral-plugin-comment-content/package.json | 2 +- plugins/coral-plugin-facebook-auth/README.md | 2 +- .../coral-plugin-facebook-auth/package.json | 2 +- .../coral-plugin-like/client/LikeButton.js | 4 +- .../coral-plugin-like/client/translations.yml | 4 +- .../coral-plugin-love/client/LoveButton.js | 4 +- .../coral-plugin-love/client/translations.yml | 4 +- .../client/components/OffTopicFilter.js | 2 +- .../client/components/styles.css | 2 +- .../client/containers/OffTopicFilter.js | 2 +- plugins/coral-plugin-offtopic/client/index.js | 2 +- .../client/RespectButton.js | 4 +- .../client/translations.yml | 4 +- .../client/components/ViewingOptions.js | 6 +-- test/e2e/pages/embedStreamPage.js | 32 +++++++------- test/e2e/tests/EmbedStreamTests.js | 38 ++++++++-------- views/article.ejs | 2 +- 44 files changed, 157 insertions(+), 157 deletions(-) diff --git a/.eslintignore b/.eslintignore index afa7bf16d..cd0b1a983 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,15 +3,15 @@ docs client/lib **/*.html plugins/* -!plugins/coral-plugin-facebook-auth -!plugins/coral-plugin-auth -!plugins/coral-plugin-respect -!plugins/coral-plugin-offtopic -!plugins/coral-plugin-like -!plugins/coral-plugin-mod -!plugins/coral-plugin-love -!plugins/coral-plugin-viewing-options -!plugins/coral-plugin-comment-content +!plugins/talk-plugin-facebook-auth +!plugins/talk-plugin-auth +!plugins/talk-plugin-respect +!plugins/talk-plugin-offtopic +!plugins/talk-plugin-like +!plugins/talk-plugin-mod +!plugins/talk-plugin-love +!plugins/talk-plugin-viewing-options +!plugins/talk-plugin-comment-content !plugins/talk-plugin-permalink !plugins/talk-plugin-featured-comments diff --git a/.gitignore b/.gitignore index bd8edcd94..83b62b259 100644 --- a/.gitignore +++ b/.gitignore @@ -16,15 +16,15 @@ coverage/ plugins.json plugins/* -!plugins/coral-plugin-facebook-auth -!plugins/coral-plugin-auth -!plugins/coral-plugin-respect -!plugins/coral-plugin-offtopic -!plugins/coral-plugin-like -!plugins/coral-plugin-mod -!plugins/coral-plugin-love -!plugins/coral-plugin-viewing-options -!plugins/coral-plugin-comment-content +!plugins/talk-plugin-facebook-auth +!plugins/talk-plugin-auth +!plugins/talk-plugin-respect +!plugins/talk-plugin-offtopic +!plugins/talk-plugin-like +!plugins/talk-plugin-mod +!plugins/talk-plugin-love +!plugins/talk-plugin-viewing-options +!plugins/talk-plugin-comment-content !plugins/talk-plugin-permalink !plugins/talk-plugin-featured-comments diff --git a/bin/templates/plugin/client/translations.yml b/bin/templates/plugin/client/translations.yml index d8407b801..8961fd6e7 100644 --- a/bin/templates/plugin/client/translations.yml +++ b/bin/templates/plugin/client/translations.yml @@ -4,11 +4,11 @@ # # ``` # en: -# coral-plugin-respect: +# talk-plugin-respect: # respect: Respect # respected: Respected # es: -# coral-plugin-respect: +# talk-plugin-respect: # respect: Respetar # respected: Respetado # ``` diff --git a/client/coral-admin/src/routes/Community/components/User.js b/client/coral-admin/src/routes/Community/components/User.js index b6a01f016..5aea161b5 100644 --- a/client/coral-admin/src/routes/Community/components/User.js +++ b/client/coral-admin/src/routes/Community/components/User.js @@ -2,7 +2,7 @@ import React from 'react'; import styles from './Community.css'; import ActionButton from './ActionButton'; -import {username} from 'coral-plugin-flags/helpers/flagReasons'; +import {username} from 'talk-plugin-flags/helpers/flagReasons'; import ActionsMenu from 'coral-admin/src/components/ActionsMenu'; import ActionsMenuItem from 'coral-admin/src/components/ActionsMenuItem'; diff --git a/client/coral-embed-stream/src/components/Comment.js b/client/coral-embed-stream/src/components/Comment.js index 8e0539279..54bbfea50 100644 --- a/client/coral-embed-stream/src/components/Comment.js +++ b/client/coral-embed-stream/src/components/Comment.js @@ -1,11 +1,11 @@ import React from 'react'; import PropTypes from 'prop-types'; -import AuthorName from 'coral-plugin-author-name/AuthorName'; -import TagLabel from 'coral-plugin-tag-label/TagLabel'; -import PubDate from 'coral-plugin-pubdate/PubDate'; -import {ReplyBox, ReplyButton} from 'coral-plugin-replies'; -import {FlagComment} from 'coral-plugin-flags'; +import AuthorName from 'talk-plugin-author-name/AuthorName'; +import TagLabel from 'talk-plugin-tag-label/TagLabel'; +import PubDate from 'talk-plugin-pubdate/PubDate'; +import {ReplyBox, ReplyButton} from 'talk-plugin-replies'; +import {FlagComment} from 'talk-plugin-flags'; import {can} from 'coral-framework/services/perms'; import {TransitionGroup} from 'react-transition-group'; import cn from 'classnames'; diff --git a/client/coral-embed-stream/src/components/EditableCommentContent.js b/client/coral-embed-stream/src/components/EditableCommentContent.js index 98be14d13..6512c8cdd 100644 --- a/client/coral-embed-stream/src/components/EditableCommentContent.js +++ b/client/coral-embed-stream/src/components/EditableCommentContent.js @@ -1,6 +1,6 @@ import React, {PropTypes} from 'react'; -import {notifyForNewCommentStatus} from 'coral-plugin-commentbox/CommentBox'; -import {CommentForm} from 'coral-plugin-commentbox/CommentForm'; +import {notifyForNewCommentStatus} from 'talk-plugin-commentbox/CommentBox'; +import {CommentForm} from 'talk-plugin-commentbox/CommentForm'; import styles from './Comment.css'; import {CountdownSeconds} from './CountdownSeconds'; import {getEditableUntilDate} from './util'; diff --git a/client/coral-embed-stream/src/components/Stream.js b/client/coral-embed-stream/src/components/Stream.js index 2a1381862..99ff760e8 100644 --- a/client/coral-embed-stream/src/components/Stream.js +++ b/client/coral-embed-stream/src/components/Stream.js @@ -4,15 +4,15 @@ import {StreamError} from './StreamError'; import Comment from '../components/Comment'; import SuspendedAccount from './SuspendedAccount'; import Slot from 'coral-framework/components/Slot'; -import InfoBox from 'coral-plugin-infobox/InfoBox'; +import InfoBox from 'talk-plugin-infobox/InfoBox'; import {can} from 'coral-framework/services/perms'; -import {ModerationLink} from 'coral-plugin-moderation'; +import {ModerationLink} from 'talk-plugin-moderation'; import RestrictedMessageBox from 'coral-framework/components/RestrictedMessageBox'; import t, {timeago} from 'coral-framework/services/i18n'; import {getSlotComponents} from 'coral-framework/helpers/plugins'; -import CommentBox from 'coral-plugin-commentbox/CommentBox'; -import QuestionBox from 'coral-plugin-questionbox/QuestionBox'; +import CommentBox from 'talk-plugin-commentbox/CommentBox'; +import QuestionBox from 'talk-plugin-questionbox/QuestionBox'; import {Button, TabBar, Tab, TabCount, TabContent, TabPane} from 'coral-ui'; import cn from 'classnames'; diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css index 90a6250a3..055107b33 100644 --- a/client/coral-embed-stream/style/default.css +++ b/client/coral-embed-stream/style/default.css @@ -79,7 +79,7 @@ body { } /* Info Box Styles */ -.coral-plugin-infobox-info { +.talk-plugin-infobox-info { top: 0; border: 0; background: #DEEDFF; @@ -94,26 +94,26 @@ body { } -.coral-plugin-infobox-info em{ +.talk-plugin-infobox-info em{ font-style: italic; } -.coral-plugin-infobox-info strong{ +.talk-plugin-infobox-info strong{ font-weight: bold; } -.coral-plugin-infobox-info blockquote{ +.talk-plugin-infobox-info blockquote{ border-left: solid 2px #2a2a2a; padding-left: 10px; } -.coral-plugin-infobox-info a{ +.talk-plugin-infobox-info a{ color: #2a2a2a; } /* Question Box Styles */ -.coral-plugin-questionbox-info { +.talk-plugin-questionbox-info { top: 0; border: 0; background: #F0F0F0; @@ -129,7 +129,7 @@ body { display: flex; } -.coral-plugin-questionbox-icon.bubble{ +.talk-plugin-questionbox-icon.bubble{ position: absolute; top: 8px; left: 10px; @@ -138,7 +138,7 @@ body { z-index: 0; } -.coral-plugin-questionbox-icon.person{ +.talk-plugin-questionbox-icon.person{ z-index: 2; top: 12px; left: 12px; @@ -147,7 +147,7 @@ body { color: #262626; } -.coral-plugin-questionbox-box { +.talk-plugin-questionbox-box { position: relative; border: 0; color: white; @@ -161,7 +161,7 @@ body { vertical-align: middle; } -.coral-plugin-questionbox-content { +.talk-plugin-questionbox-content { padding: 5px; display: flex; align-items: center; @@ -231,26 +231,26 @@ body { position: relative; } -.coral-plugin-commentcontent-text { +.talk-plugin-commentcontent-text { margin-bottom: 7px; font-size: 16px; font-weight: 100; line-height: 1.3; } -.coral-plugin-author-name-text { +.talk-plugin-author-name-text { display: inline-block; margin: 10px 5px 10px 0; font-weight: bold; } -.coral-plugin-author-name-bio-flag { +.talk-plugin-author-name-bio-flag { float: right; } /* Tag Labels */ -.coral-plugin-tag-label { +.talk-plugin-tag-label { background-color: #4C1066; color: white; display: inline-block; @@ -293,44 +293,44 @@ button.comment__action-button[disabled], color: #F00; } -.coral-plugin-pubdate-text { +.talk-plugin-pubdate-text { display: inline-block; } /* Flag Styles */ -.coral-plugin-flags-popup-form { +.talk-plugin-flags-popup-form { margin-bottom: 10px; } -.coral-plugin-flags-popup-header { +.talk-plugin-flags-popup-header { font-weight: bolder; font-size: 1.33rem; margin-bottom: 10px; } -.coral-plugin-flags-popup-radio { +.talk-plugin-flags-popup-radio { margin:5px; } -.coral-plugin-flags-popup-radio-label { +.talk-plugin-flags-popup-radio-label { margin:5px; font-weight: 400; font-size: .9rem; } -.coral-plugin-flags-popup-counter { +.talk-plugin-flags-popup-counter { float: left; margin-top: 21px; color: #999; } -.coral-plugin-flags-popup-button { +.talk-plugin-flags-popup-button { float: right; margin-top: 10px; } -.coral-plugin-flags-reason-text { +.talk-plugin-flags-reason-text { margin-left: 20px; margin-top: 5px; width: 75%; diff --git a/client/coral-framework/reducers/index.js b/client/coral-framework/reducers/index.js index 8928cae93..f1ac580dc 100644 --- a/client/coral-framework/reducers/index.js +++ b/client/coral-framework/reducers/index.js @@ -1,7 +1,7 @@ import auth from './auth'; import user from './user'; import asset from './asset'; -import {reducer as commentBox} from '../../coral-plugin-commentbox'; +import {reducer as commentBox} from '../../talk-plugin-commentbox'; export default { auth, diff --git a/client/coral-plugin-author-name/AuthorName.js b/client/coral-plugin-author-name/AuthorName.js index 7d453d96f..89835a742 100644 --- a/client/coral-plugin-author-name/AuthorName.js +++ b/client/coral-plugin-author-name/AuthorName.js @@ -1,5 +1,5 @@ import React, {Component} from 'react'; -const packagename = 'coral-plugin-author-name'; +const packagename = 'talk-plugin-author-name'; export default class AuthorName extends Component { diff --git a/client/coral-plugin-flags/components/FlagButton.js b/client/coral-plugin-flags/components/FlagButton.js index 51b88391e..6b7e3cc56 100644 --- a/client/coral-plugin-flags/components/FlagButton.js +++ b/client/coral-plugin-flags/components/FlagButton.js @@ -8,7 +8,7 @@ import ClickOutside from 'coral-framework/components/ClickOutside'; import cn from 'classnames'; import styles from './styles.css'; -const name = 'coral-plugin-flags'; +const name = 'talk-plugin-flags'; export default class FlagButton extends Component { diff --git a/client/coral-plugin-history/Comment.js b/client/coral-plugin-history/Comment.js index 78d48c1e6..f90362e2d 100644 --- a/client/coral-plugin-history/Comment.js +++ b/client/coral-plugin-history/Comment.js @@ -2,7 +2,7 @@ import React, {PropTypes} from 'react'; import {Icon} from '../coral-ui'; import styles from './Comment.css'; import Slot from 'coral-framework/components/Slot'; -import PubDate from '../coral-plugin-pubdate/PubDate'; +import PubDate from '../talk-plugin-pubdate/PubDate'; import CommentContent from '../coral-embed-stream/src/components/CommentContent'; import t from 'coral-framework/services/i18n'; diff --git a/client/coral-plugin-infobox/InfoBox.js b/client/coral-plugin-infobox/InfoBox.js index dd94cfecd..3b9d7da75 100644 --- a/client/coral-plugin-infobox/InfoBox.js +++ b/client/coral-plugin-infobox/InfoBox.js @@ -1,7 +1,7 @@ import React from 'react'; import Markdown from './Markdown'; -const packagename = 'coral-plugin-infobox'; +const packagename = 'talk-plugin-infobox'; const InfoBox = ({enable, content}) =>
{timeago(created_at)} diff --git a/client/coral-plugin-questionbox/QuestionBox.js b/client/coral-plugin-questionbox/QuestionBox.js index 3ad439c2a..d22801bae 100644 --- a/client/coral-plugin-questionbox/QuestionBox.js +++ b/client/coral-plugin-questionbox/QuestionBox.js @@ -1,5 +1,5 @@ import React from 'react'; -const packagename = 'coral-plugin-questionbox'; +const packagename = 'talk-plugin-questionbox'; import Slot from 'coral-framework/components/Slot'; const QuestionBox = ({enable, content}) => diff --git a/client/coral-plugin-replies/ReplyBox.js b/client/coral-plugin-replies/ReplyBox.js index 7e0bd04d5..58cb0110d 100644 --- a/client/coral-plugin-replies/ReplyBox.js +++ b/client/coral-plugin-replies/ReplyBox.js @@ -1,7 +1,7 @@ import React, {Component, PropTypes} from 'react'; -import CommentBox from '../coral-plugin-commentbox/CommentBox'; +import CommentBox from '../talk-plugin-commentbox/CommentBox'; -const name = 'coral-plugin-replies'; +const name = 'talk-plugin-replies'; class ReplyBox extends Component { diff --git a/client/coral-plugin-replies/ReplyButton.js b/client/coral-plugin-replies/ReplyButton.js index b4c1ccfbc..8ea113c97 100644 --- a/client/coral-plugin-replies/ReplyButton.js +++ b/client/coral-plugin-replies/ReplyButton.js @@ -5,7 +5,7 @@ import t from 'coral-framework/services/i18n'; import cn from 'classnames'; import styles from './ReplyButton.css'; -const name = 'coral-plugin-replies'; +const name = 'talk-plugin-replies'; const ReplyButton = ({onClick}) => { return ( diff --git a/client/coral-plugin-tag-label/TagLabel.js b/client/coral-plugin-tag-label/TagLabel.js index 4a5d3632f..8c6f19a60 100644 --- a/client/coral-plugin-tag-label/TagLabel.js +++ b/client/coral-plugin-tag-label/TagLabel.js @@ -1,6 +1,6 @@ import React from 'react'; -const TagLabel = ({children}) =>
+const TagLabel = ({children}) =>
{children}
; diff --git a/client/coral-settings/containers/ProfileContainer.js b/client/coral-settings/containers/ProfileContainer.js index a4cb9459f..91de923b2 100644 --- a/client/coral-settings/containers/ProfileContainer.js +++ b/client/coral-settings/containers/ProfileContainer.js @@ -9,7 +9,7 @@ import {link} from 'coral-framework/services/pym'; import NotLoggedIn from '../components/NotLoggedIn'; import IgnoredUsers from '../components/IgnoredUsers'; import {Spinner} from 'coral-ui'; -import CommentHistory from 'coral-plugin-history/CommentHistory'; +import CommentHistory from 'talk-plugin-history/CommentHistory'; import {showSignInDialog, checkLogin} from 'coral-framework/actions/auth'; import t from 'coral-framework/services/i18n'; diff --git a/docs/architecture-tags.md b/docs/architecture-tags.md index 06c5d3498..1e4405509 100644 --- a/docs/architecture-tags.md +++ b/docs/architecture-tags.md @@ -29,10 +29,10 @@ Tag Definitions must be created in order for the system to determine what tags a Tag Definitions do not contain any logic themselves but provide information that other parts of the system can use to specify which models a tag can be applied to (models) and perform authorization logic (permissions). -Take the tag created by `coral-plugin-offtopic` as an example. +Take the tag created by `talk-plugin-offtopic` as an example. ``` -// coral-plugin-offtopic/index.js +// talk-plugin-offtopic/index.js module.exports = { tags: [ { diff --git a/docs/pages/plugins/client.md b/docs/pages/plugins/client.md index dce2d58af..6c511079f 100644 --- a/docs/pages/plugins/client.md +++ b/docs/pages/plugins/client.md @@ -132,7 +132,7 @@ In this example we add our reaction component to the `commentReaction` Slot ```js import React from 'react'; -import {withReaction} from 'coral-plugin-api'; +import {withReaction} from 'talk-plugin-api'; class LoveButton extends React.Component { handleClick = () => { @@ -175,7 +175,7 @@ This feature introduces `withReaction` HOC. `withReaction` takes, as argument, * `count` - The reaction count -For full reference: Please, check `coral-plugin-love`: [LoveButton.js](https://github.com/coralproject/talk/blob/master/plugins/coral-plugin-love/client/LoveButton.js) +For full reference: Please, check `talk-plugin-love`: [LoveButton.js](https://github.com/coralproject/talk/blob/master/plugins/talk-plugin-love/client/LoveButton.js) ### Comment Stream diff --git a/docs/plugins-client.md b/docs/plugins-client.md index 4f4e784ec..b9aae359d 100644 --- a/docs/plugins-client.md +++ b/docs/plugins-client.md @@ -132,7 +132,7 @@ In this example we add our reaction component to the `commentReaction` Slot ```js import React from 'react'; -import {withReaction} from 'coral-plugin-api'; +import {withReaction} from 'talk-plugin-api'; class LoveButton extends React.Component { handleClick = () => { @@ -175,7 +175,7 @@ This feature introduces `withReaction` HOC. `withReaction` takes, as argument, * `count` - The reaction count -For full reference: Please, check `coral-plugin-love`: [LoveButton.js](https://github.com/coralproject/talk/blob/master/plugins/coral-plugin-love/client/LoveButton.js) +For full reference: Please, check `talk-plugin-love`: [LoveButton.js](https://github.com/coralproject/talk/blob/master/plugins/talk-plugin-love/client/LoveButton.js) ### Comment Stream diff --git a/docs/plugins-experimental.md b/docs/plugins-experimental.md index 766f5f050..b89f3741a 100644 --- a/docs/plugins-experimental.md +++ b/docs/plugins-experimental.md @@ -46,7 +46,7 @@ We can easily trigger `Talk` actions in our plugin Components. import React, {Component} from 'react'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; -import {addTag, removeTag} from 'coral-plugin-commentbox/actions'; +import {addTag, removeTag} from 'talk-plugin-commentbox/actions'; class MyButton extends Component { render() { diff --git a/plugin-api/alpha/client/actions/index.js b/plugin-api/alpha/client/actions/index.js index 8e8e11c0a..f6b2427a8 100644 --- a/plugin-api/alpha/client/actions/index.js +++ b/plugin-api/alpha/client/actions/index.js @@ -1,2 +1,2 @@ -export {addTag, removeTag} from 'coral-plugin-commentbox/actions'; +export {addTag, removeTag} from 'talk-plugin-commentbox/actions'; export {addCommentClassName, removeCommentClassName} from 'coral-embed-stream/src/actions/stream'; diff --git a/plugins.default.json b/plugins.default.json index 4a1ea3282..05da159b7 100644 --- a/plugins.default.json +++ b/plugins.default.json @@ -1,17 +1,17 @@ { "server": [ - "coral-plugin-auth", - "coral-plugin-respect", - "coral-plugin-offtopic", - "coral-plugin-facebook-auth", + "talk-plugin-auth", + "talk-plugin-respect", + "talk-plugin-offtopic", + "talk-plugin-facebook-auth", "talk-plugin-featured-comments" ], "client": [ - "coral-plugin-respect", - "coral-plugin-auth", - "coral-plugin-offtopic", - "coral-plugin-viewing-options", - "coral-plugin-comment-content", + "talk-plugin-respect", + "talk-plugin-auth", + "talk-plugin-offtopic", + "talk-plugin-viewing-options", + "talk-plugin-comment-content", "talk-plugin-permalink", "talk-plugin-featured-comments" ] diff --git a/plugins/coral-plugin-auth/client/components/FakeComment.js b/plugins/coral-plugin-auth/client/components/FakeComment.js index 5517b72aa..b6b4e7609 100644 --- a/plugins/coral-plugin-auth/client/components/FakeComment.js +++ b/plugins/coral-plugin-auth/client/components/FakeComment.js @@ -1,9 +1,9 @@ import React from 'react'; import t from 'coral-framework/services/i18n'; -import {ReplyButton} from 'coral-plugin-replies'; -import PubDate from 'coral-plugin-pubdate/PubDate'; +import {ReplyButton} from 'talk-plugin-replies'; +import PubDate from 'talk-plugin-pubdate/PubDate'; import Slot from 'coral-framework/components/Slot'; -import AuthorName from 'coral-plugin-author-name/AuthorName'; +import AuthorName from 'talk-plugin-author-name/AuthorName'; import styles from 'coral-embed-stream/src/components/Comment.css'; export const FakeComment = ({username, created_at, comment}) => ( @@ -13,13 +13,13 @@ export const FakeComment = ({username, created_at, comment}) => (
-
-
-
-
-
-
{ props.open ? ( -
+
    { React.Children.map(, (component) => { return React.createElement('li', { - className: 'coral-plugin-viewing-options-item' + className: 'talk-plugin-viewing-options-item' }, component); }) } diff --git a/test/e2e/pages/embedStreamPage.js b/test/e2e/pages/embedStreamPage.js index 536e58b38..75e9e0ecd 100644 --- a/test/e2e/pages/embedStreamPage.js +++ b/test/e2e/pages/embedStreamPage.js @@ -111,52 +111,52 @@ module.exports = { selector: '#coralStream #logout' }, commentBox: { - selector: '.coral-plugin-commentbox-textarea' + selector: '.talk-plugin-commentbox-textarea' }, postButton: { - selector: '#commentBox .coral-plugin-commentbox-button' + selector: '#commentBox .talk-plugin-commentbox-button' }, likeButton: { - selector: '.embed__stream .comment .coral-plugin-likes-container .coral-plugin-likes-button' + selector: '.embed__stream .comment .talk-plugin-likes-container .talk-plugin-likes-button' }, likeText: { - selector: '.embed__stream .comment .coral-plugin-likes-container .coral-plugin-likes-button .coral-plugin-likes-button-text' + selector: '.embed__stream .comment .talk-plugin-likes-container .talk-plugin-likes-button .talk-plugin-likes-button-text' }, likesCount: { - selector: '.embed__stream .comment .coral-plugin-likes-container .coral-plugin-likes-button .coral-plugin-likes-like-count' + selector: '.embed__stream .comment .talk-plugin-likes-container .talk-plugin-likes-button .talk-plugin-likes-like-count' }, flagButton: { - selector: '.embed__stream .comment .coral-plugin-flags-container .coral-plugin-flags-button' + selector: '.embed__stream .comment .talk-plugin-flags-container .talk-plugin-flags-button' }, flagPopUp: { - selector: '.embed__stream .comment .coral-plugin-flags-popup' + selector: '.embed__stream .comment .talk-plugin-flags-popup' }, flagCommentOption: { - selector: '.embed__stream .comment .coral-plugin-flags-popup .coral-plugin-flags-popup-radio-label[for="COMMENTS"]' + selector: '.embed__stream .comment .talk-plugin-flags-popup .talk-plugin-flags-popup-radio-label[for="COMMENTS"]' }, flagUsernameOption: { - selector: '.embed__stream .comment .coral-plugin-flags-popup .coral-plugin-flags-popup-radio-label[for="USERS"]' + selector: '.embed__stream .comment .talk-plugin-flags-popup .talk-plugin-flags-popup-radio-label[for="USERS"]' }, flagOtherOption: { - selector: '.embed__stream .comment .coral-plugin-flags-popup .coral-plugin-flags-popup-radio-label[for="other"]' + selector: '.embed__stream .comment .talk-plugin-flags-popup .talk-plugin-flags-popup-radio-label[for="other"]' }, flagHeaderMessage: { - selector: '.embed__stream .comment .coral-plugin-flags-popup .coral-plugin-flags-popup-header' + selector: '.embed__stream .comment .talk-plugin-flags-popup .talk-plugin-flags-popup-header' }, flagButtonText: { - selector: '.embed__stream .comment .coral-plugin-flags-button-text' + selector: '.embed__stream .comment .talk-plugin-flags-button-text' }, flagDoneButton: { - selector: '.embed__stream .comment .coral-plugin-flags-popup .coral-plugin-flags-popup-button' + selector: '.embed__stream .comment .talk-plugin-flags-popup .talk-plugin-flags-popup-button' }, permalinkButton: { - selector: '.embed__stream .comment .coral-plugin-permalinks-button' + selector: '.embed__stream .comment .talk-plugin-permalinks-button' }, permalinkPopUp: { - selector: '.embed__stream .comment .coral-plugin-permalinks-popover.active' + selector: '.embed__stream .comment .talk-plugin-permalinks-popover.active' }, permalinkInput: { - selector: '.embed__stream .comment .coral-plugin-permalinks-popover.active input' + selector: '.embed__stream .comment .talk-plugin-permalinks-popover.active input' }, registerButton: { selector: '#signInDialog #coralRegister' diff --git a/test/e2e/tests/EmbedStreamTests.js b/test/e2e/tests/EmbedStreamTests.js index ed1bc9c6f..0db0ad4d7 100644 --- a/test/e2e/tests/EmbedStreamTests.js +++ b/test/e2e/tests/EmbedStreamTests.js @@ -43,15 +43,15 @@ module.exports = { .click('#coralSignUpButton') .waitForElementVisible('#coralLogInButton', 10000) .click('#coralLogInButton') - .waitForElementVisible('.coral-plugin-commentbox-button', 4000) + .waitForElementVisible('.talk-plugin-commentbox-button', 4000) // Post a comment - .setValue('.coral-plugin-commentbox-textarea', mockComment) - .click('.coral-plugin-commentbox-button') - .waitForElementVisible('.embed__stream .coral-plugin-commentcontent-text', 1000) + .setValue('.talk-plugin-commentbox-textarea', mockComment) + .click('.talk-plugin-commentbox-button') + .waitForElementVisible('.embed__stream .talk-plugin-commentcontent-text', 1000) // Verify that it appears - .assert.containsText('.embed__stream .coral-plugin-commentcontent-text', mockComment); + .assert.containsText('.embed__stream .talk-plugin-commentcontent-text', mockComment); done(); }) .catch((err) => { @@ -70,9 +70,9 @@ module.exports = { .frame('coralStreamEmbed_iframe'); // Post a comment - client.waitForElementVisible('.coral-plugin-commentbox-button', 2000) - .setValue('.coral-plugin-commentbox-textarea', mockComment) - .click('.coral-plugin-commentbox-button'); + client.waitForElementVisible('.talk-plugin-commentbox-button', 2000) + .setValue('.talk-plugin-commentbox-textarea', mockComment) + .click('.talk-plugin-commentbox-button'); done(); }) .catch((err) => { @@ -92,17 +92,17 @@ module.exports = { .frame('coralStreamEmbed_iframe'); // Post a comment - client.waitForElementVisible('.coral-plugin-commentbox-button', 2000) - .setValue('.coral-plugin-commentbox-textarea', mockComment) - .click('.coral-plugin-commentbox-button') + client.waitForElementVisible('.talk-plugin-commentbox-button', 2000) + .setValue('.talk-plugin-commentbox-textarea', mockComment) + .click('.talk-plugin-commentbox-button') // Post a reply - .waitForElementVisible('.embed__stream .coral-plugin-replies-reply-button', 5000) - .click('.embed__stream .coral-plugin-replies-reply-button') + .waitForElementVisible('.embed__stream .talk-plugin-replies-reply-button', 5000) + .click('.embed__stream .talk-plugin-replies-reply-button') .waitForElementVisible('#replyText') .setValue('#replyText', mockReply) - .click('.embed__stream .coral-plugin-replies-textarea .coral-plugin-commentbox-button') + .click('.embed__stream .talk-plugin-replies-textarea .talk-plugin-commentbox-button') .waitForElementVisible('.embed__stream .reply', 20000) // Verify that it appears @@ -143,11 +143,11 @@ module.exports = { // .frame('coralStreamEmbed_iframe'); // // // Post a reply - // client.waitForElementVisible('.coral-plugin-replies-reply-button', 5000) - // .click('.coral-plugin-replies-reply-button') + // client.waitForElementVisible('.talk-plugin-replies-reply-button', 5000) + // .click('.talk-plugin-replies-reply-button') // .waitForElementVisible('#replyText') // .setValue('#replyText', mockReply) - // .click('.coral-plugin-replies-textarea button') + // .click('.talk-plugin-replies-textarea button') // .waitForElementVisible('#coral-notif', 1000) // // // Verify that it appears @@ -166,8 +166,8 @@ module.exports = { .frame('coralStreamEmbed_iframe'); // Verify that comment count is correct - client.waitForElementVisible('.coral-plugin-comment-count-text', 2000) - .assert.containsText('.coral-plugin-comment-count-text', '5 Comments'); + client.waitForElementVisible('.talk-plugin-comment-count-text', 2000) + .assert.containsText('.talk-plugin-comment-count-text', '5 Comments'); done(); }); }, diff --git a/views/article.ejs b/views/article.ejs index d803b6295..73e4fc86b 100644 --- a/views/article.ejs +++ b/views/article.ejs @@ -34,7 +34,7 @@ /** * You can disable rendering slot components of a plugin by doing: * - * 'coral-plugin-love': { + * 'talk-plugin-love': { * disable_components: true, * }, */ From 6ec33a0225a99992a1383d28e1dbe6d4e44ddb26 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 20 Jul 2017 11:52:36 -0300 Subject: [PATCH 02/14] Plugins renaming --- .../AuthorName.js | 0 .../styles.css | 0 .../CommentBox.js | 0 .../CommentForm.js | 0 .../__tests__/commentBox.spec.js | 0 .../actions.js | 0 .../constants.js | 0 .../index.js | 0 .../reducer.js | 0 .../styles.css | 0 .../components/FlagButton.js | 0 .../components/FlagComment.js | 0 .../components/styles.css | 0 .../helpers/flagReasons.js | 0 .../index.js | 0 .../Comment.css | 0 .../Comment.js | 0 .../CommentHistory.css | 0 .../CommentHistory.js | 0 .../InfoBox.js | 0 .../Markdown.js | 0 .../__tests__/infoBox.spec.js | 0 .../__tests__/markdown.spec.js | 0 .../ModerationLink.js | 0 .../index.js | 0 .../styles.css | 0 .../PubDate.js | 0 .../QuestionBox.js | 0 .../ReplyBox.js | 0 .../ReplyButton.css | 0 .../ReplyButton.js | 0 .../index.js | 0 .../TagLabel.js | 0 .../client/components/CommentContent.js | 24 ---- .../client/index.js | 7 -- .../coral-plugin-comment-content/package.json | 14 --- .../coral-plugin-comment-content/yarn.lock | 112 ------------------ plugins/coral-plugin-facebook-auth/README.md | 24 ---- plugins/coral-plugin-facebook-auth/index.js | 7 -- .../coral-plugin-facebook-auth/package.json | 9 -- .../server/passport.js | 27 ----- .../server/router.js | 20 ---- plugins/coral-plugin-facebook-auth/yarn.lock | 34 ------ .../coral-plugin-mod/client/components/Box.js | 9 -- .../client/components/Container.js | 32 ----- .../client/components/styles.css | 8 -- plugins/coral-plugin-mod/client/index.js | 7 -- plugins/coral-plugin-mod/index.js | 2 - plugins/coral-plugin-respect/client/.babelrc | 14 --- .../client/.eslintrc.json | 23 ---- .../client/.babelrc | 14 --- .../client/.eslintrc.json | 23 ---- plugins/coral-plugin-viewing-options/index.js | 1 - .../client/.babelrc | 0 .../client/.eslintrc.json | 0 .../client/components/ChangeUsername.js | 0 .../client/components/CreateUsernameDialog.js | 0 .../client/components/FakeComment.js | 0 .../client/components/ForgotContent.js | 0 .../client/components/SignDialog.js | 0 .../client/components/SignInButton.js | 0 .../client/components/SignInContainer.js | 0 .../client/components/SignInContent.js | 0 .../client/components/SignUpContent.js | 0 .../client/components/UserBox.js | 0 .../client/components/styles.css | 0 .../client/index.js | 0 .../client/translations.yml | 0 .../index.js | 0 .../client/.babelrc | 0 .../client/.eslintrc.json | 0 .../client/LikeButton.js | 0 .../client/index.js | 0 .../client/styles.css | 0 .../client/translations.yml | 0 .../index.js | 0 .../client/.babelrc | 0 .../client/.eslintrc.json | 0 .../client/LoveButton.js | 0 .../client/index.js | 0 .../client/styles.css | 0 .../client/translations.yml | 0 .../index.js | 0 .../client/.babelrc | 0 .../client/.eslintrc.json | 0 .../client/actions.js | 0 .../client/components/OffTopicCheckbox.js | 0 .../client/components/OffTopicFilter.js | 0 .../client/components/OffTopicTag.js | 0 .../client/components/styles.css | 0 .../client/constants.js | 0 .../client/containers/OffTopicCheckbox.js | 0 .../client/containers/OffTopicFilter.js | 0 .../client/index.js | 0 .../client/reducer.js | 0 .../client/translations.json | 0 .../index.js | 0 .../client/.babelrc | 0 .../client/.eslintrc.json | 0 .../client/Icon.js | 0 .../client/RespectButton.js | 0 .../client/index.js | 0 .../client/styles.css | 0 .../client/translations.yml | 0 .../index.js | 0 .../client/.babelrc | 0 .../client/.eslintrc.json | 0 .../client/actions.js | 0 .../client/components/ViewingOptions.css | 0 .../client/components/ViewingOptions.js | 0 .../client/constants.js | 0 .../client/containers/ViewingOptions.js | 0 .../client/index.js | 0 .../client/reducer.js | 0 .../index.js | 0 115 files changed, 411 deletions(-) rename client/{coral-plugin-author-name => talk-plugin-author-name}/AuthorName.js (100%) rename client/{coral-plugin-author-name => talk-plugin-author-name}/styles.css (100%) rename client/{coral-plugin-commentbox => talk-plugin-commentbox}/CommentBox.js (100%) rename client/{coral-plugin-commentbox => talk-plugin-commentbox}/CommentForm.js (100%) rename client/{coral-plugin-commentbox => talk-plugin-commentbox}/__tests__/commentBox.spec.js (100%) rename client/{coral-plugin-commentbox => talk-plugin-commentbox}/actions.js (100%) rename client/{coral-plugin-commentbox => talk-plugin-commentbox}/constants.js (100%) rename client/{coral-plugin-commentbox => talk-plugin-commentbox}/index.js (100%) rename client/{coral-plugin-commentbox => talk-plugin-commentbox}/reducer.js (100%) rename client/{coral-plugin-commentbox => talk-plugin-commentbox}/styles.css (100%) rename client/{coral-plugin-flags => talk-plugin-flags}/components/FlagButton.js (100%) rename client/{coral-plugin-flags => talk-plugin-flags}/components/FlagComment.js (100%) rename client/{coral-plugin-flags => talk-plugin-flags}/components/styles.css (100%) rename client/{coral-plugin-flags => talk-plugin-flags}/helpers/flagReasons.js (100%) rename client/{coral-plugin-flags => talk-plugin-flags}/index.js (100%) rename client/{coral-plugin-history => talk-plugin-history}/Comment.css (100%) rename client/{coral-plugin-history => talk-plugin-history}/Comment.js (100%) rename client/{coral-plugin-history => talk-plugin-history}/CommentHistory.css (100%) rename client/{coral-plugin-history => talk-plugin-history}/CommentHistory.js (100%) rename client/{coral-plugin-infobox => talk-plugin-infobox}/InfoBox.js (100%) rename client/{coral-plugin-infobox => talk-plugin-infobox}/Markdown.js (100%) rename client/{coral-plugin-infobox => talk-plugin-infobox}/__tests__/infoBox.spec.js (100%) rename client/{coral-plugin-infobox => talk-plugin-infobox}/__tests__/markdown.spec.js (100%) rename client/{coral-plugin-moderation => talk-plugin-moderation}/ModerationLink.js (100%) rename client/{coral-plugin-moderation => talk-plugin-moderation}/index.js (100%) rename client/{coral-plugin-moderation => talk-plugin-moderation}/styles.css (100%) rename client/{coral-plugin-pubdate => talk-plugin-pubdate}/PubDate.js (100%) rename client/{coral-plugin-questionbox => talk-plugin-questionbox}/QuestionBox.js (100%) rename client/{coral-plugin-replies => talk-plugin-replies}/ReplyBox.js (100%) rename client/{coral-plugin-replies => talk-plugin-replies}/ReplyButton.css (100%) rename client/{coral-plugin-replies => talk-plugin-replies}/ReplyButton.js (100%) rename client/{coral-plugin-replies => talk-plugin-replies}/index.js (100%) rename client/{coral-plugin-tag-label => talk-plugin-tag-label}/TagLabel.js (100%) delete mode 100644 plugins/coral-plugin-comment-content/client/components/CommentContent.js delete mode 100644 plugins/coral-plugin-comment-content/client/index.js delete mode 100644 plugins/coral-plugin-comment-content/package.json delete mode 100644 plugins/coral-plugin-comment-content/yarn.lock delete mode 100644 plugins/coral-plugin-facebook-auth/README.md delete mode 100644 plugins/coral-plugin-facebook-auth/index.js delete mode 100644 plugins/coral-plugin-facebook-auth/package.json delete mode 100644 plugins/coral-plugin-facebook-auth/server/passport.js delete mode 100644 plugins/coral-plugin-facebook-auth/server/router.js delete mode 100644 plugins/coral-plugin-facebook-auth/yarn.lock delete mode 100644 plugins/coral-plugin-mod/client/components/Box.js delete mode 100644 plugins/coral-plugin-mod/client/components/Container.js delete mode 100644 plugins/coral-plugin-mod/client/components/styles.css delete mode 100644 plugins/coral-plugin-mod/client/index.js delete mode 100644 plugins/coral-plugin-mod/index.js delete mode 100644 plugins/coral-plugin-respect/client/.babelrc delete mode 100644 plugins/coral-plugin-respect/client/.eslintrc.json delete mode 100644 plugins/coral-plugin-viewing-options/client/.babelrc delete mode 100644 plugins/coral-plugin-viewing-options/client/.eslintrc.json delete mode 100644 plugins/coral-plugin-viewing-options/index.js rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/.babelrc (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/.eslintrc.json (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/ChangeUsername.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/CreateUsernameDialog.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/FakeComment.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/ForgotContent.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/SignDialog.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/SignInButton.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/SignInContainer.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/SignInContent.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/SignUpContent.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/UserBox.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/components/styles.css (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/index.js (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/client/translations.yml (100%) rename plugins/{coral-plugin-auth => talk-plugin-auth}/index.js (100%) rename plugins/{coral-plugin-comment-content => talk-plugin-like}/client/.babelrc (100%) rename plugins/{coral-plugin-comment-content => talk-plugin-like}/client/.eslintrc.json (100%) rename plugins/{coral-plugin-like => talk-plugin-like}/client/LikeButton.js (100%) rename plugins/{coral-plugin-like => talk-plugin-like}/client/index.js (100%) rename plugins/{coral-plugin-like => talk-plugin-like}/client/styles.css (100%) rename plugins/{coral-plugin-like => talk-plugin-like}/client/translations.yml (100%) rename plugins/{coral-plugin-like => talk-plugin-like}/index.js (100%) rename plugins/{coral-plugin-like => talk-plugin-love}/client/.babelrc (100%) rename plugins/{coral-plugin-like => talk-plugin-love}/client/.eslintrc.json (100%) rename plugins/{coral-plugin-love => talk-plugin-love}/client/LoveButton.js (100%) rename plugins/{coral-plugin-love => talk-plugin-love}/client/index.js (100%) rename plugins/{coral-plugin-love => talk-plugin-love}/client/styles.css (100%) rename plugins/{coral-plugin-love => talk-plugin-love}/client/translations.yml (100%) rename plugins/{coral-plugin-love => talk-plugin-love}/index.js (100%) rename plugins/{coral-plugin-love => talk-plugin-offtopic}/client/.babelrc (100%) rename plugins/{coral-plugin-love => talk-plugin-offtopic}/client/.eslintrc.json (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/actions.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/components/OffTopicCheckbox.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/components/OffTopicFilter.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/components/OffTopicTag.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/components/styles.css (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/constants.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/containers/OffTopicCheckbox.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/containers/OffTopicFilter.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/index.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/reducer.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/client/translations.json (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-offtopic}/index.js (100%) rename plugins/{coral-plugin-mod => talk-plugin-respect}/client/.babelrc (100%) rename plugins/{coral-plugin-mod => talk-plugin-respect}/client/.eslintrc.json (100%) rename plugins/{coral-plugin-respect => talk-plugin-respect}/client/Icon.js (100%) rename plugins/{coral-plugin-respect => talk-plugin-respect}/client/RespectButton.js (100%) rename plugins/{coral-plugin-respect => talk-plugin-respect}/client/index.js (100%) rename plugins/{coral-plugin-respect => talk-plugin-respect}/client/styles.css (100%) rename plugins/{coral-plugin-respect => talk-plugin-respect}/client/translations.yml (100%) rename plugins/{coral-plugin-respect => talk-plugin-respect}/index.js (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-viewing-options}/client/.babelrc (100%) rename plugins/{coral-plugin-offtopic => talk-plugin-viewing-options}/client/.eslintrc.json (100%) rename plugins/{coral-plugin-viewing-options => talk-plugin-viewing-options}/client/actions.js (100%) rename plugins/{coral-plugin-viewing-options => talk-plugin-viewing-options}/client/components/ViewingOptions.css (100%) rename plugins/{coral-plugin-viewing-options => talk-plugin-viewing-options}/client/components/ViewingOptions.js (100%) rename plugins/{coral-plugin-viewing-options => talk-plugin-viewing-options}/client/constants.js (100%) rename plugins/{coral-plugin-viewing-options => talk-plugin-viewing-options}/client/containers/ViewingOptions.js (100%) rename plugins/{coral-plugin-viewing-options => talk-plugin-viewing-options}/client/index.js (100%) rename plugins/{coral-plugin-viewing-options => talk-plugin-viewing-options}/client/reducer.js (100%) rename plugins/{coral-plugin-comment-content => talk-plugin-viewing-options}/index.js (100%) diff --git a/client/coral-plugin-author-name/AuthorName.js b/client/talk-plugin-author-name/AuthorName.js similarity index 100% rename from client/coral-plugin-author-name/AuthorName.js rename to client/talk-plugin-author-name/AuthorName.js diff --git a/client/coral-plugin-author-name/styles.css b/client/talk-plugin-author-name/styles.css similarity index 100% rename from client/coral-plugin-author-name/styles.css rename to client/talk-plugin-author-name/styles.css diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/talk-plugin-commentbox/CommentBox.js similarity index 100% rename from client/coral-plugin-commentbox/CommentBox.js rename to client/talk-plugin-commentbox/CommentBox.js diff --git a/client/coral-plugin-commentbox/CommentForm.js b/client/talk-plugin-commentbox/CommentForm.js similarity index 100% rename from client/coral-plugin-commentbox/CommentForm.js rename to client/talk-plugin-commentbox/CommentForm.js diff --git a/client/coral-plugin-commentbox/__tests__/commentBox.spec.js b/client/talk-plugin-commentbox/__tests__/commentBox.spec.js similarity index 100% rename from client/coral-plugin-commentbox/__tests__/commentBox.spec.js rename to client/talk-plugin-commentbox/__tests__/commentBox.spec.js diff --git a/client/coral-plugin-commentbox/actions.js b/client/talk-plugin-commentbox/actions.js similarity index 100% rename from client/coral-plugin-commentbox/actions.js rename to client/talk-plugin-commentbox/actions.js diff --git a/client/coral-plugin-commentbox/constants.js b/client/talk-plugin-commentbox/constants.js similarity index 100% rename from client/coral-plugin-commentbox/constants.js rename to client/talk-plugin-commentbox/constants.js diff --git a/client/coral-plugin-commentbox/index.js b/client/talk-plugin-commentbox/index.js similarity index 100% rename from client/coral-plugin-commentbox/index.js rename to client/talk-plugin-commentbox/index.js diff --git a/client/coral-plugin-commentbox/reducer.js b/client/talk-plugin-commentbox/reducer.js similarity index 100% rename from client/coral-plugin-commentbox/reducer.js rename to client/talk-plugin-commentbox/reducer.js diff --git a/client/coral-plugin-commentbox/styles.css b/client/talk-plugin-commentbox/styles.css similarity index 100% rename from client/coral-plugin-commentbox/styles.css rename to client/talk-plugin-commentbox/styles.css diff --git a/client/coral-plugin-flags/components/FlagButton.js b/client/talk-plugin-flags/components/FlagButton.js similarity index 100% rename from client/coral-plugin-flags/components/FlagButton.js rename to client/talk-plugin-flags/components/FlagButton.js diff --git a/client/coral-plugin-flags/components/FlagComment.js b/client/talk-plugin-flags/components/FlagComment.js similarity index 100% rename from client/coral-plugin-flags/components/FlagComment.js rename to client/talk-plugin-flags/components/FlagComment.js diff --git a/client/coral-plugin-flags/components/styles.css b/client/talk-plugin-flags/components/styles.css similarity index 100% rename from client/coral-plugin-flags/components/styles.css rename to client/talk-plugin-flags/components/styles.css diff --git a/client/coral-plugin-flags/helpers/flagReasons.js b/client/talk-plugin-flags/helpers/flagReasons.js similarity index 100% rename from client/coral-plugin-flags/helpers/flagReasons.js rename to client/talk-plugin-flags/helpers/flagReasons.js diff --git a/client/coral-plugin-flags/index.js b/client/talk-plugin-flags/index.js similarity index 100% rename from client/coral-plugin-flags/index.js rename to client/talk-plugin-flags/index.js diff --git a/client/coral-plugin-history/Comment.css b/client/talk-plugin-history/Comment.css similarity index 100% rename from client/coral-plugin-history/Comment.css rename to client/talk-plugin-history/Comment.css diff --git a/client/coral-plugin-history/Comment.js b/client/talk-plugin-history/Comment.js similarity index 100% rename from client/coral-plugin-history/Comment.js rename to client/talk-plugin-history/Comment.js diff --git a/client/coral-plugin-history/CommentHistory.css b/client/talk-plugin-history/CommentHistory.css similarity index 100% rename from client/coral-plugin-history/CommentHistory.css rename to client/talk-plugin-history/CommentHistory.css diff --git a/client/coral-plugin-history/CommentHistory.js b/client/talk-plugin-history/CommentHistory.js similarity index 100% rename from client/coral-plugin-history/CommentHistory.js rename to client/talk-plugin-history/CommentHistory.js diff --git a/client/coral-plugin-infobox/InfoBox.js b/client/talk-plugin-infobox/InfoBox.js similarity index 100% rename from client/coral-plugin-infobox/InfoBox.js rename to client/talk-plugin-infobox/InfoBox.js diff --git a/client/coral-plugin-infobox/Markdown.js b/client/talk-plugin-infobox/Markdown.js similarity index 100% rename from client/coral-plugin-infobox/Markdown.js rename to client/talk-plugin-infobox/Markdown.js diff --git a/client/coral-plugin-infobox/__tests__/infoBox.spec.js b/client/talk-plugin-infobox/__tests__/infoBox.spec.js similarity index 100% rename from client/coral-plugin-infobox/__tests__/infoBox.spec.js rename to client/talk-plugin-infobox/__tests__/infoBox.spec.js diff --git a/client/coral-plugin-infobox/__tests__/markdown.spec.js b/client/talk-plugin-infobox/__tests__/markdown.spec.js similarity index 100% rename from client/coral-plugin-infobox/__tests__/markdown.spec.js rename to client/talk-plugin-infobox/__tests__/markdown.spec.js diff --git a/client/coral-plugin-moderation/ModerationLink.js b/client/talk-plugin-moderation/ModerationLink.js similarity index 100% rename from client/coral-plugin-moderation/ModerationLink.js rename to client/talk-plugin-moderation/ModerationLink.js diff --git a/client/coral-plugin-moderation/index.js b/client/talk-plugin-moderation/index.js similarity index 100% rename from client/coral-plugin-moderation/index.js rename to client/talk-plugin-moderation/index.js diff --git a/client/coral-plugin-moderation/styles.css b/client/talk-plugin-moderation/styles.css similarity index 100% rename from client/coral-plugin-moderation/styles.css rename to client/talk-plugin-moderation/styles.css diff --git a/client/coral-plugin-pubdate/PubDate.js b/client/talk-plugin-pubdate/PubDate.js similarity index 100% rename from client/coral-plugin-pubdate/PubDate.js rename to client/talk-plugin-pubdate/PubDate.js diff --git a/client/coral-plugin-questionbox/QuestionBox.js b/client/talk-plugin-questionbox/QuestionBox.js similarity index 100% rename from client/coral-plugin-questionbox/QuestionBox.js rename to client/talk-plugin-questionbox/QuestionBox.js diff --git a/client/coral-plugin-replies/ReplyBox.js b/client/talk-plugin-replies/ReplyBox.js similarity index 100% rename from client/coral-plugin-replies/ReplyBox.js rename to client/talk-plugin-replies/ReplyBox.js diff --git a/client/coral-plugin-replies/ReplyButton.css b/client/talk-plugin-replies/ReplyButton.css similarity index 100% rename from client/coral-plugin-replies/ReplyButton.css rename to client/talk-plugin-replies/ReplyButton.css diff --git a/client/coral-plugin-replies/ReplyButton.js b/client/talk-plugin-replies/ReplyButton.js similarity index 100% rename from client/coral-plugin-replies/ReplyButton.js rename to client/talk-plugin-replies/ReplyButton.js diff --git a/client/coral-plugin-replies/index.js b/client/talk-plugin-replies/index.js similarity index 100% rename from client/coral-plugin-replies/index.js rename to client/talk-plugin-replies/index.js diff --git a/client/coral-plugin-tag-label/TagLabel.js b/client/talk-plugin-tag-label/TagLabel.js similarity index 100% rename from client/coral-plugin-tag-label/TagLabel.js rename to client/talk-plugin-tag-label/TagLabel.js diff --git a/plugins/coral-plugin-comment-content/client/components/CommentContent.js b/plugins/coral-plugin-comment-content/client/components/CommentContent.js deleted file mode 100644 index cc42f1b8d..000000000 --- a/plugins/coral-plugin-comment-content/client/components/CommentContent.js +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import Linkify from 'react-linkify'; - -const name = 'talk-plugin-comment-content'; - -const CommentContent = ({comment}) => { - const textbreaks = comment.body.split('\n'); - return
    - { - textbreaks.map((line, i) => { - return ( - - - {line} - -
    -
    - ); - }) - } -
    ; -}; - -export default CommentContent; diff --git a/plugins/coral-plugin-comment-content/client/index.js b/plugins/coral-plugin-comment-content/client/index.js deleted file mode 100644 index e61cb51f4..000000000 --- a/plugins/coral-plugin-comment-content/client/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import CommentContent from './components/CommentContent'; - -export default { - slots: { - commentContent: [CommentContent] - } -}; diff --git a/plugins/coral-plugin-comment-content/package.json b/plugins/coral-plugin-comment-content/package.json deleted file mode 100644 index 85250143c..000000000 --- a/plugins/coral-plugin-comment-content/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "talk-plugin-comment-content", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "react-linkify": "^0.2.1" - } -} diff --git a/plugins/coral-plugin-comment-content/yarn.lock b/plugins/coral-plugin-comment-content/yarn.lock deleted file mode 100644 index 9f312c11d..000000000 --- a/plugins/coral-plugin-comment-content/yarn.lock +++ /dev/null @@ -1,112 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -asap@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" - -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - dependencies: - iconv-lite "~0.4.13" - -fbjs@^0.8.9: - version "0.8.12" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" - dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.9" - -iconv-lite@~0.4.13: - version "0.4.18" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" - -is-stream@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - -isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - -js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" - -linkify-it@^1.2.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-1.2.4.tgz#0773526c317c8fd13bd534ee1d180ff88abf881a" - dependencies: - uc.micro "^1.0.1" - -loose-envify@^1.0.0, loose-envify@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - dependencies: - js-tokens "^3.0.0" - -node-fetch@^1.0.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5" - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -promise@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" - dependencies: - asap "~2.0.3" - -prop-types@^15.5.8: - version "15.5.10" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" - dependencies: - fbjs "^0.8.9" - loose-envify "^1.3.1" - -react-linkify@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/react-linkify/-/react-linkify-0.2.1.tgz#b28d3f9544539a622fec8d42b4800eb9d23bf981" - dependencies: - linkify-it "^1.2.0" - prop-types "^15.5.8" - tlds "^1.57.0" - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - -tlds@^1.57.0: - version "1.189.0" - resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.189.0.tgz#b8cb46ea76dc2f4a01d45b8d907bf19a66e9f729" - -ua-parser-js@^0.7.9: - version "0.7.12" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb" - -uc.micro@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192" - -whatwg-fetch@>=0.10.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" diff --git a/plugins/coral-plugin-facebook-auth/README.md b/plugins/coral-plugin-facebook-auth/README.md deleted file mode 100644 index 6faceed09..000000000 --- a/plugins/coral-plugin-facebook-auth/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# talk-plugin-facebook-auth - -This plugin provides facebook authentication support for Talk. - -## Configuration - -This plugin looks for the following configuration from the environment: - -- `TALK_FACEBOOK_APP_ID` (*required*) - the Facebook app id for your Facebook -Login enabled app. -- `TALK_FACEBOOK_APP_SECRET` (*required*) - the Facebook app secret for your -Facebook Login enabled app. - -### License - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - - See the License for the specific language governing permissions and limitations under the License. diff --git a/plugins/coral-plugin-facebook-auth/index.js b/plugins/coral-plugin-facebook-auth/index.js deleted file mode 100644 index 3e7c61452..000000000 --- a/plugins/coral-plugin-facebook-auth/index.js +++ /dev/null @@ -1,7 +0,0 @@ -const passport = require('./server/passport'); -const router = require('./server/router'); - -module.exports = { - passport, - router -}; diff --git a/plugins/coral-plugin-facebook-auth/package.json b/plugins/coral-plugin-facebook-auth/package.json deleted file mode 100644 index ea841bc7d..000000000 --- a/plugins/coral-plugin-facebook-auth/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "talk-plugin-facebook-auth", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "dependencies": { - "passport-facebook": "^2.1.1" - } -} diff --git a/plugins/coral-plugin-facebook-auth/server/passport.js b/plugins/coral-plugin-facebook-auth/server/passport.js deleted file mode 100644 index ae69ec4bd..000000000 --- a/plugins/coral-plugin-facebook-auth/server/passport.js +++ /dev/null @@ -1,27 +0,0 @@ -const FacebookStrategy = require('passport-facebook').Strategy; -const UsersService = require('services/users'); -const {ValidateUserLogin} = require('services/passport'); - -module.exports = (passport) => { - if (process.env.TALK_FACEBOOK_APP_ID && process.env.TALK_FACEBOOK_APP_SECRET && process.env.TALK_ROOT_URL) { - passport.use(new FacebookStrategy({ - clientID: process.env.TALK_FACEBOOK_APP_ID, - clientSecret: process.env.TALK_FACEBOOK_APP_SECRET, - callbackURL: `${process.env.TALK_ROOT_URL}/api/v1/auth/facebook/callback`, - passReqToCallback: true, - profileFields: ['id', 'displayName', 'picture.type(large)'] - }, async (req, accessToken, refreshToken, profile, done) => { - - let user; - try { - user = await UsersService.findOrCreateExternalUser(profile); - } catch (err) { - return done(err); - } - - return ValidateUserLogin(profile, user, done); - })); - } else if (process.env.NODE_ENV !== 'test') { - throw new Error('Facebook cannot be enabled, missing one of TALK_FACEBOOK_APP_ID, TALK_FACEBOOK_APP_SECRET, TALK_ROOT_URL'); - } -}; diff --git a/plugins/coral-plugin-facebook-auth/server/router.js b/plugins/coral-plugin-facebook-auth/server/router.js deleted file mode 100644 index 56fcd2ab2..000000000 --- a/plugins/coral-plugin-facebook-auth/server/router.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = (router) => { - - const {passport, HandleAuthPopupCallback} = require('services/passport'); - - /** - * Facebook auth endpoint, this will redirect the user immediatly to facebook - * for authorization. - */ - router.get('/api/v1/auth/facebook', passport.authenticate('facebook', {display: 'popup', authType: 'rerequest', scope: ['public_profile']})); - - /** - * Facebook callback endpoint, this will send the user a html page designed to - * send back the user credentials upon sucesfull login. - */ - router.get('/api/v1/auth/facebook/callback', (req, res, next) => { - - // Perform the facebook login flow and pass the data back through the opener. - passport.authenticate('facebook', {session: false}, HandleAuthPopupCallback(req, res, next))(req, res, next); - }); -}; diff --git a/plugins/coral-plugin-facebook-auth/yarn.lock b/plugins/coral-plugin-facebook-auth/yarn.lock deleted file mode 100644 index a2886dfbe..000000000 --- a/plugins/coral-plugin-facebook-auth/yarn.lock +++ /dev/null @@ -1,34 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -oauth@0.9.x: - version "0.9.15" - resolved "https://registry.yarnpkg.com/oauth/-/oauth-0.9.15.tgz#bd1fefaf686c96b75475aed5196412ff60cfb9c1" - -passport-facebook@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/passport-facebook/-/passport-facebook-2.1.1.tgz#c39d0b52ae4d59163245a4e21a7b9b6321303311" - dependencies: - passport-oauth2 "1.x.x" - -passport-oauth2@1.x.x: - version "1.4.0" - resolved "https://registry.yarnpkg.com/passport-oauth2/-/passport-oauth2-1.4.0.tgz#f62f81583cbe12609be7ce6f160b9395a27b86ad" - dependencies: - oauth "0.9.x" - passport-strategy "1.x.x" - uid2 "0.0.x" - utils-merge "1.x.x" - -passport-strategy@1.x.x: - version "1.0.0" - resolved "https://registry.yarnpkg.com/passport-strategy/-/passport-strategy-1.0.0.tgz#b5539aa8fc225a3d1ad179476ddf236b440f52e4" - -uid2@0.0.x: - version "0.0.3" - resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82" - -utils-merge@1.x.x: - version "1.0.0" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" diff --git a/plugins/coral-plugin-mod/client/components/Box.js b/plugins/coral-plugin-mod/client/components/Box.js deleted file mode 100644 index b072c8917..000000000 --- a/plugins/coral-plugin-mod/client/components/Box.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import styles from './styles.css'; - -export default (props) => ( -
    - Comment Status: {props.comment.status} -
    -); - diff --git a/plugins/coral-plugin-mod/client/components/Container.js b/plugins/coral-plugin-mod/client/components/Container.js deleted file mode 100644 index 9ba88bdde..000000000 --- a/plugins/coral-plugin-mod/client/components/Container.js +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import Box from './Box'; -import {Button} from 'plugin-api/beta/client/components/ui'; -import styles from './styles.css'; - -export default class Footer extends React.Component { - constructor() { - super(); - - this.state = { - show: false - }; - } - - handleClick = () => { - this.setState((state) => ({ - show: !state.show - })); - } - - render() { - const {show} = this.state; - return ( -
    - - {show ? : null} -
    - ); - } -} diff --git a/plugins/coral-plugin-mod/client/components/styles.css b/plugins/coral-plugin-mod/client/components/styles.css deleted file mode 100644 index 59bb63c3d..000000000 --- a/plugins/coral-plugin-mod/client/components/styles.css +++ /dev/null @@ -1,8 +0,0 @@ -.container { - padding: 0 14px 10px; -} - -.box { - font-size: 12px; - padding: 10px 14px; -} \ No newline at end of file diff --git a/plugins/coral-plugin-mod/client/index.js b/plugins/coral-plugin-mod/client/index.js deleted file mode 100644 index b0ea304f4..000000000 --- a/plugins/coral-plugin-mod/client/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import Container from './components/Container'; - -export default { - slots: { - adminCommentDetailArea: [Container], - } -}; diff --git a/plugins/coral-plugin-mod/index.js b/plugins/coral-plugin-mod/index.js deleted file mode 100644 index 85dfb349b..000000000 --- a/plugins/coral-plugin-mod/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = {}; - diff --git a/plugins/coral-plugin-respect/client/.babelrc b/plugins/coral-plugin-respect/client/.babelrc deleted file mode 100644 index 60be246eb..000000000 --- a/plugins/coral-plugin-respect/client/.babelrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "presets": [ - "es2015" - ], - "plugins": [ - "add-module-exports", - "transform-class-properties", - "transform-decorators-legacy", - "transform-object-assign", - "transform-object-rest-spread", - "transform-async-to-generator", - "transform-react-jsx" - ] -} \ No newline at end of file diff --git a/plugins/coral-plugin-respect/client/.eslintrc.json b/plugins/coral-plugin-respect/client/.eslintrc.json deleted file mode 100644 index 9fe56bd14..000000000 --- a/plugins/coral-plugin-respect/client/.eslintrc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true, - "mocha": true - }, - "parserOptions": { - "sourceType": "module", - "ecmaFeatures": { - "experimentalObjectRestSpread": true, - "jsx": true - } - }, - "parser": "babel-eslint", - "plugins": [ - "react" - ], - "rules": { - "react/jsx-uses-react": "error", - "react/jsx-uses-vars": "error", - "no-console": ["warn", { "allow": ["warn", "error"] }] - } -} diff --git a/plugins/coral-plugin-viewing-options/client/.babelrc b/plugins/coral-plugin-viewing-options/client/.babelrc deleted file mode 100644 index 60be246eb..000000000 --- a/plugins/coral-plugin-viewing-options/client/.babelrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "presets": [ - "es2015" - ], - "plugins": [ - "add-module-exports", - "transform-class-properties", - "transform-decorators-legacy", - "transform-object-assign", - "transform-object-rest-spread", - "transform-async-to-generator", - "transform-react-jsx" - ] -} \ No newline at end of file diff --git a/plugins/coral-plugin-viewing-options/client/.eslintrc.json b/plugins/coral-plugin-viewing-options/client/.eslintrc.json deleted file mode 100644 index 9fe56bd14..000000000 --- a/plugins/coral-plugin-viewing-options/client/.eslintrc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true, - "mocha": true - }, - "parserOptions": { - "sourceType": "module", - "ecmaFeatures": { - "experimentalObjectRestSpread": true, - "jsx": true - } - }, - "parser": "babel-eslint", - "plugins": [ - "react" - ], - "rules": { - "react/jsx-uses-react": "error", - "react/jsx-uses-vars": "error", - "no-console": ["warn", { "allow": ["warn", "error"] }] - } -} diff --git a/plugins/coral-plugin-viewing-options/index.js b/plugins/coral-plugin-viewing-options/index.js deleted file mode 100644 index f053ebf79..000000000 --- a/plugins/coral-plugin-viewing-options/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {}; diff --git a/plugins/coral-plugin-auth/client/.babelrc b/plugins/talk-plugin-auth/client/.babelrc similarity index 100% rename from plugins/coral-plugin-auth/client/.babelrc rename to plugins/talk-plugin-auth/client/.babelrc diff --git a/plugins/coral-plugin-auth/client/.eslintrc.json b/plugins/talk-plugin-auth/client/.eslintrc.json similarity index 100% rename from plugins/coral-plugin-auth/client/.eslintrc.json rename to plugins/talk-plugin-auth/client/.eslintrc.json diff --git a/plugins/coral-plugin-auth/client/components/ChangeUsername.js b/plugins/talk-plugin-auth/client/components/ChangeUsername.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/ChangeUsername.js rename to plugins/talk-plugin-auth/client/components/ChangeUsername.js diff --git a/plugins/coral-plugin-auth/client/components/CreateUsernameDialog.js b/plugins/talk-plugin-auth/client/components/CreateUsernameDialog.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/CreateUsernameDialog.js rename to plugins/talk-plugin-auth/client/components/CreateUsernameDialog.js diff --git a/plugins/coral-plugin-auth/client/components/FakeComment.js b/plugins/talk-plugin-auth/client/components/FakeComment.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/FakeComment.js rename to plugins/talk-plugin-auth/client/components/FakeComment.js diff --git a/plugins/coral-plugin-auth/client/components/ForgotContent.js b/plugins/talk-plugin-auth/client/components/ForgotContent.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/ForgotContent.js rename to plugins/talk-plugin-auth/client/components/ForgotContent.js diff --git a/plugins/coral-plugin-auth/client/components/SignDialog.js b/plugins/talk-plugin-auth/client/components/SignDialog.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/SignDialog.js rename to plugins/talk-plugin-auth/client/components/SignDialog.js diff --git a/plugins/coral-plugin-auth/client/components/SignInButton.js b/plugins/talk-plugin-auth/client/components/SignInButton.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/SignInButton.js rename to plugins/talk-plugin-auth/client/components/SignInButton.js diff --git a/plugins/coral-plugin-auth/client/components/SignInContainer.js b/plugins/talk-plugin-auth/client/components/SignInContainer.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/SignInContainer.js rename to plugins/talk-plugin-auth/client/components/SignInContainer.js diff --git a/plugins/coral-plugin-auth/client/components/SignInContent.js b/plugins/talk-plugin-auth/client/components/SignInContent.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/SignInContent.js rename to plugins/talk-plugin-auth/client/components/SignInContent.js diff --git a/plugins/coral-plugin-auth/client/components/SignUpContent.js b/plugins/talk-plugin-auth/client/components/SignUpContent.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/SignUpContent.js rename to plugins/talk-plugin-auth/client/components/SignUpContent.js diff --git a/plugins/coral-plugin-auth/client/components/UserBox.js b/plugins/talk-plugin-auth/client/components/UserBox.js similarity index 100% rename from plugins/coral-plugin-auth/client/components/UserBox.js rename to plugins/talk-plugin-auth/client/components/UserBox.js diff --git a/plugins/coral-plugin-auth/client/components/styles.css b/plugins/talk-plugin-auth/client/components/styles.css similarity index 100% rename from plugins/coral-plugin-auth/client/components/styles.css rename to plugins/talk-plugin-auth/client/components/styles.css diff --git a/plugins/coral-plugin-auth/client/index.js b/plugins/talk-plugin-auth/client/index.js similarity index 100% rename from plugins/coral-plugin-auth/client/index.js rename to plugins/talk-plugin-auth/client/index.js diff --git a/plugins/coral-plugin-auth/client/translations.yml b/plugins/talk-plugin-auth/client/translations.yml similarity index 100% rename from plugins/coral-plugin-auth/client/translations.yml rename to plugins/talk-plugin-auth/client/translations.yml diff --git a/plugins/coral-plugin-auth/index.js b/plugins/talk-plugin-auth/index.js similarity index 100% rename from plugins/coral-plugin-auth/index.js rename to plugins/talk-plugin-auth/index.js diff --git a/plugins/coral-plugin-comment-content/client/.babelrc b/plugins/talk-plugin-like/client/.babelrc similarity index 100% rename from plugins/coral-plugin-comment-content/client/.babelrc rename to plugins/talk-plugin-like/client/.babelrc diff --git a/plugins/coral-plugin-comment-content/client/.eslintrc.json b/plugins/talk-plugin-like/client/.eslintrc.json similarity index 100% rename from plugins/coral-plugin-comment-content/client/.eslintrc.json rename to plugins/talk-plugin-like/client/.eslintrc.json diff --git a/plugins/coral-plugin-like/client/LikeButton.js b/plugins/talk-plugin-like/client/LikeButton.js similarity index 100% rename from plugins/coral-plugin-like/client/LikeButton.js rename to plugins/talk-plugin-like/client/LikeButton.js diff --git a/plugins/coral-plugin-like/client/index.js b/plugins/talk-plugin-like/client/index.js similarity index 100% rename from plugins/coral-plugin-like/client/index.js rename to plugins/talk-plugin-like/client/index.js diff --git a/plugins/coral-plugin-like/client/styles.css b/plugins/talk-plugin-like/client/styles.css similarity index 100% rename from plugins/coral-plugin-like/client/styles.css rename to plugins/talk-plugin-like/client/styles.css diff --git a/plugins/coral-plugin-like/client/translations.yml b/plugins/talk-plugin-like/client/translations.yml similarity index 100% rename from plugins/coral-plugin-like/client/translations.yml rename to plugins/talk-plugin-like/client/translations.yml diff --git a/plugins/coral-plugin-like/index.js b/plugins/talk-plugin-like/index.js similarity index 100% rename from plugins/coral-plugin-like/index.js rename to plugins/talk-plugin-like/index.js diff --git a/plugins/coral-plugin-like/client/.babelrc b/plugins/talk-plugin-love/client/.babelrc similarity index 100% rename from plugins/coral-plugin-like/client/.babelrc rename to plugins/talk-plugin-love/client/.babelrc diff --git a/plugins/coral-plugin-like/client/.eslintrc.json b/plugins/talk-plugin-love/client/.eslintrc.json similarity index 100% rename from plugins/coral-plugin-like/client/.eslintrc.json rename to plugins/talk-plugin-love/client/.eslintrc.json diff --git a/plugins/coral-plugin-love/client/LoveButton.js b/plugins/talk-plugin-love/client/LoveButton.js similarity index 100% rename from plugins/coral-plugin-love/client/LoveButton.js rename to plugins/talk-plugin-love/client/LoveButton.js diff --git a/plugins/coral-plugin-love/client/index.js b/plugins/talk-plugin-love/client/index.js similarity index 100% rename from plugins/coral-plugin-love/client/index.js rename to plugins/talk-plugin-love/client/index.js diff --git a/plugins/coral-plugin-love/client/styles.css b/plugins/talk-plugin-love/client/styles.css similarity index 100% rename from plugins/coral-plugin-love/client/styles.css rename to plugins/talk-plugin-love/client/styles.css diff --git a/plugins/coral-plugin-love/client/translations.yml b/plugins/talk-plugin-love/client/translations.yml similarity index 100% rename from plugins/coral-plugin-love/client/translations.yml rename to plugins/talk-plugin-love/client/translations.yml diff --git a/plugins/coral-plugin-love/index.js b/plugins/talk-plugin-love/index.js similarity index 100% rename from plugins/coral-plugin-love/index.js rename to plugins/talk-plugin-love/index.js diff --git a/plugins/coral-plugin-love/client/.babelrc b/plugins/talk-plugin-offtopic/client/.babelrc similarity index 100% rename from plugins/coral-plugin-love/client/.babelrc rename to plugins/talk-plugin-offtopic/client/.babelrc diff --git a/plugins/coral-plugin-love/client/.eslintrc.json b/plugins/talk-plugin-offtopic/client/.eslintrc.json similarity index 100% rename from plugins/coral-plugin-love/client/.eslintrc.json rename to plugins/talk-plugin-offtopic/client/.eslintrc.json diff --git a/plugins/coral-plugin-offtopic/client/actions.js b/plugins/talk-plugin-offtopic/client/actions.js similarity index 100% rename from plugins/coral-plugin-offtopic/client/actions.js rename to plugins/talk-plugin-offtopic/client/actions.js diff --git a/plugins/coral-plugin-offtopic/client/components/OffTopicCheckbox.js b/plugins/talk-plugin-offtopic/client/components/OffTopicCheckbox.js similarity index 100% rename from plugins/coral-plugin-offtopic/client/components/OffTopicCheckbox.js rename to plugins/talk-plugin-offtopic/client/components/OffTopicCheckbox.js diff --git a/plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js b/plugins/talk-plugin-offtopic/client/components/OffTopicFilter.js similarity index 100% rename from plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js rename to plugins/talk-plugin-offtopic/client/components/OffTopicFilter.js diff --git a/plugins/coral-plugin-offtopic/client/components/OffTopicTag.js b/plugins/talk-plugin-offtopic/client/components/OffTopicTag.js similarity index 100% rename from plugins/coral-plugin-offtopic/client/components/OffTopicTag.js rename to plugins/talk-plugin-offtopic/client/components/OffTopicTag.js diff --git a/plugins/coral-plugin-offtopic/client/components/styles.css b/plugins/talk-plugin-offtopic/client/components/styles.css similarity index 100% rename from plugins/coral-plugin-offtopic/client/components/styles.css rename to plugins/talk-plugin-offtopic/client/components/styles.css diff --git a/plugins/coral-plugin-offtopic/client/constants.js b/plugins/talk-plugin-offtopic/client/constants.js similarity index 100% rename from plugins/coral-plugin-offtopic/client/constants.js rename to plugins/talk-plugin-offtopic/client/constants.js diff --git a/plugins/coral-plugin-offtopic/client/containers/OffTopicCheckbox.js b/plugins/talk-plugin-offtopic/client/containers/OffTopicCheckbox.js similarity index 100% rename from plugins/coral-plugin-offtopic/client/containers/OffTopicCheckbox.js rename to plugins/talk-plugin-offtopic/client/containers/OffTopicCheckbox.js diff --git a/plugins/coral-plugin-offtopic/client/containers/OffTopicFilter.js b/plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js similarity index 100% rename from plugins/coral-plugin-offtopic/client/containers/OffTopicFilter.js rename to plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js diff --git a/plugins/coral-plugin-offtopic/client/index.js b/plugins/talk-plugin-offtopic/client/index.js similarity index 100% rename from plugins/coral-plugin-offtopic/client/index.js rename to plugins/talk-plugin-offtopic/client/index.js diff --git a/plugins/coral-plugin-offtopic/client/reducer.js b/plugins/talk-plugin-offtopic/client/reducer.js similarity index 100% rename from plugins/coral-plugin-offtopic/client/reducer.js rename to plugins/talk-plugin-offtopic/client/reducer.js diff --git a/plugins/coral-plugin-offtopic/client/translations.json b/plugins/talk-plugin-offtopic/client/translations.json similarity index 100% rename from plugins/coral-plugin-offtopic/client/translations.json rename to plugins/talk-plugin-offtopic/client/translations.json diff --git a/plugins/coral-plugin-offtopic/index.js b/plugins/talk-plugin-offtopic/index.js similarity index 100% rename from plugins/coral-plugin-offtopic/index.js rename to plugins/talk-plugin-offtopic/index.js diff --git a/plugins/coral-plugin-mod/client/.babelrc b/plugins/talk-plugin-respect/client/.babelrc similarity index 100% rename from plugins/coral-plugin-mod/client/.babelrc rename to plugins/talk-plugin-respect/client/.babelrc diff --git a/plugins/coral-plugin-mod/client/.eslintrc.json b/plugins/talk-plugin-respect/client/.eslintrc.json similarity index 100% rename from plugins/coral-plugin-mod/client/.eslintrc.json rename to plugins/talk-plugin-respect/client/.eslintrc.json diff --git a/plugins/coral-plugin-respect/client/Icon.js b/plugins/talk-plugin-respect/client/Icon.js similarity index 100% rename from plugins/coral-plugin-respect/client/Icon.js rename to plugins/talk-plugin-respect/client/Icon.js diff --git a/plugins/coral-plugin-respect/client/RespectButton.js b/plugins/talk-plugin-respect/client/RespectButton.js similarity index 100% rename from plugins/coral-plugin-respect/client/RespectButton.js rename to plugins/talk-plugin-respect/client/RespectButton.js diff --git a/plugins/coral-plugin-respect/client/index.js b/plugins/talk-plugin-respect/client/index.js similarity index 100% rename from plugins/coral-plugin-respect/client/index.js rename to plugins/talk-plugin-respect/client/index.js diff --git a/plugins/coral-plugin-respect/client/styles.css b/plugins/talk-plugin-respect/client/styles.css similarity index 100% rename from plugins/coral-plugin-respect/client/styles.css rename to plugins/talk-plugin-respect/client/styles.css diff --git a/plugins/coral-plugin-respect/client/translations.yml b/plugins/talk-plugin-respect/client/translations.yml similarity index 100% rename from plugins/coral-plugin-respect/client/translations.yml rename to plugins/talk-plugin-respect/client/translations.yml diff --git a/plugins/coral-plugin-respect/index.js b/plugins/talk-plugin-respect/index.js similarity index 100% rename from plugins/coral-plugin-respect/index.js rename to plugins/talk-plugin-respect/index.js diff --git a/plugins/coral-plugin-offtopic/client/.babelrc b/plugins/talk-plugin-viewing-options/client/.babelrc similarity index 100% rename from plugins/coral-plugin-offtopic/client/.babelrc rename to plugins/talk-plugin-viewing-options/client/.babelrc diff --git a/plugins/coral-plugin-offtopic/client/.eslintrc.json b/plugins/talk-plugin-viewing-options/client/.eslintrc.json similarity index 100% rename from plugins/coral-plugin-offtopic/client/.eslintrc.json rename to plugins/talk-plugin-viewing-options/client/.eslintrc.json diff --git a/plugins/coral-plugin-viewing-options/client/actions.js b/plugins/talk-plugin-viewing-options/client/actions.js similarity index 100% rename from plugins/coral-plugin-viewing-options/client/actions.js rename to plugins/talk-plugin-viewing-options/client/actions.js diff --git a/plugins/coral-plugin-viewing-options/client/components/ViewingOptions.css b/plugins/talk-plugin-viewing-options/client/components/ViewingOptions.css similarity index 100% rename from plugins/coral-plugin-viewing-options/client/components/ViewingOptions.css rename to plugins/talk-plugin-viewing-options/client/components/ViewingOptions.css diff --git a/plugins/coral-plugin-viewing-options/client/components/ViewingOptions.js b/plugins/talk-plugin-viewing-options/client/components/ViewingOptions.js similarity index 100% rename from plugins/coral-plugin-viewing-options/client/components/ViewingOptions.js rename to plugins/talk-plugin-viewing-options/client/components/ViewingOptions.js diff --git a/plugins/coral-plugin-viewing-options/client/constants.js b/plugins/talk-plugin-viewing-options/client/constants.js similarity index 100% rename from plugins/coral-plugin-viewing-options/client/constants.js rename to plugins/talk-plugin-viewing-options/client/constants.js diff --git a/plugins/coral-plugin-viewing-options/client/containers/ViewingOptions.js b/plugins/talk-plugin-viewing-options/client/containers/ViewingOptions.js similarity index 100% rename from plugins/coral-plugin-viewing-options/client/containers/ViewingOptions.js rename to plugins/talk-plugin-viewing-options/client/containers/ViewingOptions.js diff --git a/plugins/coral-plugin-viewing-options/client/index.js b/plugins/talk-plugin-viewing-options/client/index.js similarity index 100% rename from plugins/coral-plugin-viewing-options/client/index.js rename to plugins/talk-plugin-viewing-options/client/index.js diff --git a/plugins/coral-plugin-viewing-options/client/reducer.js b/plugins/talk-plugin-viewing-options/client/reducer.js similarity index 100% rename from plugins/coral-plugin-viewing-options/client/reducer.js rename to plugins/talk-plugin-viewing-options/client/reducer.js diff --git a/plugins/coral-plugin-comment-content/index.js b/plugins/talk-plugin-viewing-options/index.js similarity index 100% rename from plugins/coral-plugin-comment-content/index.js rename to plugins/talk-plugin-viewing-options/index.js From f17b4a318ac038110c924bfd162ea9dafab1fb1f Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 20 Jul 2017 12:04:00 -0300 Subject: [PATCH 03/14] Missing plugins --- .../client/.babelrc | 14 +++ .../client/.eslintrc.json | 23 ++++ .../client/components/CommentContent.js | 24 ++++ .../client/index.js | 7 ++ plugins/talk-plugin-comment-content/index.js | 1 + .../talk-plugin-comment-content/package.json | 14 +++ plugins/talk-plugin-comment-content/yarn.lock | 112 ++++++++++++++++++ plugins/talk-plugin-facebook-auth/README.md | 24 ++++ plugins/talk-plugin-facebook-auth/index.js | 7 ++ .../talk-plugin-facebook-auth/package.json | 9 ++ .../server/passport.js | 27 +++++ .../server/router.js | 20 ++++ plugins/talk-plugin-facebook-auth/yarn.lock | 34 ++++++ 13 files changed, 316 insertions(+) create mode 100644 plugins/talk-plugin-comment-content/client/.babelrc create mode 100644 plugins/talk-plugin-comment-content/client/.eslintrc.json create mode 100644 plugins/talk-plugin-comment-content/client/components/CommentContent.js create mode 100644 plugins/talk-plugin-comment-content/client/index.js create mode 100644 plugins/talk-plugin-comment-content/index.js create mode 100644 plugins/talk-plugin-comment-content/package.json create mode 100644 plugins/talk-plugin-comment-content/yarn.lock create mode 100644 plugins/talk-plugin-facebook-auth/README.md create mode 100644 plugins/talk-plugin-facebook-auth/index.js create mode 100644 plugins/talk-plugin-facebook-auth/package.json create mode 100644 plugins/talk-plugin-facebook-auth/server/passport.js create mode 100644 plugins/talk-plugin-facebook-auth/server/router.js create mode 100644 plugins/talk-plugin-facebook-auth/yarn.lock diff --git a/plugins/talk-plugin-comment-content/client/.babelrc b/plugins/talk-plugin-comment-content/client/.babelrc new file mode 100644 index 000000000..60be246eb --- /dev/null +++ b/plugins/talk-plugin-comment-content/client/.babelrc @@ -0,0 +1,14 @@ +{ + "presets": [ + "es2015" + ], + "plugins": [ + "add-module-exports", + "transform-class-properties", + "transform-decorators-legacy", + "transform-object-assign", + "transform-object-rest-spread", + "transform-async-to-generator", + "transform-react-jsx" + ] +} \ No newline at end of file diff --git a/plugins/talk-plugin-comment-content/client/.eslintrc.json b/plugins/talk-plugin-comment-content/client/.eslintrc.json new file mode 100644 index 000000000..9fe56bd14 --- /dev/null +++ b/plugins/talk-plugin-comment-content/client/.eslintrc.json @@ -0,0 +1,23 @@ +{ + "env": { + "browser": true, + "es6": true, + "mocha": true + }, + "parserOptions": { + "sourceType": "module", + "ecmaFeatures": { + "experimentalObjectRestSpread": true, + "jsx": true + } + }, + "parser": "babel-eslint", + "plugins": [ + "react" + ], + "rules": { + "react/jsx-uses-react": "error", + "react/jsx-uses-vars": "error", + "no-console": ["warn", { "allow": ["warn", "error"] }] + } +} diff --git a/plugins/talk-plugin-comment-content/client/components/CommentContent.js b/plugins/talk-plugin-comment-content/client/components/CommentContent.js new file mode 100644 index 000000000..3708ee42c --- /dev/null +++ b/plugins/talk-plugin-comment-content/client/components/CommentContent.js @@ -0,0 +1,24 @@ +import React from 'react'; +import Linkify from 'react-linkify'; + +const name = 'coral-plugin-comment-content'; + +const CommentContent = ({comment}) => { + const textbreaks = comment.body.split('\n'); + return
    + { + textbreaks.map((line, i) => { + return ( + + + {line} + +
    +
    + ); + }) + } +
    ; +}; + +export default CommentContent; diff --git a/plugins/talk-plugin-comment-content/client/index.js b/plugins/talk-plugin-comment-content/client/index.js new file mode 100644 index 000000000..e61cb51f4 --- /dev/null +++ b/plugins/talk-plugin-comment-content/client/index.js @@ -0,0 +1,7 @@ +import CommentContent from './components/CommentContent'; + +export default { + slots: { + commentContent: [CommentContent] + } +}; diff --git a/plugins/talk-plugin-comment-content/index.js b/plugins/talk-plugin-comment-content/index.js new file mode 100644 index 000000000..f053ebf79 --- /dev/null +++ b/plugins/talk-plugin-comment-content/index.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/plugins/talk-plugin-comment-content/package.json b/plugins/talk-plugin-comment-content/package.json new file mode 100644 index 000000000..ed668425f --- /dev/null +++ b/plugins/talk-plugin-comment-content/package.json @@ -0,0 +1,14 @@ +{ + "name": "coral-plugin-comment-content", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "react-linkify": "^0.2.1" + } +} diff --git a/plugins/talk-plugin-comment-content/yarn.lock b/plugins/talk-plugin-comment-content/yarn.lock new file mode 100644 index 000000000..9f312c11d --- /dev/null +++ b/plugins/talk-plugin-comment-content/yarn.lock @@ -0,0 +1,112 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +asap@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" + +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + dependencies: + iconv-lite "~0.4.13" + +fbjs@^0.8.9: + version "0.8.12" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.9" + +iconv-lite@~0.4.13: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + +is-stream@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +js-tokens@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" + +linkify-it@^1.2.0: + version "1.2.4" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-1.2.4.tgz#0773526c317c8fd13bd534ee1d180ff88abf881a" + dependencies: + uc.micro "^1.0.1" + +loose-envify@^1.0.0, loose-envify@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +node-fetch@^1.0.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +promise@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" + dependencies: + asap "~2.0.3" + +prop-types@^15.5.8: + version "15.5.10" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + +react-linkify@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/react-linkify/-/react-linkify-0.2.1.tgz#b28d3f9544539a622fec8d42b4800eb9d23bf981" + dependencies: + linkify-it "^1.2.0" + prop-types "^15.5.8" + tlds "^1.57.0" + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +tlds@^1.57.0: + version "1.189.0" + resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.189.0.tgz#b8cb46ea76dc2f4a01d45b8d907bf19a66e9f729" + +ua-parser-js@^0.7.9: + version "0.7.12" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb" + +uc.micro@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192" + +whatwg-fetch@>=0.10.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" diff --git a/plugins/talk-plugin-facebook-auth/README.md b/plugins/talk-plugin-facebook-auth/README.md new file mode 100644 index 000000000..3a0f72c2f --- /dev/null +++ b/plugins/talk-plugin-facebook-auth/README.md @@ -0,0 +1,24 @@ +# coral-plugin-facebook-auth + +This plugin provides facebook authentication support for Talk. + +## Configuration + +This plugin looks for the following configuration from the environment: + +- `TALK_FACEBOOK_APP_ID` (*required*) - the Facebook app id for your Facebook +Login enabled app. +- `TALK_FACEBOOK_APP_SECRET` (*required*) - the Facebook app secret for your +Facebook Login enabled app. + +### License + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + + See the License for the specific language governing permissions and limitations under the License. diff --git a/plugins/talk-plugin-facebook-auth/index.js b/plugins/talk-plugin-facebook-auth/index.js new file mode 100644 index 000000000..3e7c61452 --- /dev/null +++ b/plugins/talk-plugin-facebook-auth/index.js @@ -0,0 +1,7 @@ +const passport = require('./server/passport'); +const router = require('./server/router'); + +module.exports = { + passport, + router +}; diff --git a/plugins/talk-plugin-facebook-auth/package.json b/plugins/talk-plugin-facebook-auth/package.json new file mode 100644 index 000000000..ae6721ee9 --- /dev/null +++ b/plugins/talk-plugin-facebook-auth/package.json @@ -0,0 +1,9 @@ +{ + "name": "coral-plugin-facebook-auth", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "dependencies": { + "passport-facebook": "^2.1.1" + } +} diff --git a/plugins/talk-plugin-facebook-auth/server/passport.js b/plugins/talk-plugin-facebook-auth/server/passport.js new file mode 100644 index 000000000..ae69ec4bd --- /dev/null +++ b/plugins/talk-plugin-facebook-auth/server/passport.js @@ -0,0 +1,27 @@ +const FacebookStrategy = require('passport-facebook').Strategy; +const UsersService = require('services/users'); +const {ValidateUserLogin} = require('services/passport'); + +module.exports = (passport) => { + if (process.env.TALK_FACEBOOK_APP_ID && process.env.TALK_FACEBOOK_APP_SECRET && process.env.TALK_ROOT_URL) { + passport.use(new FacebookStrategy({ + clientID: process.env.TALK_FACEBOOK_APP_ID, + clientSecret: process.env.TALK_FACEBOOK_APP_SECRET, + callbackURL: `${process.env.TALK_ROOT_URL}/api/v1/auth/facebook/callback`, + passReqToCallback: true, + profileFields: ['id', 'displayName', 'picture.type(large)'] + }, async (req, accessToken, refreshToken, profile, done) => { + + let user; + try { + user = await UsersService.findOrCreateExternalUser(profile); + } catch (err) { + return done(err); + } + + return ValidateUserLogin(profile, user, done); + })); + } else if (process.env.NODE_ENV !== 'test') { + throw new Error('Facebook cannot be enabled, missing one of TALK_FACEBOOK_APP_ID, TALK_FACEBOOK_APP_SECRET, TALK_ROOT_URL'); + } +}; diff --git a/plugins/talk-plugin-facebook-auth/server/router.js b/plugins/talk-plugin-facebook-auth/server/router.js new file mode 100644 index 000000000..56fcd2ab2 --- /dev/null +++ b/plugins/talk-plugin-facebook-auth/server/router.js @@ -0,0 +1,20 @@ +module.exports = (router) => { + + const {passport, HandleAuthPopupCallback} = require('services/passport'); + + /** + * Facebook auth endpoint, this will redirect the user immediatly to facebook + * for authorization. + */ + router.get('/api/v1/auth/facebook', passport.authenticate('facebook', {display: 'popup', authType: 'rerequest', scope: ['public_profile']})); + + /** + * Facebook callback endpoint, this will send the user a html page designed to + * send back the user credentials upon sucesfull login. + */ + router.get('/api/v1/auth/facebook/callback', (req, res, next) => { + + // Perform the facebook login flow and pass the data back through the opener. + passport.authenticate('facebook', {session: false}, HandleAuthPopupCallback(req, res, next))(req, res, next); + }); +}; diff --git a/plugins/talk-plugin-facebook-auth/yarn.lock b/plugins/talk-plugin-facebook-auth/yarn.lock new file mode 100644 index 000000000..a2886dfbe --- /dev/null +++ b/plugins/talk-plugin-facebook-auth/yarn.lock @@ -0,0 +1,34 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +oauth@0.9.x: + version "0.9.15" + resolved "https://registry.yarnpkg.com/oauth/-/oauth-0.9.15.tgz#bd1fefaf686c96b75475aed5196412ff60cfb9c1" + +passport-facebook@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/passport-facebook/-/passport-facebook-2.1.1.tgz#c39d0b52ae4d59163245a4e21a7b9b6321303311" + dependencies: + passport-oauth2 "1.x.x" + +passport-oauth2@1.x.x: + version "1.4.0" + resolved "https://registry.yarnpkg.com/passport-oauth2/-/passport-oauth2-1.4.0.tgz#f62f81583cbe12609be7ce6f160b9395a27b86ad" + dependencies: + oauth "0.9.x" + passport-strategy "1.x.x" + uid2 "0.0.x" + utils-merge "1.x.x" + +passport-strategy@1.x.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/passport-strategy/-/passport-strategy-1.0.0.tgz#b5539aa8fc225a3d1ad179476ddf236b440f52e4" + +uid2@0.0.x: + version "0.0.3" + resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82" + +utils-merge@1.x.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" From 1e9fb24f878dc1546cb0d9433a57914cd439a180 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 20 Jul 2017 12:12:02 -0300 Subject: [PATCH 04/14] Renaming old reference plugin --- .../client/containers/ViewingOptions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/talk-plugin-viewing-options/client/containers/ViewingOptions.js b/plugins/talk-plugin-viewing-options/client/containers/ViewingOptions.js index cbe1e7fa3..a34ad91f6 100644 --- a/plugins/talk-plugin-viewing-options/client/containers/ViewingOptions.js +++ b/plugins/talk-plugin-viewing-options/client/containers/ViewingOptions.js @@ -3,7 +3,7 @@ import {bindActionCreators} from 'redux'; import ViewingOptions from '../components/ViewingOptions'; import {openViewingOptions, closeViewingOptions} from '../actions'; -const mapStateToProps = ({coralPluginViewingOptions: state}) => ({ +const mapStateToProps = ({talkPluginViewingOptions: state}) => ({ open: state.open }); From c68cca0e5bfec8cc55935a947a8b0a04cd26e1d7 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Mon, 24 Jul 2017 22:45:20 +0700 Subject: [PATCH 05/14] Change some remaining coral-plugin-* strings --- .../client/components/CommentContent.js | 2 +- plugins/talk-plugin-comment-content/package.json | 2 +- plugins/talk-plugin-facebook-auth/README.md | 2 +- plugins/talk-plugin-facebook-auth/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/talk-plugin-comment-content/client/components/CommentContent.js b/plugins/talk-plugin-comment-content/client/components/CommentContent.js index 3708ee42c..cc42f1b8d 100644 --- a/plugins/talk-plugin-comment-content/client/components/CommentContent.js +++ b/plugins/talk-plugin-comment-content/client/components/CommentContent.js @@ -1,7 +1,7 @@ import React from 'react'; import Linkify from 'react-linkify'; -const name = 'coral-plugin-comment-content'; +const name = 'talk-plugin-comment-content'; const CommentContent = ({comment}) => { const textbreaks = comment.body.split('\n'); diff --git a/plugins/talk-plugin-comment-content/package.json b/plugins/talk-plugin-comment-content/package.json index ed668425f..85250143c 100644 --- a/plugins/talk-plugin-comment-content/package.json +++ b/plugins/talk-plugin-comment-content/package.json @@ -1,5 +1,5 @@ { - "name": "coral-plugin-comment-content", + "name": "talk-plugin-comment-content", "version": "1.0.0", "description": "", "main": "index.js", diff --git a/plugins/talk-plugin-facebook-auth/README.md b/plugins/talk-plugin-facebook-auth/README.md index 3a0f72c2f..6faceed09 100644 --- a/plugins/talk-plugin-facebook-auth/README.md +++ b/plugins/talk-plugin-facebook-auth/README.md @@ -1,4 +1,4 @@ -# coral-plugin-facebook-auth +# talk-plugin-facebook-auth This plugin provides facebook authentication support for Talk. diff --git a/plugins/talk-plugin-facebook-auth/package.json b/plugins/talk-plugin-facebook-auth/package.json index ae6721ee9..ea841bc7d 100644 --- a/plugins/talk-plugin-facebook-auth/package.json +++ b/plugins/talk-plugin-facebook-auth/package.json @@ -1,5 +1,5 @@ { - "name": "coral-plugin-facebook-auth", + "name": "talk-plugin-facebook-auth", "version": "1.0.0", "main": "index.js", "license": "MIT", From e7bc3002ef570ca14a7ea067250c92104df446f4 Mon Sep 17 00:00:00 2001 From: Kim Gardner Date: Wed, 26 Jul 2017 21:21:42 -0400 Subject: [PATCH 06/14] Add translations file for viewing options plugin --- plugins/talk-plugin-viewing-options/client/translations.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 plugins/talk-plugin-viewing-options/client/translations.yml diff --git a/plugins/talk-plugin-viewing-options/client/translations.yml b/plugins/talk-plugin-viewing-options/client/translations.yml new file mode 100644 index 000000000..e69de29bb From b482cf0a0f490a9653422858625732b9713234b8 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Thu, 27 Jul 2017 12:03:25 +1000 Subject: [PATCH 07/14] updated styles --- docs/_sass/minimal-mistakes/_masthead.scss | 8 +++---- docs/_sass/minimal-mistakes/_navigation.scss | 8 +++---- docs/_sass/minimal-mistakes/_page.scss | 24 ++++++++++---------- docs/_sass/minimal-mistakes/_sidebar.scss | 4 ++-- docs/_sass/minimal-mistakes/_variables.scss | 4 ++-- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/_sass/minimal-mistakes/_masthead.scss b/docs/_sass/minimal-mistakes/_masthead.scss index 39ebd2c7d..2b24a2950 100755 --- a/docs/_sass/minimal-mistakes/_masthead.scss +++ b/docs/_sass/minimal-mistakes/_masthead.scss @@ -5,10 +5,10 @@ .masthead { position: relative; border-bottom: 1px solid $border-color; - -webkit-animation: intro 0.3s both; - animation: intro 0.3s both; - -webkit-animation-delay: 0.15s; - animation-delay: 0.15s; + // -webkit-animation: intro 0.3s both; + // animation: intro 0.3s both; + // -webkit-animation-delay: 0.15s; + // animation-delay: 0.15s; z-index: 20; &__inner-wrap { diff --git a/docs/_sass/minimal-mistakes/_navigation.scss b/docs/_sass/minimal-mistakes/_navigation.scss index 4c1748f97..c1b081891 100755 --- a/docs/_sass/minimal-mistakes/_navigation.scss +++ b/docs/_sass/minimal-mistakes/_navigation.scss @@ -14,10 +14,10 @@ padding-left: 2em; padding-right: 2em; font-family: $sans-serif; - -webkit-animation: intro 0.3s both; - animation: intro 0.3s both; - -webkit-animation-delay: 0.30s; - animation-delay: 0.30s; + // -webkit-animation: intro 0.3s both; + // animation: intro 0.3s both; + // -webkit-animation-delay: 0.30s; + // animation-delay: 0.30s; @include breakpoint($large) { padding-left: 1em; diff --git a/docs/_sass/minimal-mistakes/_page.scss b/docs/_sass/minimal-mistakes/_page.scss index 6b77b3262..bb185f02d 100755 --- a/docs/_sass/minimal-mistakes/_page.scss +++ b/docs/_sass/minimal-mistakes/_page.scss @@ -8,10 +8,10 @@ margin-top: 2em; padding-left: 1em; padding-right: 1em; - -webkit-animation: intro 0.3s both; - animation: intro 0.3s both; - -webkit-animation-delay: 0.35s; - animation-delay: 0.35s; + // -webkit-animation: intro 0.3s both; + // animation: intro 0.3s both; + // -webkit-animation-delay: 0.35s; + // animation-delay: 0.35s; @include breakpoint($x-large) { max-width: $x-large; @@ -113,10 +113,10 @@ position: relative; margin-bottom: 2em; @include clearfix; - -webkit-animation: intro 0.3s both; - animation: intro 0.3s both; - -webkit-animation-delay: 0.25s; - animation-delay: 0.25s; + // -webkit-animation: intro 0.3s both; + // animation: intro 0.3s both; + // -webkit-animation-delay: 0.25s; + // animation-delay: 0.25s; &--overlay { position: relative; @@ -126,10 +126,10 @@ background-size: cover; background-repeat: no-repeat; background-position: center; - -webkit-animation: intro 0.3s both; - animation: intro 0.3s both; - -webkit-animation-delay: 0.25s; - animation-delay: 0.25s; + // -webkit-animation: intro 0.3s both; + // animation: intro 0.3s both; + // -webkit-animation-delay: 0.25s; + // animation-delay: 0.25s; a { color: #fff; diff --git a/docs/_sass/minimal-mistakes/_sidebar.scss b/docs/_sass/minimal-mistakes/_sidebar.scss index 1470aa80f..2100e13e5 100755 --- a/docs/_sass/minimal-mistakes/_sidebar.scss +++ b/docs/_sass/minimal-mistakes/_sidebar.scss @@ -16,8 +16,8 @@ @include breakpoint($large) { @include span(2 of 12); opacity: 0.75; - -webkit-transition: opacity 0.2s ease-in-out; - transition: opacity 0.2s ease-in-out; + // -webkit-transition: opacity 0.2s ease-in-out; + // transition: opacity 0.2s ease-in-out; &:hover { opacity: 1; diff --git a/docs/_sass/minimal-mistakes/_variables.scss b/docs/_sass/minimal-mistakes/_variables.scss index 2b59066c2..a485b5579 100755 --- a/docs/_sass/minimal-mistakes/_variables.scss +++ b/docs/_sass/minimal-mistakes/_variables.scss @@ -91,7 +91,7 @@ $xing-color : #006567 !default; /* links */ -$link-color : $info-color !default; +$link-color : #f67150 !default; $link-color-hover : mix(#000, $link-color, 25%) !default; $link-color-visited : mix(#fff, $link-color, 25%) !default; $masthead-link-color : $primary-color !default; @@ -126,4 +126,4 @@ $border-radius : 4px !default; $box-shadow : 0 1px 1px rgba(0, 0, 0, 0.125) !default; $navicon-width : 1.5rem !default; $navicon-height : 0.25rem !default; -$global-transition : all 0.2s ease-in-out !default; +$global-transition : none !default; From a54a240ae61a3fc205dc5fb2a9075cee35b72741 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Thu, 27 Jul 2017 15:14:11 +1000 Subject: [PATCH 08/14] fixed bug with job init --- app.js | 4 +++- graph/subscriptions.js | 4 +++- routes/api/index.js | 11 ---------- secrets.js | 4 ++-- services/kue.js | 47 +++++++++++++++++------------------------- services/mailer.js | 9 +++----- services/pubsub.js | 23 ++++++++++++++------- services/scraper.js | 9 +++----- 8 files changed, 48 insertions(+), 63 deletions(-) diff --git a/app.js b/app.js index a6b669b0e..108ad2e11 100644 --- a/app.js +++ b/app.js @@ -96,12 +96,14 @@ app.use(passport.initialize()); // (if present) the JWT on the request. app.use('/api', authentication); +const pubsubClient = pubsub.createClientFactory(); + // To handle dependancy injection safer, we inject the pubsub handle onto the // request object. app.use('/api', (req, res, next) => { // Attach the pubsub handle to the requests. - req.pubsub = pubsub.createClient(); + req.pubsub = pubsubClient(); // Forward on the request. next(); diff --git a/graph/subscriptions.js b/graph/subscriptions.js index b8b4f2c0f..adac849e0 100644 --- a/graph/subscriptions.js +++ b/graph/subscriptions.js @@ -127,13 +127,15 @@ const setupFunctions = plugins.get('server', 'setupFunctions').reduce((acc, {plu }), }); +const pubsubClient = pubsub.createClientFactory(); + /** * This creates a new subscription manager. */ const createSubscriptionManager = (server) => new SubscriptionServer({ subscriptionManager: new SubscriptionManager({ schema, - pubsub: pubsub.createClient(), + pubsub: pubsubClient(), setupFunctions, }), onConnect: ({token}, connection) => { diff --git a/routes/api/index.js b/routes/api/index.js index a3bc552f6..eccd8d435 100644 --- a/routes/api/index.js +++ b/routes/api/index.js @@ -1,9 +1,6 @@ const express = require('express'); const authorization = require('../../middleware/authorization'); const pkg = require('../../package.json'); -const { - WEBPACK -} = require('../../config'); const router = express.Router(); @@ -18,12 +15,4 @@ router.use('/users', require('./users')); router.use('/account', require('./account')); router.use('/setup', require('./setup')); -// Enable the kue app only if we aren't in webpack mode. -if (!WEBPACK) { - - // Bind the kue handler to the /kue path. - router.use('/kue', authorization.needed('ADMIN'), require('../../services/kue').kue.app); - -} - module.exports = router; diff --git a/secrets.js b/secrets.js index ee484a420..14b5fc922 100644 --- a/secrets.js +++ b/secrets.js @@ -34,7 +34,7 @@ if (JWT_SECRETS) { return new jwt.AsymmetricSecret(secret, JWT_ALG); })); - debug(`loaded ${JWT_SECRET.length} secrets`); + debug(`loaded ${JWT_SECRET.length} ${JWT_ALG.startsWith('HS') ? 'shared' : 'asymmetric'} secrets`); } else if (JWT_SECRET) { if (JWT_ALG.startsWith('HS')) { module.exports.jwt = new jwt.SharedSecret({ @@ -44,5 +44,5 @@ if (JWT_SECRETS) { module.exports.jwt = new jwt.AsymmetricSecret(JSON.parse(JWT_SECRET), JWT_ALG); } - debug('loaded 1 secret'); + debug(`loaded a ${JWT_ALG.startsWith('HS') ? 'shared' : 'asymmetric'} secret`); } diff --git a/services/kue.js b/services/kue.js index 1b3fb605a..0fa610faa 100644 --- a/services/kue.js +++ b/services/kue.js @@ -3,12 +3,26 @@ const redis = require('./redis'); module.exports = {}; -const kue = module.exports.kue = require('kue'); +const kue = require('kue'); // Note that unlike what the name createQueue suggests, it currently returns a // singleton Queue instance. So you can configure and use only a single Queue // object within your node.js process. -let Queue = module.exports.queue = null; +let queue = null; +const getQueue = () => { + if (queue) { + return queue; + } + + debug('init the queue'); + queue = kue.createQueue({ + redis: { + createClientFactory: () => redis.createClient() + } + }); + + return queue; +}; class Task { @@ -18,14 +32,6 @@ class Task { this.name = name; this.attempts = attempts; this.delay = delay; - - if (!Queue) { - module.exports.queue = Queue = kue.createQueue({ - redis: { - createClientFactory: redis.createClientFactory() - } - }); - } } /** @@ -36,7 +42,7 @@ class Task { debug(`Creating new job for Queue[${this.name}]`); return new Promise((resolve, reject) => { - let job = Queue + let job = getQueue() .create(this.name, data) .attempts(this.attempts) .delay(this.delay) @@ -57,7 +63,7 @@ class Task { * Process jobs for the queue. */ process(callback) { - return Queue.process(this.name, callback); + return getQueue().process(this.name, callback); } /** @@ -71,7 +77,7 @@ class Task { // Shutdown and give the queue 5 seconds to shutdown before we start // killing jobs. - Queue.shutdown(5000, (err) => { + getQueue().shutdown(5000, (err) => { if (err) { return reject(err); } @@ -139,18 +145,3 @@ if (process.env.NODE_ENV === 'test') { module.exports.Task = Task; } -module.exports.createTaskFactory = () => { - let taskInstance = null; - - return (options) => { - if (taskInstance) { - return taskInstance; - } - - options = Object.assign({}, options); - - taskInstance = new module.exports.Task(options); - - return taskInstance; - }; -}; diff --git a/services/mailer.js b/services/mailer.js index 7212979df..27672a35c 100644 --- a/services/mailer.js +++ b/services/mailer.js @@ -1,7 +1,6 @@ const debug = require('debug')('talk:services:mailer'); const nodemailer = require('nodemailer'); const kue = require('./kue'); -const taskFactory = kue.createTaskFactory(); const path = require('path'); const fs = require('fs'); const _ = require('lodash'); @@ -76,11 +75,9 @@ const mailer = module.exports = { /** * Create the new Task kue. */ - get task() { - return taskFactory({ - name: 'mailer' - }); - }, + task: new kue.Task({ + name: 'mailer' + }), sendSimple({template, locals, to, subject}) { diff --git a/services/pubsub.js b/services/pubsub.js index 56e0f3e4d..780aeba16 100644 --- a/services/pubsub.js +++ b/services/pubsub.js @@ -2,15 +2,22 @@ const {RedisPubSub} = require('graphql-redis-subscriptions'); const {connectionOptions} = require('./redis'); -let pubsubInstance = null; -module.exports = { - createClient: () => { - if (pubsubInstance) { - return pubsubInstance; +const createClient = () => new RedisPubSub({connection: connectionOptions}); + +const createClientFactory = () => { + let ins = null; + return () => { + if (ins) { + return ins; } - pubsubInstance = new RedisPubSub({connection: connectionOptions}); + ins = createClient(); - return pubsubInstance; - } + return ins; + }; +}; + +module.exports = { + createClient, + createClientFactory }; diff --git a/services/scraper.js b/services/scraper.js index 40aac29ad..3d9a2c894 100644 --- a/services/scraper.js +++ b/services/scraper.js @@ -1,5 +1,4 @@ const kue = require('./kue'); -const taskFactory = kue.createTaskFactory(); const debug = require('debug')('talk:services:scraper'); const AssetModel = require('../models/asset'); const AssetsService = require('./assets'); @@ -15,11 +14,9 @@ const scraper = { /** * Create the new Task kue singleton. */ - get task() { - return taskFactory({ - name: 'scraper' - }); - }, + task: new kue.Task({ + name: 'scraper' + }), /** * Creates a new scraper job and scrapes the url when it gets processed. From 30b3e91fdb8d7cb88e35649a9f17f7f35a4aa276 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Thu, 27 Jul 2017 15:34:04 +1000 Subject: [PATCH 09/14] documented more env vars --- config.js | 5 ++++- docs/_docs/02-01-configuration.md | 32 +++++++++++++++++++++++++++++++ services/karma.js | 25 +++++++++++++----------- 3 files changed, 50 insertions(+), 12 deletions(-) diff --git a/config.js b/config.js index 83cb5089f..3769998ae 100644 --- a/config.js +++ b/config.js @@ -102,7 +102,10 @@ const CONFIG = { // DISABLE_AUTOFLAG_SUSPECT_WORDS is true when the suspect words that are // matched should not be flagged. - DISABLE_AUTOFLAG_SUSPECT_WORDS: process.env.TALK_DISABLE_AUTOFLAG_SUSPECT_WORDS === 'TRUE' + DISABLE_AUTOFLAG_SUSPECT_WORDS: process.env.TALK_DISABLE_AUTOFLAG_SUSPECT_WORDS === 'TRUE', + + // TRUST_THRESHOLDS defines the thresholds used for automoderation. + TRUST_THRESHOLDS: process.env.TRUST_THRESHOLDS || 'comment:-1,-1;flag:-1,-1' }; //============================================================================== diff --git a/docs/_docs/02-01-configuration.md b/docs/_docs/02-01-configuration.md index f8bb762fc..cb9a51d23 100644 --- a/docs/_docs/02-01-configuration.md +++ b/docs/_docs/02-01-configuration.md @@ -37,6 +37,15 @@ environment variables. Refer to the [config.js](https://github.com/coralproject/talk/blob/master/config.js) file to see how the configuration is parsed. +### Webpack + +These are only used during the webpack build. + +- `TALK_THREADING_LEVEL` (_optional_) - specify the maximum depth of the comment + thread. (Default `3`) +- `TALK_DEFAULT_STREAM_TAB` (_optional_) - specify the default stream tab in the + admin. (Default `all`) + ### Database - `TALK_MONGO_URL` (*required*) - the database connection string for the MongoDB database. @@ -91,6 +100,29 @@ on the contents of those variables.** - `TALK_RECAPTCHA_SECRET` (*required for reCAPTCHA support*) - server secret used for enabling reCAPTCHA powered logins. If not provided it will instead default to providing only a time based lockout. - `TALK_RECAPTCHA_PUBLIC` (*required for reCAPTCHA support*) - client secret used for enabling reCAPTCHA powered logins. If not provided it will instead default to providing only a time based lockout. +### Trust + +Trust can automoderate comments based on user history. By specifying this +option, the beheviour can be changed to offer different results. + +- `TRUST_THRESHOLDS` (_optional_) - configure the reliability thresholds for + flagging and commenting. (Default `comment:-1,-1;flag:-1,-1`) + +The form of the environment variable: + +``` +:,;:,;... +``` + +The default could be read as: + +- When a commenter has one comment rejected, their next comment must be + premoderated once in order to post freely again. If they instead get rejected + again, then they must have two of their comments approved in order to get + added back to the queue. +- At the moment of writing, beheviour is not attached to the flagging + reliability, but it is recorded. + ### Plugins - `TALK_PLUGINS_JSON` (_optional_) - used to specify the plugin config via the diff --git a/services/karma.js b/services/karma.js index c76bcebb3..a2c087eaa 100644 --- a/services/karma.js +++ b/services/karma.js @@ -1,22 +1,25 @@ const debug = require('debug')('talk:services:karma'); const UserModel = require('../models/user'); +const { + TRUST_THRESHOLDS +} = require('../config'); /** * This will create an object with the property name of the action type as the * key and an object as it's value. This will contain a RELIABLE, and UNRELIABLE * property with the number of karma points associated with their particular * state. - * + * * If only the RELIABLE variable is provided, then it will also be used as the * UNRELIABLE variable. - * + * * The form of the environment variable is: - * + * * :,;:,;... - * + * * The default used is: - * - * comment:1,1;flag:-1,-1 + * + * comment:-1,-1;flag:-1,-1 */ const parseThresholds = (thresholds) => thresholds .split(';') @@ -50,16 +53,16 @@ const parseThresholds = (thresholds) => thresholds return acc; }, { comment: { - RELIABLE: -1, - UNRELIABLE: -1 + RELIABLE: 0, + UNRELIABLE: 0 }, flag: { - RELIABLE: -1, - UNRELIABLE: -1 + RELIABLE: 0, + UNRELIABLE: 0 } }); -const THRESHOLDS = parseThresholds(process.env.TRUST_THRESHOLDS || ''); +const THRESHOLDS = parseThresholds(TRUST_THRESHOLDS); debug('using thresholds: ', THRESHOLDS); From f8758bd755b9d83efbce4e8a213e98dd2f0adac4 Mon Sep 17 00:00:00 2001 From: Kim Gardner Date: Thu, 27 Jul 2017 11:58:36 -0400 Subject: [PATCH 10/14] Fix folders --- .gitignore | 1 + plugins/coral-plugin-viewing-options/client/translations.yml | 4 ---- plugins/talk-plugin-viewing-options/translations.yml | 0 3 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 plugins/coral-plugin-viewing-options/client/translations.yml create mode 100644 plugins/talk-plugin-viewing-options/translations.yml diff --git a/.gitignore b/.gitignore index db7732cf5..f5482fd36 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ client/coral-framework/graphql/introspection.json .idea/ *.swp +*.DS_STORE test/e2e/reports coverage/ diff --git a/plugins/coral-plugin-viewing-options/client/translations.yml b/plugins/coral-plugin-viewing-options/client/translations.yml deleted file mode 100644 index 6ab31fa1b..000000000 --- a/plugins/coral-plugin-viewing-options/client/translations.yml +++ /dev/null @@ -1,4 +0,0 @@ -en: - viewing_options: "Viewing Options" -es: - viewing_options: "Opciones de visualización" \ No newline at end of file diff --git a/plugins/talk-plugin-viewing-options/translations.yml b/plugins/talk-plugin-viewing-options/translations.yml new file mode 100644 index 000000000..e69de29bb From 9bd3e6b541238c83e0c75bd0a0876d795df06647 Mon Sep 17 00:00:00 2001 From: Kim Gardner Date: Thu, 27 Jul 2017 12:20:07 -0400 Subject: [PATCH 11/14] Fix translation file --- plugins/talk-plugin-viewing-options/client/translations.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/talk-plugin-viewing-options/client/translations.yml b/plugins/talk-plugin-viewing-options/client/translations.yml index e69de29bb..742754160 100644 --- a/plugins/talk-plugin-viewing-options/client/translations.yml +++ b/plugins/talk-plugin-viewing-options/client/translations.yml @@ -0,0 +1,4 @@ +en: + viewing_options: "Viewing Options" +es: + viewing_options: "Opciones de visualización" From cf8528dcf1d9e17c9d02f6e793fc87ddc46f31a6 Mon Sep 17 00:00:00 2001 From: Kim Gardner Date: Thu, 27 Jul 2017 12:23:18 -0400 Subject: [PATCH 12/14] Remove file --- plugins/talk-plugin-viewing-options/translations.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 plugins/talk-plugin-viewing-options/translations.yml diff --git a/plugins/talk-plugin-viewing-options/translations.yml b/plugins/talk-plugin-viewing-options/translations.yml deleted file mode 100644 index e69de29bb..000000000 From 447c3aa7cc2a250c58d3aa7a5b2b302990e6269d Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 27 Jul 2017 13:48:03 -0300 Subject: [PATCH 13/14] Wrong reducer name --- .../talk-plugin-offtopic/client/containers/OffTopicFilter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js b/plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js index 65431f5c0..9548b764e 100644 --- a/plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js +++ b/plugins/talk-plugin-offtopic/client/containers/OffTopicFilter.js @@ -13,7 +13,7 @@ import { const mapStateToProps = (state) => ({ commentClassNames: commentClassNamesSelector(state), - checked: state.coralPluginOfftopic.checked + checked: state.talkPluginOfftopic.checked }); const mapDispatchToProps = (dispatch) => From 47d37e31d8631a7810ecd188ffe4702861e102c3 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 27 Jul 2017 13:50:14 -0300 Subject: [PATCH 14/14] prefixing translations --- .../client/components/ViewingOptions.js | 2 +- plugins/talk-plugin-viewing-options/client/translations.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/talk-plugin-viewing-options/client/components/ViewingOptions.js b/plugins/talk-plugin-viewing-options/client/components/ViewingOptions.js index f05cc2eea..8988dd1ec 100644 --- a/plugins/talk-plugin-viewing-options/client/components/ViewingOptions.js +++ b/plugins/talk-plugin-viewing-options/client/components/ViewingOptions.js @@ -26,7 +26,7 @@ const ViewingOptions = (props) => {
    diff --git a/plugins/talk-plugin-viewing-options/client/translations.yml b/plugins/talk-plugin-viewing-options/client/translations.yml index 742754160..d1b1c1896 100644 --- a/plugins/talk-plugin-viewing-options/client/translations.yml +++ b/plugins/talk-plugin-viewing-options/client/translations.yml @@ -1,4 +1,6 @@ en: - viewing_options: "Viewing Options" + talk-plugin-viewing-options: + viewing_options: "Viewing Options" es: - viewing_options: "Opciones de visualización" + talk-plugin-viewing-options: + viewing_options: "Opciones de visualización"