From 7fa4377fe2d59bb88c52994bf85932aaa3621759 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 5 Aug 2020 07:51:50 +0300 Subject: [PATCH 01/24] ci: on dev --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fa18367f07..8dd9b186d5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -231,7 +231,7 @@ workflows: branches: only: - develop - - feature-contentful + - oanh-kiril-tasks # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -252,8 +252,7 @@ workflows: filters: branches: only: - - develop - - feature-contentful + - integration-v5-challenge-api # This is stage env for production QA releases - "build-prod-staging": context : org-global From 1533fcdd690b1585a59566bac4aae9385d4a1176 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 5 Aug 2020 08:08:14 +0300 Subject: [PATCH 02/24] Fixes #4683 --- .../cognitive/GetStarted/index.jsx | 3 -- .../communities/cognitive/Home/index.jsx | 3 -- .../cognitive/IbmCloudPage/index.jsx | 3 -- .../cognitive/NewsSignup/index.jsx | 21 --------- .../cognitive/NewsSignup/theme.scss | 46 ------------------- .../communities/cognitive/Resources/index.jsx | 2 - 6 files changed, 78 deletions(-) delete mode 100644 src/shared/components/tc-communities/communities/cognitive/NewsSignup/index.jsx delete mode 100644 src/shared/components/tc-communities/communities/cognitive/NewsSignup/theme.scss diff --git a/src/shared/components/tc-communities/communities/cognitive/GetStarted/index.jsx b/src/shared/components/tc-communities/communities/cognitive/GetStarted/index.jsx index 06a89d98e4..02ae891b1c 100644 --- a/src/shared/components/tc-communities/communities/cognitive/GetStarted/index.jsx +++ b/src/shared/components/tc-communities/communities/cognitive/GetStarted/index.jsx @@ -20,8 +20,6 @@ import cardImg02 from import MarchMadnessBanner from '../MarchMadnessBanner'; -import NewsSignup from '../NewsSignup'; - import style from './style.scss'; export default function GetStarted({ baseUrl }) { @@ -88,7 +86,6 @@ export default function GetStarted({ baseUrl }) { /> - ); } diff --git a/src/shared/components/tc-communities/communities/cognitive/Home/index.jsx b/src/shared/components/tc-communities/communities/cognitive/Home/index.jsx index 58ff7af8ba..3ff47f6eb3 100644 --- a/src/shared/components/tc-communities/communities/cognitive/Home/index.jsx +++ b/src/shared/components/tc-communities/communities/cognitive/Home/index.jsx @@ -16,7 +16,6 @@ import { config, Link } from 'topcoder-react-utils'; import davePhotoUrl from 'assets/images/communities/cognitive/home/dave.jpg'; import IbmCloudBanner from '../IbmCloudBanner'; -import NewsletterSignup from '../NewsSignup'; import style from './style.scss'; @@ -317,8 +316,6 @@ export default function Home({ - - ); } diff --git a/src/shared/components/tc-communities/communities/cognitive/IbmCloudPage/index.jsx b/src/shared/components/tc-communities/communities/cognitive/IbmCloudPage/index.jsx index d0f62893df..5c0aa6c7ad 100644 --- a/src/shared/components/tc-communities/communities/cognitive/IbmCloudPage/index.jsx +++ b/src/shared/components/tc-communities/communities/cognitive/IbmCloudPage/index.jsx @@ -4,7 +4,6 @@ import React from 'react'; import Differences from './Differences'; import HeadBanner from './HeadBanner'; import JoinBlock from './JoinBlock'; -import NewsSignup from '../NewsSignup'; export default function IbmCloudPage() { return ( @@ -16,8 +15,6 @@ export default function IbmCloudPage() { {/* Hidden by the request from Trevor: the transition process won't start * until Feb 12. */} {/* */} - - ); } diff --git a/src/shared/components/tc-communities/communities/cognitive/NewsSignup/index.jsx b/src/shared/components/tc-communities/communities/cognitive/NewsSignup/index.jsx deleted file mode 100644 index 1f7b3f820a..0000000000 --- a/src/shared/components/tc-communities/communities/cognitive/NewsSignup/index.jsx +++ /dev/null @@ -1,21 +0,0 @@ -import NewsletterSignup from 'components/tc-communities/NewsletterSignup'; -import React from 'react'; -import { config } from 'topcoder-react-utils'; - -import newsletterImg from - 'assets/images/communities/cognitive/newsletter.jpg'; - -import theme from './theme.scss'; - -export default function NewsSignup() { - return ( - - ); -} diff --git a/src/shared/components/tc-communities/communities/cognitive/NewsSignup/theme.scss b/src/shared/components/tc-communities/communities/cognitive/NewsSignup/theme.scss deleted file mode 100644 index f2eea78697..0000000000 --- a/src/shared/components/tc-communities/communities/cognitive/NewsSignup/theme.scss +++ /dev/null @@ -1,46 +0,0 @@ -@import "../themes/mixins"; - -.container { - @include container; - - &::before { - background: none !important; - } -} - -.content { - align-items: flex-end; - display: flex; - flex-direction: column; - position: relative; - margin: auto !important; - max-width: $screen-lg !important; - width: 100%; -} - -.form { - border-radius: 0 !important; - height: 40px !important; -} - -.formButton { - min-width: 125px; -} - -.formEmail { - border-radius: 4px !important; - height: 40px !important; - margin-right: 10px !important; -} - -.text { - @include tc-body-md; - - color: white !important; -} - -.title { - @include tc-heading-lg; - - color: white !important; -} diff --git a/src/shared/components/tc-communities/communities/cognitive/Resources/index.jsx b/src/shared/components/tc-communities/communities/cognitive/Resources/index.jsx index a5615de19b..7f1b6c5dd1 100644 --- a/src/shared/components/tc-communities/communities/cognitive/Resources/index.jsx +++ b/src/shared/components/tc-communities/communities/cognitive/Resources/index.jsx @@ -24,7 +24,6 @@ import MsgsSvg from import { Button, PrimaryButton } from 'topcoder-react-ui-kit'; import FaqItem from './FaqItem'; -import NewsSignup from '../NewsSignup'; import style from './style.scss'; @@ -324,7 +323,6 @@ export default function Resources({ - ); } From 3fecfcf1284bf6876a3182cf2446212365c2937b Mon Sep 17 00:00:00 2001 From: Cagdas U Date: Thu, 3 Sep 2020 15:49:21 +0300 Subject: [PATCH 03/24] fix(submission-management): missing `Add Submission` button --- .../SubmissionManagement/SubmissionManagement/index.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx index 898ec91183..2cb1a25330 100644 --- a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx +++ b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx @@ -19,6 +19,7 @@ import React from 'react'; import PT from 'prop-types'; import moment from 'moment'; import { PrimaryButton } from 'topcoder-react-ui-kit'; +import { phaseEndDate } from 'utils/challenge-listing/helper'; import SubmissionsTable from '../SubmissionsTable'; import style from './styles.scss'; @@ -47,6 +48,8 @@ export default function SubmissionManagement(props) { const currentPhase = challenge.phases .filter(p => p.name !== 'Registration' && p.isOpen) .sort((a, b) => moment(a.scheduledEndDate).diff(b.scheduledEndDate))[0]; + const submissionPhase = challenge.phases.filter(p => p.name === 'Submission')[0]; + const submissionEndDate = submissionPhase && phaseEndDate(submissionPhase); const now = moment(); const end = moment(currentPhase.scheduledEndDate); @@ -159,7 +162,7 @@ export default function SubmissionManagement(props) { ) } - {now.isBefore(challenge.submissionEndDate) && ( + {now.isBefore(submissionEndDate) && (
Date: Thu, 3 Sep 2020 17:51:39 +0300 Subject: [PATCH 04/24] fix(challenge-detail): condition for showing thrive articles Fix a typo in if condition used to show thrive articles. - It was showing them only for the Design track. - Articles will be shown for all tracks except for the Design track. References topcoder-platform/community-app#4765 --- src/shared/containers/challenge-detail/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx index 3bb14e4c1b..bb3c1e9dbb 100644 --- a/src/shared/containers/challenge-detail/index.jsx +++ b/src/shared/containers/challenge-detail/index.jsx @@ -244,7 +244,7 @@ class ChallengeDetailPageContainer extends React.Component { } const { track } = nextProps.challenge; - if (track === COMPETITION_TRACKS.DESIGN && thriveArticles.length === 0) { + if (track !== COMPETITION_TRACKS.DESIGN && thriveArticles.length === 0) { // filter all tags with value 'Other' const tags = _.filter(nextProps.challenge.tags, tag => tag !== 'Other'); if (tags.length > 0) { From 0e221c8d4296edd34ffb62d68c64302249564a18 Mon Sep 17 00:00:00 2001 From: narekcat Date: Thu, 3 Sep 2020 20:58:43 +0400 Subject: [PATCH 05/24] fix: for issue #4756 --- src/shared/containers/challenge-detail/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx index 3bb14e4c1b..ca38b67a9b 100644 --- a/src/shared/containers/challenge-detail/index.jsx +++ b/src/shared/containers/challenge-detail/index.jsx @@ -558,8 +558,8 @@ class ChallengeDetailPageContainer extends React.Component { hasRegistered={challenge.isRegistered} unregistering={unregistering} submissionEnded={submissionEnded} - isMM - isLegacyMM + isMM={isMM} + isLegacyMM={isLegacyMM} loadingMMSubmissionsForChallengeId={loadingMMSubmissionsForChallengeId} auth={auth} loadMMSubmissions={loadMMSubmissions} From 5503702230d8ea780d2775052e95768685a24daa Mon Sep 17 00:00:00 2001 From: Cagdas U Date: Thu, 3 Sep 2020 20:17:39 +0300 Subject: [PATCH 06/24] fix(submission-management): add null checking for `currentPhase` --- .../SubmissionManagement/index.jsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx index 898ec91183..1282c6de66 100644 --- a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx +++ b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx @@ -49,7 +49,7 @@ export default function SubmissionManagement(props) { .sort((a, b) => moment(a.scheduledEndDate).diff(b.scheduledEndDate))[0]; const now = moment(); - const end = moment(currentPhase.scheduledEndDate); + const end = moment(currentPhase && currentPhase.scheduledEndDate); const diff = end.isAfter(now) ? end.diff(now) : 0; const timeLeft = moment.duration(diff); @@ -78,9 +78,13 @@ export default function SubmissionManagement(props) {
-

- {currentPhase.name} -

+ { + currentPhase && ( +

+ {currentPhase.name} +

+ ) + } { challenge.status !== 'COMPLETED' ? (
@@ -111,7 +115,7 @@ export default function SubmissionManagement(props) { Manage your submissions

{ - isDesign && ( + isDesign && currentPhase && (

{currentPhase.name} From 7a3c5130f530942d14c5a3c85b1ef6388057d612 Mon Sep 17 00:00:00 2001 From: Cagdas U Date: Fri, 4 Sep 2020 06:14:37 +0300 Subject: [PATCH 07/24] fix(submission-management): `challenge.status` at conditional check Fix `challenge.status` at conditional check. The status property of a completed challenge was `COMPLETED` before, it's `Completed` anymore. --- .../SubmissionManagement/SubmissionManagement/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx index 1282c6de66..0e0edb7a26 100644 --- a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx +++ b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx @@ -86,7 +86,7 @@ export default function SubmissionManagement(props) { ) } { - challenge.status !== 'COMPLETED' ? ( + challenge.status !== 'Completed' ? (

{days > 0 && (`${days}D`)} From 83352cf5320eb0e1c1845b0879778717b5a3d366 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Fri, 4 Sep 2020 01:04:15 -0300 Subject: [PATCH 08/24] fix: for #4752 Issue: #4752 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d284ae8360..d5717d74d6 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1.0.3", + "topcoder-react-lib": "1000.22.2", "topcoder-react-ui-kit": "2.0.0", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From 7ac1ae334e3a4c1a446aad42b34c4ad2c0fc8766 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Fri, 4 Sep 2020 01:09:55 -0300 Subject: [PATCH 09/24] Deploy milestone-v1.3 to Dev and Staging Issues: #4752 #4765 #4755 #4758 --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d9e4f88a90..ee2920c93c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -230,7 +230,7 @@ workflows: filters: branches: only: - - feature-contentful + - milestone-v1.3 # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -259,7 +259,7 @@ workflows: filters: branches: only: - - feature-contentful + - milestone-v1.3 - develop # Production builds are exectuted # when PR is merged to the master From 9459936cd215a5ba4624defdb4a81cf6fd73978c Mon Sep 17 00:00:00 2001 From: Cagdas U Date: Sat, 5 Sep 2020 10:23:54 +0300 Subject: [PATCH 10/24] fix(profile-page): wrong MM url at history graph --- src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx b/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx index 21112b3aa3..9e7034c9a4 100644 --- a/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx +++ b/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx @@ -211,7 +211,7 @@ export default class HistoryGraph extends React.Component { } if (track === 'DATA_SCIENCE') { if (subTrack === 'MARATHON_MATCH') { - return `/challenges/${challengeId}`; + return `${config.URL.COMMUNITY}/tc?module=MatchDetails&rd=${challengeId}`; } if (subTrack === 'SRM') { return `${config.URL.COMMUNITY}/stat?c=round_overview&rd=${challengeId}`; From bf0c810d1d9591a7c6c825465268b458d43be0dc Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Mon, 7 Sep 2020 10:54:09 +0530 Subject: [PATCH 11/24] fix: for topgear submission page --- src/server/tc-communities/wipro/metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/tc-communities/wipro/metadata.json b/src/server/tc-communities/wipro/metadata.json index fed156fca6..d0c89c5dce 100644 --- a/src/server/tc-communities/wipro/metadata.json +++ b/src/server/tc-communities/wipro/metadata.json @@ -3,7 +3,7 @@ "20000000", "20000005", "20000011", "20000016" ], "challengeFilter": { - "groupIds": ["20000000"] + "groupIds": ["b7f7c0f8-8ee8-409e-9e5c-33404983b635"] }, "challengeListing": { "ignoreCommunityFilterByDefault": true, @@ -11,7 +11,7 @@ }, "communityId": "wipro", "communityName": "TopGear Community", - "groupIds": ["20000000"], + "groupIds": ["b7f7c0f8-8ee8-409e-9e5c-33404983b635"], "leaderboardApiUrl": "https://api.topcoder.com/v4/looks/458/run/json/", "logos": [{ "img": "/community-app-assets/themes/wipro/wipro-logo.png", From dcbf32eb721b7217ffe7b73de87e767c3e6842bc Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Mon, 7 Sep 2020 04:00:40 -0300 Subject: [PATCH 12/24] Fix Topgear submissions page --- src/shared/components/SubmissionPage/Submit/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/SubmissionPage/Submit/index.jsx b/src/shared/components/SubmissionPage/Submit/index.jsx index 93350f7353..6f6f558d23 100644 --- a/src/shared/components/SubmissionPage/Submit/index.jsx +++ b/src/shared/components/SubmissionPage/Submit/index.jsx @@ -150,8 +150,8 @@ class Submit extends React.Component { const topGearCommunity = _.find(communitiesList.data, { mainSubdomain: 'topgear' }); if (topGearCommunity) { // check the group info match with group list - _.forOwn(groups, (value, key) => { - if (value && _.includes(topGearCommunity.groupIds, key)) { + _.forOwn(groups, (value) => { + if (value && _.includes(topGearCommunity.groupIds, value)) { isChallengeBelongToTopgearGroup = true; return false; } From 5604c6cd4a88c97490a409ea666952dbaa0414f0 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Mon, 7 Sep 2020 04:48:59 -0300 Subject: [PATCH 13/24] fix: for #4787 Issue: https://github.com/topcoder-platform/community-app/issues/4787 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d284ae8360..ae87ddb95a 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1.0.3", + "topcoder-react-lib": "1000.22.3", "topcoder-react-ui-kit": "2.0.0", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From fd0381a58ccfc346effc5e0e975dfecc1b96eef9 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Mon, 7 Sep 2020 05:11:02 -0300 Subject: [PATCH 14/24] Deploy milestone-20200910 to Dev and Staging Issues: #4760 #4787 #4844 --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d9e4f88a90..dedb9c7354 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -230,7 +230,7 @@ workflows: filters: branches: only: - - feature-contentful + - milestone-20200910 # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -259,7 +259,7 @@ workflows: filters: branches: only: - - feature-contentful + - milestone-20200910 - develop # Production builds are exectuted # when PR is merged to the master From 539853df098fa40175c68a7f0fd8d54a349e1dee Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Mon, 7 Sep 2020 10:30:45 -0300 Subject: [PATCH 15/24] Revert "fix: for topgear submission page" This reverts commit bf0c810d1d9591a7c6c825465268b458d43be0dc. --- src/server/tc-communities/wipro/metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/tc-communities/wipro/metadata.json b/src/server/tc-communities/wipro/metadata.json index d0c89c5dce..fed156fca6 100644 --- a/src/server/tc-communities/wipro/metadata.json +++ b/src/server/tc-communities/wipro/metadata.json @@ -3,7 +3,7 @@ "20000000", "20000005", "20000011", "20000016" ], "challengeFilter": { - "groupIds": ["b7f7c0f8-8ee8-409e-9e5c-33404983b635"] + "groupIds": ["20000000"] }, "challengeListing": { "ignoreCommunityFilterByDefault": true, @@ -11,7 +11,7 @@ }, "communityId": "wipro", "communityName": "TopGear Community", - "groupIds": ["b7f7c0f8-8ee8-409e-9e5c-33404983b635"], + "groupIds": ["20000000"], "leaderboardApiUrl": "https://api.topcoder.com/v4/looks/458/run/json/", "logos": [{ "img": "/community-app-assets/themes/wipro/wipro-logo.png", From 9a21345cde628637f4ad35b200c198ec9d3b5d48 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Tue, 8 Sep 2020 16:24:59 +0530 Subject: [PATCH 16/24] fix: smoke release #4844, #4760, #4752, #4765, #4755, #4756 and #4758 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae87ddb95a..a79f47a173 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1000.22.3", + "topcoder-react-lib": "1000.22.4", "topcoder-react-ui-kit": "2.0.0", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From 0318d1320c5088b21b83a2be823077282fdccbc0 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Tue, 8 Sep 2020 18:40:41 +0530 Subject: [PATCH 17/24] fix: prod release 2020-09-08 (v1.1.4) Release 2020-09-08 (v1.1.4) #4844, #4760, #4752, #4765, #4755, #4756 and #4758 #4683 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a79f47a173..c02656c845 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1000.22.4", + "topcoder-react-lib": "1.0.4", "topcoder-react-ui-kit": "2.0.0", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From 2451ca2a9e5c438157f3b60959a8d08e95cefda2 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Wed, 9 Sep 2020 22:07:37 -0300 Subject: [PATCH 18/24] fix: for #4441 Issue: https://github.com/topcoder-platform/community-app/issues/4441 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c02656c845..423ef63106 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "moment-timezone": "^0.5.21", "money": "^0.2.0", "morgan": "^1.9.0", - "navigation-component": "topcoder-platform/navigation-component#develop", + "navigation-component": "topcoder-platform/navigation-component#milestone-20200917", "node-forge": "^0.7.5", "nuka-carousel": "^4.5.3", "postcss": "^6.0.23", From a883d4bc378f898ba74f4c4ff8c33d5ebb824ec9 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Wed, 9 Sep 2020 23:40:57 -0300 Subject: [PATCH 19/24] fix: for #4441 Issue: https://github.com/topcoder-platform/community-app/issues/4441 PR: https://github.com/topcoder-platform/navigation-component/pull/181 --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 00fe48889e..88bb4518eb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -230,6 +230,7 @@ workflows: filters: branches: only: + - milestone-20200917 - develop # This is alternate dev env for parallel testing - "build-test": @@ -262,6 +263,7 @@ workflows: only: - milestone-v1.3 - milestone-20200910 + - milestone-20200917 - develop # Production builds are exectuted # when PR is merged to the master From 16bd8dc97eecc55c00c896a8db2b7fcd9cc4f935 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Thu, 10 Sep 2020 15:34:03 +0530 Subject: [PATCH 20/24] fix: changed nav comp branch --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 423ef63106..c02656c845 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "moment-timezone": "^0.5.21", "money": "^0.2.0", "morgan": "^1.9.0", - "navigation-component": "topcoder-platform/navigation-component#milestone-20200917", + "navigation-component": "topcoder-platform/navigation-component#develop", "node-forge": "^0.7.5", "nuka-carousel": "^4.5.3", "postcss": "^6.0.23", From 227c600fd151d8971b5d46d870ffc91bff33679e Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 14 Sep 2020 11:22:27 +0300 Subject: [PATCH 21/24] Fixes for #4887 --- .../components/Contentful/Article/Article.jsx | 23 ++++++++++++++++++- src/shared/containers/EDU/Home.jsx | 8 +++++++ src/shared/containers/EDU/Search.jsx | 8 +++++++ src/shared/containers/EDU/Tracks.jsx | 8 +++++++ 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/shared/components/Contentful/Article/Article.jsx b/src/shared/components/Contentful/Article/Article.jsx index 150d213290..c9078713ea 100644 --- a/src/shared/components/Contentful/Article/Article.jsx +++ b/src/shared/components/Contentful/Article/Article.jsx @@ -15,7 +15,10 @@ import LoadingIndicator from 'components/LoadingIndicator'; import YouTubeVideo from 'components/YouTubeVideo'; import moment from 'moment'; import localStorage from 'localStorage'; -import { config, Link, isomorphy } from 'topcoder-react-utils'; +import { Helmet } from 'react-helmet'; +import { + config, Link, isomorphy, +} from 'topcoder-react-utils'; import qs from 'qs'; // SVGs and assets import GestureIcon from 'assets/images/icon-gesture.svg'; @@ -110,9 +113,27 @@ export default class Article extends React.Component { if (isomorphy.isClientSide()) { shareUrl = encodeURIComponent(window.location.href); } + const description = htmlToText.fromString( + ReactDOMServer.renderToString(markdown(fields.content)), + { + ignoreHref: true, + ignoreImage: true, + singleNewLineParagraphs: true, + uppercaseHeadings: false, + }, + ).substring(0, CONTENT_PREVIEW_LENGTH); return ( + + {fields.title} + + + + + + + {/* Banner */} { fields.featuredImage ? ( diff --git a/src/shared/containers/EDU/Home.jsx b/src/shared/containers/EDU/Home.jsx index 275efaab6c..30c8455a26 100644 --- a/src/shared/containers/EDU/Home.jsx +++ b/src/shared/containers/EDU/Home.jsx @@ -3,6 +3,7 @@ */ import React from 'react'; import { config } from 'topcoder-react-utils'; +import { Helmet } from 'react-helmet'; import Viewport from 'components/Contentful/Viewport'; import SearchBar from 'components/Contentful/SearchBar/SearchBar'; import { getService } from 'services/contentful'; @@ -45,6 +46,13 @@ export default class EDUHome extends React.Component { const { taxonomy } = this.state; return (

+ + THRIVE - Grow with us. Tutorials and workshops that matter. + + + + + {/* Banner */}
diff --git a/src/shared/containers/EDU/Search.jsx b/src/shared/containers/EDU/Search.jsx index b49128c77a..6b311aa68e 100644 --- a/src/shared/containers/EDU/Search.jsx +++ b/src/shared/containers/EDU/Search.jsx @@ -13,6 +13,7 @@ import { updateQuery } from 'utils/url'; import qs from 'qs'; import LoadingIndicator from 'components/LoadingIndicator'; import SearchPageFilter from 'components/Contentful/SearchPageFilter/SearchPageFilter'; +import { Helmet } from 'react-helmet'; // Partials import ResultTabs from './partials/ResultTabs'; // CSS @@ -91,6 +92,13 @@ export default class EDUSearch extends React.Component { if (!taxonomy) return ; return (
+ + THRIVE - Search {`${query.title}`} + + + + + {/* Banner */}
diff --git a/src/shared/containers/EDU/Tracks.jsx b/src/shared/containers/EDU/Tracks.jsx index 0a1b4c8398..d98099191e 100644 --- a/src/shared/containers/EDU/Tracks.jsx +++ b/src/shared/containers/EDU/Tracks.jsx @@ -14,6 +14,7 @@ import qs from 'qs'; import TracksTree from 'components/Contentful/TracksTree/TracksTree'; import LoadingIndicator from 'components/LoadingIndicator'; import TracksFilter from 'components/Contentful/TracksFilter/TracksFilter'; +import { Helmet } from 'react-helmet'; // SVGs & Assets import Dev from 'assets/images/img-development.png'; import Design from 'assets/images/img_design.png'; @@ -167,6 +168,13 @@ export default class EDUTracks extends React.Component { if (!taxonomy) return ; return (
+ + THRIVE - {`${query.track}`} + + + + + {/* Banner */}
Date: Mon, 14 Sep 2020 12:22:27 +0300 Subject: [PATCH 22/24] Fixes for #4888 --- .../Contentful/SearchBar/SearchBar.jsx | 47 +++++++++++++++++-- .../Contentful/SearchBar/themes/default.scss | 4 ++ .../containers/EDU/partials/ResultTabs.jsx | 6 +-- 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/src/shared/components/Contentful/SearchBar/SearchBar.jsx b/src/shared/components/Contentful/SearchBar/SearchBar.jsx index 9444c56777..1ffecbb36d 100644 --- a/src/shared/components/Contentful/SearchBar/SearchBar.jsx +++ b/src/shared/components/Contentful/SearchBar/SearchBar.jsx @@ -56,6 +56,7 @@ export class SearchBarInner extends Component { this.getSuggestionList = this.getSuggestionList.bind(this); this.handleSearchChange = this.handleSearchChange.bind(this); this.handleClickOutside = this.handleClickOutside.bind(this); + this.onKeyDown = this.onKeyDown.bind(this); // using debounce to avoid processing or requesting too much this.updateSuggestionListWithNewSearch = _.debounce( this.updateSuggestionListWithNewSearch.bind(this), 400, @@ -71,6 +72,29 @@ export class SearchBarInner extends Component { document.removeEventListener('mousedown', this.handleClickOutside); } + onKeyDown(e) { + const { inputlVal, selectedFilter } = this.state; + if (inputlVal && e.which === 13) { + const searchQuery = {}; + if (this.searchFieldRef && this.searchFieldRef.value) { + if (selectedFilter.name === 'Tags') { + searchQuery.tags = [this.searchFieldRef.value]; + } + if (selectedFilter.name === 'All') { + searchQuery.phrase = this.searchFieldRef.value; + } + if (selectedFilter.name === 'Title') { + searchQuery.title = this.searchFieldRef.value; + } + } + if (selectedFilter.name !== 'Author') { + window.location.href = `${config.TC_EDU_BASE_PATH}${config.TC_EDU_SEARCH_PATH}?${qs.stringify(searchQuery)}`; + } else { + window.location.href = `${config.TC_EDU_BASE_PATH}${config.TC_EDU_SEARCH_PATH}?author=${inputlVal}`; + } + } + } + /** * Set the search field ref */ @@ -136,6 +160,7 @@ export class SearchBarInner extends Component { isShowSuggestion, suggestionList, selectedFilter, + noResults, } = this.state; const searchQuery = {}; @@ -151,7 +176,8 @@ export class SearchBarInner extends Component { } } - return (suggestionList && !_.isEmpty(suggestionList) && isShowSuggestion && ( + // eslint-disable-next-line no-nested-ternary + return suggestionList && !_.isEmpty(suggestionList) && isShowSuggestion ? (
- )); + ) : noResults ? ( +
+ No Results +
+ ) : null; } handleClickOutside(e) { @@ -379,7 +412,10 @@ export class SearchBarInner extends Component { .then((results) => { // Nothing found? if (!results.total) { - this.setState({ suggestionList: {} }); + this.setState({ + suggestionList: {}, + noResults: true, + }); return; } // Author query? @@ -387,7 +423,7 @@ export class SearchBarInner extends Component { const suggestionList = { Author: _.map(results.items, item => ({ ...item.fields })), }; - this.setState({ suggestionList }); + this.setState({ suggestionList, noResults: false }); return; } // ALL && Tags @@ -395,7 +431,7 @@ export class SearchBarInner extends Component { this.setState({ suggestionList }); }); } else { - this.setState({ suggestionList: {} }); + this.setState({ suggestionList: {}, noResults: false }); } } @@ -471,6 +507,7 @@ export class SearchBarInner extends Component { document.addEventListener('mousedown', this.handleClickOutside); }} onChange={this.handleSearchChange} + onKeyDown={this.onKeyDown} />
- ) : (

Nothing Found

) + ) : (

No results found

) } { videos.total > videos.items.length ? ( @@ -225,7 +225,7 @@ export default class ResultTabs extends React.Component { /> ); }) - ) : (

Nothing Found

) + ) : (

No results found

) } { posts.total > posts.items.length ? ( From b83393204453ae36ee377bfbb45acaae49ebe7d6 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 14 Sep 2020 12:30:54 +0300 Subject: [PATCH 23/24] Fix #4896 --- src/shared/components/Contentful/SearchBar/SearchBar.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/components/Contentful/SearchBar/SearchBar.jsx b/src/shared/components/Contentful/SearchBar/SearchBar.jsx index 1ffecbb36d..d23301d0ed 100644 --- a/src/shared/components/Contentful/SearchBar/SearchBar.jsx +++ b/src/shared/components/Contentful/SearchBar/SearchBar.jsx @@ -455,6 +455,7 @@ export class SearchBarInner extends Component { contentAuthor: contentAuthor.fields, externalArticle: fields.externalArticle, contentUrl: fields.contentUrl, + slug: fields.slug, }; }), 'type', From 21576ee445530c23067433f5a3f734354028594e Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 14 Sep 2020 14:21:07 +0300 Subject: [PATCH 24/24] Fix #4889 --- src/shared/services/contentful.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/services/contentful.js b/src/shared/services/contentful.js index 4508f76d6d..60fc4a5a50 100644 --- a/src/shared/services/contentful.js +++ b/src/shared/services/contentful.js @@ -346,8 +346,8 @@ class Service { query.query = tags.join(' '); } } - if (startDate) query['sys.createdAt[gte]'] = startDate; - if (endDate) query['sys.createdAt[lte]'] = endDate; + if (startDate) query['fields.creationDate[gte]'] = startDate; + if (endDate) query['fields.creationDate[lte]'] = endDate; if (phrase) query.query = phrase; if (title) query['fields.title[match]'] = title; const content = {};