From 10cd53b40ba6065a83fdd2e1fef8bbf2a741ff61 Mon Sep 17 00:00:00 2001 From: gaba Date: Tue, 25 Apr 2017 14:28:37 -0500 Subject: [PATCH 1/5] Only shows the Loading component when there is no search value --- client/coral-admin/src/containers/Community/People.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/coral-admin/src/containers/Community/People.js b/client/coral-admin/src/containers/Community/People.js index 0011cd704..084e574fb 100644 --- a/client/coral-admin/src/containers/Community/People.js +++ b/client/coral-admin/src/containers/Community/People.js @@ -47,7 +47,7 @@ const People = ({isFetching, commenters, searchValue, onSearchChange, ...props})
- { isFetching && } + { isFetching && (searchValue === null) && } { hasResults ? Date: Tue, 25 Apr 2017 16:22:31 -0600 Subject: [PATCH 2/5] update bad username copy --- errors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors.js b/errors.js index 6cd8d8da0..67ae0693a 100644 --- a/errors.js +++ b/errors.js @@ -106,7 +106,7 @@ class ErrAuthentication extends APIError { // ErrContainsProfanity is returned in the event that the middleware detects // profanity/wordlisted words in the payload. -const ErrContainsProfanity = new APIError('Suspected profanity. If you think this in error, please let us know!', { +const ErrContainsProfanity = new APIError('This username contains elements which are not permitted in our community. If you think this is in error, please contact us or try again.', { translation_key: 'PROFANITY_ERROR', status: 400 }); From ccc512cdddfd13ae27ecb4a407b5fe6ee6c42015 Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Wed, 26 Apr 2017 11:43:34 -0600 Subject: [PATCH 3/5] if there is no available translation, do not show error.whatever in the UI --- client/coral-framework/actions/auth.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/coral-framework/actions/auth.js b/client/coral-framework/actions/auth.js index e112b2b6c..b3f374754 100644 --- a/client/coral-framework/actions/auth.js +++ b/client/coral-framework/actions/auth.js @@ -177,7 +177,13 @@ export const fetchSignUp = (formData, redirectUri) => (dispatch) => { dispatch(signUpSuccess(user)); }) .catch(error => { - dispatch(signUpFailure(lang.t(`error.${error.message}`))); + let errorMessage = lang.t(`error.${error.message}`); + + // if there is no translation defined, just show the error string + if (errorMessage === `error.${error.message}`) { + errorMessage = error.message; + } + dispatch(signUpFailure(errorMessage)); }); }; From 6f58754617eb67721dc260afabda1dfef6db06bf Mon Sep 17 00:00:00 2001 From: gaba Date: Wed, 26 Apr 2017 14:00:26 -0500 Subject: [PATCH 4/5] Removing the Loading all together. --- client/coral-admin/src/containers/Community/People.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/coral-admin/src/containers/Community/People.js b/client/coral-admin/src/containers/Community/People.js index 084e574fb..3fd486fb6 100644 --- a/client/coral-admin/src/containers/Community/People.js +++ b/client/coral-admin/src/containers/Community/People.js @@ -4,7 +4,6 @@ import translations from 'coral-admin/src/translations.json'; import styles from './Community.css'; import Table from './Table'; -import Loading from './Loading'; import {Pager, Icon} from 'coral-ui'; import EmptyCard from '../../components/EmptyCard'; @@ -47,7 +46,6 @@ const People = ({isFetching, commenters, searchValue, onSearchChange, ...props})
- { isFetching && (searchValue === null) && } { hasResults ?
Date: Wed, 26 Apr 2017 14:25:18 -0500 Subject: [PATCH 5/5] Remove isfetching all together. --- client/coral-admin/src/containers/Community/People.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/coral-admin/src/containers/Community/People.js b/client/coral-admin/src/containers/Community/People.js index 3fd486fb6..e375bac38 100644 --- a/client/coral-admin/src/containers/Community/People.js +++ b/client/coral-admin/src/containers/Community/People.js @@ -28,8 +28,8 @@ const tableHeaders = [ } ]; -const People = ({isFetching, commenters, searchValue, onSearchChange, ...props}) => { - const hasResults = !isFetching && !!commenters.length; +const People = ({commenters, searchValue, onSearchChange, ...props}) => { + const hasResults = !!commenters.length; return (