From 7036aa5bad315a1cda2c763795e4237da118defe Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Wed, 10 Jan 2018 17:54:06 +0100 Subject: [PATCH 1/8] Use lodash with es modules --- .../src/routes/Moderation/containers/StorySearch.js | 2 +- package.json | 1 + webpack.config.js | 4 +++- yarn.lock | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/coral-admin/src/routes/Moderation/containers/StorySearch.js b/client/coral-admin/src/routes/Moderation/containers/StorySearch.js index 04aab2d84..a88481311 100644 --- a/client/coral-admin/src/routes/Moderation/containers/StorySearch.js +++ b/client/coral-admin/src/routes/Moderation/containers/StorySearch.js @@ -3,7 +3,7 @@ import {compose, gql} from 'react-apollo'; import StorySearch from '../components/StorySearch'; import {withRouter} from 'react-router'; import withQuery from 'coral-framework/hocs/withQuery'; -import {isEmpty} from 'lodash'; +import isEmpty from 'lodash/isEmpty'; class StorySearchContainer extends React.Component { constructor(props) { diff --git a/package.json b/package.json index 7c8a0f9a0..87967caf7 100644 --- a/package.json +++ b/package.json @@ -124,6 +124,7 @@ "kue": "0.11.6", "linkify-it": "^2.0.3", "lodash": "^4.16.6", + "lodash-es": "^4.16.6", "marked": "^0.3.6", "material-design-lite": "^1.2.1", "metascraper": "1.0.7", diff --git a/webpack.config.js b/webpack.config.js index 153582199..0b42f9294 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -121,7 +121,9 @@ const config = { 'graphql-anywhere': path.resolve(__dirname, 'client/coral-framework/graphql/anywhere'), 'plugin-api': path.resolve(__dirname, 'plugin-api/'), plugins: path.resolve(__dirname, 'plugins/'), - pluginsConfig: pluginsPath + pluginsConfig: pluginsPath, + 'lodash': path.resolve(__dirname, path.resolve(__dirname, 'node_modules/lodash-es')), + 'lodash.isequal': path.resolve(__dirname, 'node_modules/lodash-es/isEqual'), }, modules: [ path.resolve(__dirname, 'plugins'), diff --git a/yarn.lock b/yarn.lock index cbdddb034..78854a49d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5387,7 +5387,7 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash-es@^4.2.1: +lodash-es@^4.16.6, lodash-es@^4.2.1: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" From 3687fc170247a22224f38e82cfff339c39246793 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Wed, 10 Jan 2018 10:31:43 -0700 Subject: [PATCH 2/8] adjusted build script to build the next branch and release it --- circle.yml | 5 ++++- scripts/docker.sh | 44 ++++++++++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/circle.yml b/circle.yml index ebb746669..44bed4d82 100644 --- a/circle.yml +++ b/circle.yml @@ -62,7 +62,10 @@ deployment: - bash ./scripts/docker.sh deploy latest: - branch: master + branches: + only: + - master + - next owner: coralproject commands: - bash ./scripts/docker.sh deploy diff --git a/scripts/docker.sh b/scripts/docker.sh index 3aae8faf1..3461f6029 100755 --- a/scripts/docker.sh +++ b/scripts/docker.sh @@ -25,28 +25,38 @@ deploy_tag() { for version in $tag_list do echo "==> tagging $version" - docker tag coralproject/talk:latest coralproject/talk:$version - docker tag coralproject/talk:latest-onbuild coralproject/talk:$version-onbuild + echo docker tag coralproject/talk:latest coralproject/talk:$version + echo docker tag coralproject/talk:latest-onbuild coralproject/talk:$version-onbuild done - # Push each of the tags to docker hub, including latest + # Push each of the tags to dockerhub, including latest for version in $tag_list latest do echo "==> pushing $version" - docker push coralproject/talk:$version - docker push coralproject/talk:$version-onbuild + echo docker push coralproject/talk:$version + echo docker push coralproject/talk:$version-onbuild done } deploy_latest() { echo "==> pushing latest" - docker push coralproject/talk:latest - docker push coralproject/talk:latest-onbuild + echo docker push coralproject/talk:latest + echo docker push coralproject/talk:latest-onbuild +} + +deploy_branch() { + echo "==> tagging branch $CIRCLE_BRANCH" + echo docker tag coralproject/talk:latest coralproject/talk:$CIRCLE_BRANCH + echo docker tag coralproject/talk:latest-onbuild coralproject/talk:$CIRCLE_BRANCH-onbuild + + echo "==> pushing branch $CIRCLE_BRANCH" + echo docker push coralproject/talk:$CIRCLE_BRANCH + echo docker push coralproject/talk:$CIRCLE_BRANCH-onbuild } # build the repo, including the onbuild tagged versions. -docker build -t coralproject/talk:latest -f Dockerfile . -docker build -t coralproject/talk:latest-onbuild -f Dockerfile.onbuild . +echo docker build -t coralproject/talk:latest -f Dockerfile . +echo docker build -t coralproject/talk:latest-onbuild -f Dockerfile.onbuild . if [ "$1" = "deploy" ] then @@ -55,14 +65,20 @@ then then # Log the Docker Daemon in - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS + echo docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS fi - # deploy based on the env - if [ -n "$CIRCLE_TAG" ] + if [ "$CIRCLE_BRANCH" = "master" ] then - deploy_tag + + # deploy based on the env + if [ -n "$CIRCLE_TAG" ] + then + deploy_tag + else + deploy_latest + fi else - deploy_latest + deploy_branch fi fi \ No newline at end of file From bbdd69b2a076944a5047246becf61f47962b80e7 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Wed, 10 Jan 2018 10:34:11 -0700 Subject: [PATCH 3/8] removed debug... --- scripts/docker.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/docker.sh b/scripts/docker.sh index 3461f6029..e1e3f9725 100755 --- a/scripts/docker.sh +++ b/scripts/docker.sh @@ -25,38 +25,38 @@ deploy_tag() { for version in $tag_list do echo "==> tagging $version" - echo docker tag coralproject/talk:latest coralproject/talk:$version - echo docker tag coralproject/talk:latest-onbuild coralproject/talk:$version-onbuild + docker tag coralproject/talk:latest coralproject/talk:$version + docker tag coralproject/talk:latest-onbuild coralproject/talk:$version-onbuild done # Push each of the tags to dockerhub, including latest for version in $tag_list latest do echo "==> pushing $version" - echo docker push coralproject/talk:$version - echo docker push coralproject/talk:$version-onbuild + docker push coralproject/talk:$version + docker push coralproject/talk:$version-onbuild done } deploy_latest() { echo "==> pushing latest" - echo docker push coralproject/talk:latest - echo docker push coralproject/talk:latest-onbuild + docker push coralproject/talk:latest + docker push coralproject/talk:latest-onbuild } deploy_branch() { echo "==> tagging branch $CIRCLE_BRANCH" - echo docker tag coralproject/talk:latest coralproject/talk:$CIRCLE_BRANCH - echo docker tag coralproject/talk:latest-onbuild coralproject/talk:$CIRCLE_BRANCH-onbuild + docker tag coralproject/talk:latest coralproject/talk:$CIRCLE_BRANCH + docker tag coralproject/talk:latest-onbuild coralproject/talk:$CIRCLE_BRANCH-onbuild echo "==> pushing branch $CIRCLE_BRANCH" - echo docker push coralproject/talk:$CIRCLE_BRANCH - echo docker push coralproject/talk:$CIRCLE_BRANCH-onbuild + docker push coralproject/talk:$CIRCLE_BRANCH + docker push coralproject/talk:$CIRCLE_BRANCH-onbuild } # build the repo, including the onbuild tagged versions. -echo docker build -t coralproject/talk:latest -f Dockerfile . -echo docker build -t coralproject/talk:latest-onbuild -f Dockerfile.onbuild . +docker build -t coralproject/talk:latest -f Dockerfile . +docker build -t coralproject/talk:latest-onbuild -f Dockerfile.onbuild . if [ "$1" = "deploy" ] then @@ -65,7 +65,7 @@ then then # Log the Docker Daemon in - echo docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS + docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS fi if [ "$CIRCLE_BRANCH" = "master" ] From 7127aeaa87cf7f4326ead9223f558c466bd2d6f9 Mon Sep 17 00:00:00 2001 From: okbel Date: Wed, 10 Jan 2018 17:35:50 -0300 Subject: [PATCH 4/8] Icon User Drawer --- client/coral-ui/components/Drawer.css | 6 ++++++ client/coral-ui/components/Drawer.js | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/client/coral-ui/components/Drawer.css b/client/coral-ui/components/Drawer.css index 1e3055184..40458b94f 100644 --- a/client/coral-ui/components/Drawer.css +++ b/client/coral-ui/components/Drawer.css @@ -37,6 +37,12 @@ text-align: center; cursor: pointer; + .icon { + color: #595959; + font-size: 25px; + display: block; + } + &:hover { color: #ccc; } diff --git a/client/coral-ui/components/Drawer.js b/client/coral-ui/components/Drawer.js index 738354cd7..1fa224e0f 100644 --- a/client/coral-ui/components/Drawer.js +++ b/client/coral-ui/components/Drawer.js @@ -2,11 +2,14 @@ import React from 'react'; import cn from 'classnames'; import PropTypes from 'prop-types'; import styles from './Drawer.css'; +import {Icon} from 'coral-ui'; const Drawer = ({children, onClose, className = ''}) => { return (
- +
{children}
From eef2578e61d9de9e59e2b1061c45a517062357b5 Mon Sep 17 00:00:00 2001 From: okbel Date: Wed, 10 Jan 2018 17:41:18 -0300 Subject: [PATCH 5/8] ignore user box over flow, fixed --- .../client/components/IgnoreUserConfirmation.css | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/talk-plugin-ignore-user/client/components/IgnoreUserConfirmation.css b/plugins/talk-plugin-ignore-user/client/components/IgnoreUserConfirmation.css index 4f3d8e9da..1a291d5e3 100644 --- a/plugins/talk-plugin-ignore-user/client/components/IgnoreUserConfirmation.css +++ b/plugins/talk-plugin-ignore-user/client/components/IgnoreUserConfirmation.css @@ -16,6 +16,7 @@ padding: 0; margin: 0 0 8px 0; font-size: 15px; + word-wrap: break-word; } .button { From 1f6d38c4ad3b951dda743d7f901b0260f9f17ee1 Mon Sep 17 00:00:00 2001 From: okbel Date: Wed, 10 Jan 2018 17:43:55 -0300 Subject: [PATCH 6/8] Updating copy --- locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/en.yml b/locales/en.yml index a4238d5c0..0da121202 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -10,7 +10,7 @@ en: cancel: "Cancel" note: "Note: {0}" note_reject_comment: "Banning this user will also place this comment in the Rejected queue." - note_ban_user: "Banning this user will not let them edit comment or remove anything." + note_ban_user: "Banning this user will not let them comment, react to, or report comments." yes_ban_user: "Yes, Ban User" write_a_message: "Write a message" send: "Send" From d055e0b28bad7bbf4d509ab1e4b792b4ed18be0a Mon Sep 17 00:00:00 2001 From: okbel Date: Wed, 10 Jan 2018 17:51:21 -0300 Subject: [PATCH 7/8] Feature Button --- .../client/components/ModTag.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/talk-plugin-featured-comments/client/components/ModTag.css b/plugins/talk-plugin-featured-comments/client/components/ModTag.css index 683c16570..960985e0d 100644 --- a/plugins/talk-plugin-featured-comments/client/components/ModTag.css +++ b/plugins/talk-plugin-featured-comments/client/components/ModTag.css @@ -7,11 +7,11 @@ padding: 0px 5px; border-radius: 2px; font-size: 12px; - height: 24px; + height: 26px; transition: background-color .2s cubic-bezier(.4,0,.2,1), color .2s cubic-bezier(.4,0,.2,1), border-color .2s cubic-bezier(.4,0,.2,1); margin: 2px 0px; letter-spacing: 0.4px; - + line-height: 25px; } .tag:hover { @@ -38,5 +38,5 @@ .tagIcon { margin-right: 5px; font-size: 15px; - vertical-align: text-bottom; + vertical-align: sub; } From 14dd9acd3b7125854fd47f5cd052fe5b4b0ff73f Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Wed, 10 Jan 2018 16:49:40 -0700 Subject: [PATCH 8/8] changed copy for error --- errors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors.js b/errors.js index 9078dc866..3fafb7ec3 100644 --- a/errors.js +++ b/errors.js @@ -158,7 +158,7 @@ const ErrNotAuthorized = new APIError('not authorized', { // ErrSettingsNotInit is returned when the settings are required but not // initialized. -const ErrSettingsNotInit = new Error('settings not initialized, run `./bin/cli setup` to setup the application first'); +const ErrSettingsNotInit = new Error('Talk is currently not setup. Please proceed to our webinstaller at $ROOT_URL/admin/install or run ./bin/cli-setup. Visit https://coralproject.github.io/talk/ for more information on installation and configuration instructions'); // ErrSettingsInit is returned when the setup endpoint is hit and we are already // initialized.