From 9a3fc9876c35662fc3bc227a0a23b6c04eb40bd3 Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Fri, 2 Apr 2021 04:28:27 +0900 Subject: [PATCH 01/33] Add privacy policy and terms of use to allowlist --- src/redux/session.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/redux/session.js b/src/redux/session.js index 9e16b5241..45789e1d3 100644 --- a/src/redux/session.js +++ b/src/redux/session.js @@ -14,7 +14,11 @@ const Types = keyMirror({ const banWhitelistPaths = [ '/accounts/banned-response/', '/community_guidelines/', - '/community_guidelines' + '/community_guidelines', + '/privacy_policy/', + '/privacy_policy', + '/terms_of_use/', + '/terms_of_use' ]; module.exports.Status = keyMirror({ From 2c8f94d1ab40cc99e37255941d1732a1e0b260e6 Mon Sep 17 00:00:00 2001 From: BryceLTaylor Date: Fri, 23 Apr 2021 13:40:47 -0400 Subject: [PATCH 02/33] circleci turn on translation push cron job --- .circleci/config.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ae028e6e..6e9a27e8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -114,6 +114,13 @@ aliases: npm run test:smoke:convertReportToXunit - store_test_results: path: test/results + - &update-translations + <<: *defaults + steps: + - checkout + - run: + name: "run i18n script" + command: npm run i18n:push jobs: build-staging: @@ -132,6 +139,8 @@ jobs: <<: *integration_jest integration-production-tap: <<: *integration_tap + update-translations: + <<: *update-translations workflows: build-test-deploy: @@ -220,3 +229,19 @@ workflows: branches: only: - master + Update-translations: + triggers: + - schedule: # every evening at 7pm EST (8pm EDT, Midnight UTC) + cron: "0 0 * * *" + filters: + branches: + only: develop + jobs: + - update-translations: + context: + - scratch-www-all + - scratch-www-staging + filters: + branches: + only: + - develop From 129d87642cf99f9bb65371ee27208420c83aab4e Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Wed, 28 Apr 2021 13:41:59 -0400 Subject: [PATCH 03/33] Remove unuseable NOT_FETCHED state for studio info --- src/redux/studio.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/redux/studio.js b/src/redux/studio.js index b6b5eb72b..ded4c302e 100644 --- a/src/redux/studio.js +++ b/src/redux/studio.js @@ -13,7 +13,7 @@ const Status = keyMirror({ }); const getInitialState = () => ({ - infoStatus: Status.NOT_FETCHED, + infoStatus: Status.FETCHING, title: '', description: '', openToAll: false, @@ -38,12 +38,14 @@ const studioReducer = (state, action) => { case 'SET_INFO': return { ...state, - ...action.info + ...action.info, + infoStatus: Status.FETCHED }; case 'SET_ROLES': return { ...state, - ...action.roles + ...action.roles, + rolesStatus: Status.FETCHED }; case 'SET_FETCH_STATUS': if (action.error) { @@ -95,14 +97,12 @@ const selectIsFetchingRoles = state => state.studio.rolesStatus === Status.FETCH // Thunks const getInfo = () => ((dispatch, getState) => { - dispatch(setFetchStatus('infoStatus', Status.FETCHING)); const studioId = selectStudioId(getState()); api({uri: `/studios/${studioId}`}, (err, body, res) => { if (err || typeof body === 'undefined' || res.statusCode !== 200) { dispatch(setFetchStatus('infoStatus', Status.ERROR, err)); return; } - dispatch(setFetchStatus('infoStatus', Status.FETCHED)); dispatch(setInfo({ title: body.title, description: body.description, @@ -130,7 +130,6 @@ const getRoles = () => ((dispatch, getState) => { dispatch(setFetchStatus('rolesStatus', Status.ERROR, err)); return; } - dispatch(setFetchStatus('rolesStatus', Status.FETCHED)); dispatch(setRoles({ manager: body.manager, curator: body.curator, From 1c31d7cf65d1b496d84a61afd55c6cb5825a77d6 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Wed, 28 Apr 2021 13:43:42 -0400 Subject: [PATCH 04/33] Refactor layout and add styling for studio info --- src/views/studio/studio-description.jsx | 42 +++++------ src/views/studio/studio-follow.jsx | 34 ++++----- src/views/studio/studio-image.jsx | 65 ++++++++-------- src/views/studio/studio-info.jsx | 15 +--- src/views/studio/studio-tab-nav.jsx | 27 +++---- src/views/studio/studio-title.jsx | 39 +++++----- src/views/studio/studio.jsx | 53 +++++++------ src/views/studio/studio.scss | 98 +++++++++++++++++++++++++ 8 files changed, 231 insertions(+), 142 deletions(-) create mode 100644 src/views/studio/studio.scss diff --git a/src/views/studio/studio-description.jsx b/src/views/studio/studio-description.jsx index f4eef2216..0ff194ff1 100644 --- a/src/views/studio/studio-description.jsx +++ b/src/views/studio/studio-description.jsx @@ -8,31 +8,29 @@ import {selectCanEditInfo} from '../../redux/studio-permissions'; import { mutateStudioDescription, selectIsMutatingDescription, selectDescriptionMutationError } from '../../redux/studio-mutations'; +import classNames from 'classnames'; const StudioDescription = ({ descriptionError, isFetching, isMutating, description, canEditInfo, handleUpdate -}) => ( -
-

Description

- {isFetching ? ( -

Fetching...

- ) : (canEditInfo ? ( -