From ff031546e706967836d3afc5095e664858caab9b Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Wed, 20 Sep 2023 07:45:06 +1000 Subject: [PATCH 1/8] =?UTF-8?q?Change=20=E2=80=9CSubmission=20Review?= =?UTF-8?q?=E2=80=9D=20tab=20to=20=E2=80=9CMy=20Submissions=E2=80=9D=20ins?= =?UTF-8?q?tead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://topcoder.atlassian.net/browse/PROD-3088 --- .circleci/config.yml | 1 + config/backup-default.js | 1 - config/default.js | 1 - config/production.js | 1 - .../challenge-detail/Header/TabSelector/index.jsx | 12 +++++------- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ca4199330..6af31f2fd4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -351,6 +351,7 @@ workflows: only: - PROD-4183 - changelog + - remove_submission_review # This is alternate dev env for parallel testing - "build-test": context : org-global diff --git a/config/backup-default.js b/config/backup-default.js index 0e399b364c..e242f7ae72 100644 --- a/config/backup-default.js +++ b/config/backup-default.js @@ -115,7 +115,6 @@ module.exports = { FORUMS: 'https://apps.topcoder-dev.com/forums', FORUMS_VANILLA: 'https://vanilla.topcoder-dev.com', HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles', - SUBMISSION_REVIEW: 'https://submission-review.topcoder-dev.com', THRIVE: 'https://community-app.topcoder-dev.com/thrive', diff --git a/config/default.js b/config/default.js index d50de2aec7..5fb31e3d82 100644 --- a/config/default.js +++ b/config/default.js @@ -116,7 +116,6 @@ module.exports = { FORUMS: 'https://apps.topcoder-dev.com/forums', FORUMS_VANILLA: 'https://vanilla.topcoder-dev.com', HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles', - SUBMISSION_REVIEW: 'https://submission-review.topcoder-dev.com', THRIVE: 'https://community-app.topcoder-dev.com/thrive', diff --git a/config/production.js b/config/production.js index c372930853..e72069be91 100644 --- a/config/production.js +++ b/config/production.js @@ -35,7 +35,6 @@ module.exports = { FORUMS: 'https://apps.topcoder.com/forums', FORUMS_VANILLA: 'https://discussions.topcoder.com', HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles', - SUBMISSION_REVIEW: 'https://submission-review.topcoder.com', MEMBER: 'https://member.topcoder.com', ONLINE_REVIEW: 'https://software.topcoder.com', PAYMENT_TOOL: 'https://payment.topcoder.com', diff --git a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx index 5ddadf7bac..e12efee81a 100644 --- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx +++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx @@ -10,7 +10,7 @@ import React, { useState } from 'react'; import PT from 'prop-types'; import cn from 'classnames'; import { TABS as DETAIL_TABS } from 'actions/page/challenge-details'; -import { config } from 'topcoder-react-utils'; +import { config, Link } from 'topcoder-react-utils'; import { useMediaQuery } from 'react-responsive'; import ArrowIcon from 'assets/images/ico-arrow-down.svg'; import CloseIcon from 'assets/images/icon-close-green.svg'; @@ -248,14 +248,12 @@ export default function ChallengeViewSelector(props) { } { (hasRegistered && mySubmissions.length > 0) && ( - - SUBMISSION REVIEW - + MY SUBMISSIONS + ) } { From bcb3e31788c34c32bd9f8834cc93080318e51d30 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Thu, 28 Sep 2023 15:19:34 +1000 Subject: [PATCH 2/8] Add configurable ACCESS_CONTROL_ALLOW_ORIGIN header for CDN PROD-4372 --- .circleci/config.yml | 1 + config/default.js | 1 + config/production.js | 1 + src/server/routes/cdn.js | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ca4199330..4dd81b9207 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -350,6 +350,7 @@ workflows: branches: only: - PROD-4183 + - PROD-4372 - changelog # This is alternate dev env for parallel testing - "build-test": diff --git a/config/default.js b/config/default.js index d50de2aec7..a5a369b466 100644 --- a/config/default.js +++ b/config/default.js @@ -25,6 +25,7 @@ module.exports = { /* CDN configuration. */ CDN: { PUBLIC: 'https://d1aahxkjiobka8.cloudfront.net', + ACCESS_CONTROL_ALLOW_ORIGIN: '*.topcoder-dev.com', }, /* Time in MS to wait before refreshing challenge details after register diff --git a/config/production.js b/config/production.js index c372930853..844a62fb54 100644 --- a/config/production.js +++ b/config/production.js @@ -10,6 +10,7 @@ module.exports = { }, CDN: { PUBLIC: 'https://community-app-cdn.topcoder.com', + ACCESS_CONTROL_ALLOW_ORIGIN: '*.topcoder.com', }, COOKIES: { MAXAGE: 7, diff --git a/src/server/routes/cdn.js b/src/server/routes/cdn.js index 61460e024b..d14133afae 100644 --- a/src/server/routes/cdn.js +++ b/src/server/routes/cdn.js @@ -30,7 +30,7 @@ const url = path.resolve(__dirname, '../../../build'); /* Sets Access-Control-Allow-Origin header to avoid CORS error. * TODO: Replace the wildcard value by an appropriate origin filtering. */ router.use('/public/static-assets', (req, res, next) => { - res.set('Access-Control-Allow-Origin', '*'); + res.set('Access-Control-Allow-Origin', `${config.CDN.ACCESS_CONTROL_ALLOW_ORIGIN}`); next(); }, express.static(url), From 00ff23b0e63ff0d8ee7229c0cdd6a4c84686bfc3 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 29 Sep 2023 08:31:46 +1000 Subject: [PATCH 3/8] Update email address for gigwork https://topcoder.atlassian.net/browse/PROD-4388 --- src/shared/components/Gigs/GigDetails/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/Gigs/GigDetails/index.jsx b/src/shared/components/Gigs/GigDetails/index.jsx index cffab15131..8a96a816b1 100644 --- a/src/shared/components/Gigs/GigDetails/index.jsx +++ b/src/shared/components/Gigs/GigDetails/index.jsx @@ -134,7 +134,7 @@ function GigDetails(props) { ** USA Visa Holders - Please consult an attorney before applying to any Topcoder Gig. Some visa statuses will or will not allow you to conduct freelance work with Topcoder. - *** Topcoder and Wipro employees are not eligible for Gig work opportunities. Do not apply and send questions to support@topcoder.com. + *** Topcoder and Wipro employees are not eligible for Gig work opportunities. Do not apply and send questions to gigwork@topcoder.com.
From fef1faed04aafbe846f4cd449663916587527854 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Mon, 2 Oct 2023 08:25:11 +1100 Subject: [PATCH 4/8] Revert "Add configurable ACCESS_CONTROL_ALLOW_ORIGIN header for CDN" This reverts commit bcb3e31788c34c32bd9f8834cc93080318e51d30. --- .circleci/config.yml | 1 - config/default.js | 1 - config/production.js | 1 - src/server/routes/cdn.js | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4dd81b9207..5ca4199330 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -350,7 +350,6 @@ workflows: branches: only: - PROD-4183 - - PROD-4372 - changelog # This is alternate dev env for parallel testing - "build-test": diff --git a/config/default.js b/config/default.js index a5a369b466..d50de2aec7 100644 --- a/config/default.js +++ b/config/default.js @@ -25,7 +25,6 @@ module.exports = { /* CDN configuration. */ CDN: { PUBLIC: 'https://d1aahxkjiobka8.cloudfront.net', - ACCESS_CONTROL_ALLOW_ORIGIN: '*.topcoder-dev.com', }, /* Time in MS to wait before refreshing challenge details after register diff --git a/config/production.js b/config/production.js index 844a62fb54..c372930853 100644 --- a/config/production.js +++ b/config/production.js @@ -10,7 +10,6 @@ module.exports = { }, CDN: { PUBLIC: 'https://community-app-cdn.topcoder.com', - ACCESS_CONTROL_ALLOW_ORIGIN: '*.topcoder.com', }, COOKIES: { MAXAGE: 7, diff --git a/src/server/routes/cdn.js b/src/server/routes/cdn.js index d14133afae..61460e024b 100644 --- a/src/server/routes/cdn.js +++ b/src/server/routes/cdn.js @@ -30,7 +30,7 @@ const url = path.resolve(__dirname, '../../../build'); /* Sets Access-Control-Allow-Origin header to avoid CORS error. * TODO: Replace the wildcard value by an appropriate origin filtering. */ router.use('/public/static-assets', (req, res, next) => { - res.set('Access-Control-Allow-Origin', `${config.CDN.ACCESS_CONTROL_ALLOW_ORIGIN}`); + res.set('Access-Control-Allow-Origin', '*'); next(); }, express.static(url), From d2f56aee3a6a9daf747a07421f1ecd591b307b11 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Mon, 2 Oct 2023 14:58:11 +0300 Subject: [PATCH 5/8] PROD-4399 - remove sprig integration --- config/backup-default.js | 1 - config/default.js | 1 - config/production.js | 1 - package-lock.json | 5 ----- package.json | 1 - src/client/index.jsx | 6 ------ src/shared/containers/SubmissionPage.jsx | 7 ------- 7 files changed, 22 deletions(-) diff --git a/config/backup-default.js b/config/backup-default.js index 0e399b364c..55975b7ddc 100644 --- a/config/backup-default.js +++ b/config/backup-default.js @@ -473,5 +473,4 @@ module.exports = { }, /* development id - makes surveys have warning about environment */ UNIVERSAL_NAV_URL: '//uni-nav.topcoder-dev.com/v1/tc-universal-nav.js', - SPRIG_ENVIRONMENT_ID: 'bUcousVQ0-yF', }; diff --git a/config/default.js b/config/default.js index d50de2aec7..669c9e83e1 100644 --- a/config/default.js +++ b/config/default.js @@ -477,5 +477,4 @@ module.exports = { MEMBER_PROFILE_REDIRECT_URL: 'https://profiles.topcoder-dev.com', MEMBER_SEARCH_REDIRECT_URL: 'https://talent-search.topcoder-dev.com', ACCOUNT_SETTINGS_REDIRECT_URL: 'https://account-settings.topcoder-dev.com', - SPRIG_ENVIRONMENT_ID: 'bUcousVQ0-yF', }; diff --git a/config/production.js b/config/production.js index c372930853..6830f817a0 100644 --- a/config/production.js +++ b/config/production.js @@ -238,6 +238,5 @@ module.exports = { UNIVERSAL_NAV_URL: '//uni-nav.topcoder.com/v1/tc-universal-nav.js', MEMBER_PROFILE_REDIRECT_URL: 'https://profiles.topcoder.com', MEMBER_SEARCH_REDIRECT_URL: 'https://talent-search.topcoder.com', - SPRIG_ENVIRONMENT_ID: 'a-IZBZ6-r7bU', ACCOUNT_SETTINGS_REDIRECT_URL: 'https://account-settings.topcoder.com', }; diff --git a/package-lock.json b/package-lock.json index d613edef86..34d7f5aa0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1445,11 +1445,6 @@ "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" }, - "@sprig-technologies/sprig-browser": { - "version": "2.21.2", - "resolved": "https://registry.npmjs.org/@sprig-technologies/sprig-browser/-/sprig-browser-2.21.2.tgz", - "integrity": "sha512-AT//JgJYaMgnglVPESq5p1LB9zySoA57AnGzC4J7CgZQADMO2zlF22HilxuooMv8G561MfLPIoT3/IXV65HZJQ==" - }, "@tanem/svg-injector": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@tanem/svg-injector/-/svg-injector-1.2.1.tgz", diff --git a/package.json b/package.json index e270dbc3b7..b7df7b4ce7 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "dependencies": { "@hapi/joi": "^16.1.4", "@optimizely/react-sdk": "^2.5.0", - "@sprig-technologies/sprig-browser": "^2.20.1", "@topcoder-platform/tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.4", "aos": "^2.3.4", "atob": "^2.1.1", diff --git a/src/client/index.jsx b/src/client/index.jsx index d2a1e2c024..a239092506 100644 --- a/src/client/index.jsx +++ b/src/client/index.jsx @@ -14,14 +14,9 @@ import { } from '@topcoder-platform/tc-auth-lib'; import { actions, logger, errors } from 'topcoder-react-lib'; import { client, redux, config } from 'topcoder-react-utils'; -import { sprig } from '@sprig-technologies/sprig-browser/dist'; import './styles.scss'; -const Sprig = sprig.configure({ - environmentId: config.SPRIG_ENVIRONMENT_ID, -}); - const { setErrorsStore } = errors; /** @@ -60,7 +55,6 @@ function identify(profile, roles, userIdHash) { integrations: { All: false, Chameleon: true }, }, ); - Sprig('setUserId', profile.handle); } /** diff --git a/src/shared/containers/SubmissionPage.jsx b/src/shared/containers/SubmissionPage.jsx index 43b46c6b4e..f586a6524e 100644 --- a/src/shared/containers/SubmissionPage.jsx +++ b/src/shared/containers/SubmissionPage.jsx @@ -19,11 +19,6 @@ import { connect } from 'react-redux'; import SubmissionsPage from 'components/SubmissionPage'; import AccessDenied, { CAUSE as ACCESS_DENIED_REASON } from 'components/tc-communities/AccessDenied'; import LoadingIndicator from 'components/LoadingIndicator'; -import { sprig } from '@sprig-technologies/sprig-browser/dist'; - -export const Sprig = sprig.configure({ - environmentId: config.SPRIG_ENVIRONMENT_ID, -}); /** * SubmissionsPage Container @@ -71,8 +66,6 @@ class SubmissionsPageContainer extends React.Component { track, } = this.props; - // On final upload, the survey should appear - Sprig('track', 'onUploadSubmission'); submit(tokenV3, tokenV2, challengeId, body, isMM(challenge) ? 'DEVELOP' : track); } From 9297895f1073caf53e44dedf4bd60920a733b007 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Mon, 2 Oct 2023 15:07:00 +0300 Subject: [PATCH 6/8] tests cleanup --- src/client/index.jsx | 2 +- src/shared/containers/SubmissionPage.jsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/index.jsx b/src/client/index.jsx index a239092506..b879711ac2 100644 --- a/src/client/index.jsx +++ b/src/client/index.jsx @@ -13,7 +13,7 @@ import { getFreshToken, } from '@topcoder-platform/tc-auth-lib'; import { actions, logger, errors } from 'topcoder-react-lib'; -import { client, redux, config } from 'topcoder-react-utils'; +import { client, redux } from 'topcoder-react-utils'; import './styles.scss'; diff --git a/src/shared/containers/SubmissionPage.jsx b/src/shared/containers/SubmissionPage.jsx index f586a6524e..80579b39ab 100644 --- a/src/shared/containers/SubmissionPage.jsx +++ b/src/shared/containers/SubmissionPage.jsx @@ -8,7 +8,6 @@ */ import actions from 'actions/page/submission'; import { actions as api } from 'topcoder-react-lib'; -import { config } from 'topcoder-react-utils'; import { isMM } from 'utils/challenge'; import communityActions from 'actions/tc-communities'; import { PrimaryButton } from 'topcoder-react-ui-kit'; From ea7a1ef37fc2210f3819ac57dc51e995ceab7b65 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Tue, 3 Oct 2023 16:31:47 +1100 Subject: [PATCH 7/8] Fix second email location for gig work --- src/shared/components/Gigs/GigDetails/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/Gigs/GigDetails/index.jsx b/src/shared/components/Gigs/GigDetails/index.jsx index 8a96a816b1..282e825842 100644 --- a/src/shared/components/Gigs/GigDetails/index.jsx +++ b/src/shared/components/Gigs/GigDetails/index.jsx @@ -255,7 +255,7 @@ function GigDetails(props) {
-
If you have any questions or doubts, don’t hesitate to email support@topcoder.com.
+
If you have any questions or doubts, don’t hesitate to email gigwork@topcoder.com.
{ isModalOpen From 3a9a745692aa0708882d8eea3d58127be14fcd06 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Wed, 4 Oct 2023 08:08:20 +1100 Subject: [PATCH 8/8] Remove duplicate My Submissions tab on marathon match challenge details https://topcoder.atlassian.net/browse/PROD-3088 --- .../components/challenge-detail/Header/TabSelector/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx index e12efee81a..557a5ebbbb 100644 --- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx +++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx @@ -247,7 +247,7 @@ export default function ChallengeViewSelector(props) { ) : null } { - (hasRegistered && mySubmissions.length > 0) && ( + (hasRegistered && !isMM && mySubmissions && mySubmissions.length > 0) && (