Compare commits

...
12 Commits
Author SHA1 Message Date
Wyatt Johnson b7137fbcd4 Merge pull request #1132 from coralproject/docker-regression
Docker Regression Fix
2017-10-26 09:43:15 -06:00
Wyatt Johnson 4089d09681 fix regression missing yarn cache clean 2017-10-26 09:19:29 -06:00
Kiwi a7eb588f7f Merge pull request #1122 from coralproject/onbuild
Docker Updates
2017-10-26 14:40:45 +02:00
Kiwi cd92dbf682 Merge branch 'master' into onbuild 2017-10-26 14:33:02 +02:00
Kiwi 89ab71eb1d Merge pull request #1130 from coralproject/tests-e2e
Missing Classes and testing Admin Drawer
2017-10-26 14:31:58 +02:00
Kiwi c1cfe3b200 Merge branch 'master' into onbuild 2017-10-26 14:28:59 +02:00
Kiwi d7ed679384 Merge branch 'master' into tests-e2e 2017-10-26 14:20:53 +02:00
Belen Curcio 59acdc5c02 new e2e test 2017-10-25 16:53:18 -03:00
Belen Curcio b06ae9001e Adding missing classes 2017-10-25 16:31:46 -03:00
Kim Gardner 1f170c1dca Merge branch 'master' into onbuild 2017-10-24 13:20:24 +01:00
Wyatt Johnson 9217239caf Merge branch 'master' into onbuild 2017-10-23 12:33:56 -06:00
Wyatt Johnson fac028c22b update to docker build process 2017-10-23 10:50:29 -06:00
7 changed files with 64 additions and 24 deletions
+11 -4
View File
@@ -1,11 +1,18 @@
FROM coralproject/talk:latest
# Setup the build arguments
ONBUILD ARG TALK_THREADING_LEVEL=3
ONBUILD ARG TALK_DEFAULT_STREAM_TAB=all
ONBUILD ARG TALK_DEFAULT_LANG=en
ONBUILD ARG TALK_PLUGINS_JSON
# Bundle app source
ONBUILD COPY . /usr/src/app
# At this stage, we need to install the development dependancies again because
# we need to have webpack available. We then build the new dependancies and
# clear out the development dependancies again. After this we of course need to
# At this stage, we need to install the development dependencies again because
# we need to have webpack available. We then build the new dependencies and
# clear out the development dependencies again. After this we of course need to
# clear out the yarn cache, this saves quite a lot of size.
ONBUILD RUN cli plugins reconcile && \
yarn build
yarn build && \
yarn cache clean
+9 -6
View File
@@ -5,14 +5,15 @@ import {IndexLink, Link} from 'react-router';
import styles from './Drawer.css';
import t from 'coral-framework/services/i18n';
import {can} from 'coral-framework/services/perms';
import cn from 'classnames';
const CoralDrawer = ({handleLogout, auth = {}}) => (
<Drawer className={styles.drawer}>
<Drawer className={cn('talk-admin-drawer-nav', styles.drawer)}>
{ auth && auth.user && can(auth.user, 'ACCESS_ADMIN') ?
<div>
<Navigation className={styles.nav}>
<IndexLink
className={styles.navLink}
className={cn('talk-admin-nav-dashboard', styles.navLink)}
to="/admin/dashboard"
activeClassName={styles.active}>
{t('configure.dashboard')}
@@ -20,19 +21,21 @@ const CoralDrawer = ({handleLogout, auth = {}}) => (
{
can(auth.user, 'MODERATE_COMMENTS') && (
<Link
className={styles.navLink}
className={cn('talk-admin-nav-moderate', styles.navLink)}
to="/admin/moderate"
activeClassName={styles.active}>
{t('configure.moderate')}
</Link>
)
}
<Link className={styles.navLink}
<Link
className={cn('talk-admin-nav-stories', styles.navLink)}
to="/admin/stories"
activeClassName={styles.active}>
{t('configure.stories')}
</Link>
<Link className={styles.navLink}
<Link
className={cn('talk-admin-nav-community', styles.navLink)}
to="/admin/community"
activeClassName={styles.active}>
{t('configure.community')}
@@ -41,7 +44,7 @@ const CoralDrawer = ({handleLogout, auth = {}}) => (
can(auth.user, 'UPDATE_CONFIG') &&
(
<Link
className={styles.navLink}
className={cn('talk-admin-nav-configure', styles.navLink)}
to="/admin/configure"
activeClassName={styles.active}>
{t('configure.configure')}
+7 -2
View File
@@ -95,10 +95,12 @@ FROM coralproject/talk:latest-onbuild
And running the following to build the docker image:
```bash
docker build -t my-awesome-talk-image .
docker build -t my-awesome-talk-image --build-arg TALK_DEFAULT_LANG=es .
```
Don't forget to replace `my-awesome-talk-image` with your own image name.
Don't forget to replace `my-awesome-talk-image` with your own image name, and
specify your build variables with the `--build-arg`. Refer to [Dockerfile.onbuild](https://github.com/coralproject/talk/blob/master/Dockerfile.onbuild){:target="_blank"} for the
available build variables.
{: .code-aside}
This accomplishes a lot:
@@ -108,6 +110,9 @@ This accomplishes a lot:
2. Installs any new dependencies that were required by any new plugins.
3. Builds the new static bundles so that they are ready to serve when the image
is running.
4. Specifies a build time variable [TALK_DEFAULT_LANG]({{ "/advanced-configuration/#talk_default_lang" | relative_url }}){:.param}. Refer
to [Dockerfile.onbuild](https://github.com/coralproject/talk/blob/master/Dockerfile.onbuild){:target="_blank"} for the
available build variables.
This means that you can create a repository for your organization that simply
includes the above `Dockerfile`, a directory of `plugins`, and a `plugins.json`
@@ -26,10 +26,18 @@ Configure the duration for which comment counts are cached for, parsed by
## TALK_DEFAULT_LANG
This is a **Build Variable** and must be consumed during build. If using the
[Docker-onbuild]({{ "/installation-from-docker/#onbuild" | relative_url }})
image you can specify it with `--build-arg TALK_DEFAULT_LANG=en`.
Specify the default translation language. (Default `en`)
## TALK_DEFAULT_STREAM_TAB
This is a **Build Variable** and must be consumed during build. If using the
[Docker-onbuild]({{ "/installation-from-docker/#onbuild" | relative_url }})
image you can specify it with `--build-arg TALK_DEFAULT_STREAM_TAB=all`.
Specify the default stream tab in the admin. (Default `all`)
## TALK_DISABLE_AUTOFLAG_SUSPECT_WORDS
@@ -397,6 +405,10 @@ CDN/Storage url. (Defaults to value of
## TALK_THREADING_LEVEL
This is a **Build Variable** and must be consumed during build. If using the
[Docker-onbuild]({{ "/installation-from-docker/#onbuild" | relative_url }})
image you can specify it with `--build-arg TALK_THREADING_LEVEL=3`.
Specify the maximum depth of the comment thread. (Default `3`)
**Note that a high value for `TALK_THREADING_LEVEL` will result in large
+2 -1
View File
@@ -273,7 +273,8 @@ pre {
p a:not(.plain-link) {
@extend .coral-link;
}
ul:not(.toc__menu) li a {
ul:not(.toc__menu) li a,
ol li a {
@extend .coral-link;
}
}
+5 -1
View File
@@ -15,9 +15,13 @@ module.exports = {
'passwordInput': '.talk-admin-login-sign-in #password',
'signInButton': '.talk-admin-login-sign-in-button',
'storiesNav': '.talk-admin-nav-stories',
'storiesDrawerNav': '.talk-admin-drawer-nav .talk-admin-nav-stories',
'storiesSection': '.talk-admin-stories',
'communityNav': '.talk-admin-nav-community',
'communityDrawerNav': '.talk-admin-drawer-nav .talk-admin-nav-community',
'communitySection': '.talk-admin-community',
'moderationContainer': '.talk-admin-moderation-container'
'moderationContainer': '.talk-admin-moderation-container',
'drawerButton': '.mdl-layout__drawer-button',
'drawerOverlay': 'div.mdl-layout__obfuscator.is-visible',
}
};
+18 -10
View File
@@ -1,10 +1,9 @@
module.exports = {
'@tags': ['admin', 'login'],
beforeEach: (client) => {
// Testing Desktop
client.resizeWindow(1280, 800);
},
beforeEach: (client) => {
client.resizeWindow(1024, 800);
},
'Admin logs in': (client) => {
const adminPage = client.page.admin();
const {testData: {admin}} = client.globals;
@@ -29,9 +28,14 @@ module.exports = {
adminPage
.navigate()
.waitForElementVisible('@storiesNav')
.click('@storiesNav')
.waitForElementVisible('@drawerButton')
.click('@drawerButton')
.waitForElementVisible('@storiesDrawerNav')
.click('@storiesDrawerNav')
.waitForElementVisible('@drawerOverlay')
.click('@drawerOverlay')
.waitForElementVisible('@storiesSection');
},
'Admin goes to Community': (client) => {
@@ -39,9 +43,13 @@ module.exports = {
adminPage
.navigate()
.waitForElementVisible('@communityNav')
.click('@communityNav')
.waitForElementVisible('@communitySection');
.waitForElementVisible('@drawerButton')
.click('@drawerButton')
.waitForElementVisible('@communityDrawerNav')
.click('@communityDrawerNav')
.waitForElementVisible('@drawerOverlay')
.click('@drawerOverlay')
.waitForElementVisible('@communitySection');
},
after: (client) => {
client.end();