From 774f8c74df17a63c645c24be57fda8ff660d13ff Mon Sep 17 00:00:00 2001 From: rashmi73 <41687423+rashmi73@users.noreply.github.com> Date: Thu, 10 Sep 2020 04:35:25 +0530 Subject: [PATCH 01/13] Update FilterPanel.jsx --- src/shared/containers/challenge-listing/FilterPanel.jsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/shared/containers/challenge-listing/FilterPanel.jsx b/src/shared/containers/challenge-listing/FilterPanel.jsx index 7fe064ce44..c161b03d44 100644 --- a/src/shared/containers/challenge-listing/FilterPanel.jsx +++ b/src/shared/containers/challenge-listing/FilterPanel.jsx @@ -64,12 +64,6 @@ export class Container extends React.Component { const query = qs.parse(window.location.search.slice(1)); if (query.filter && !filterState.track) { setFilterState(query.filter); - } else { - const trackStatus = localStorage.getItem('trackStatus'); - const filterObj = trackStatus ? JSON.parse(trackStatus) : null; - if (filterObj) { - setFilterState(filterObj); - } } } From 8227ebd1b9b1ea6f3e8b319ebe08d3bc33450c73 Mon Sep 17 00:00:00 2001 From: rashmi73 <41687423+rashmi73@users.noreply.github.com> Date: Thu, 10 Sep 2020 19:58:37 +0530 Subject: [PATCH 02/13] Update ChallengeFilters.jsx --- .../components/challenge-listing/Filters/ChallengeFilters.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx b/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx index 2ed2b5684d..cdb32d3e76 100644 --- a/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx +++ b/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx @@ -8,7 +8,6 @@ import { challenge as challengeUtils } from 'topcoder-react-lib'; import { COMPETITION_TRACKS as TRACKS } from 'utils/tc'; import _ from 'lodash'; -import localStorage from 'localStorage'; import ChallengeSearchBar from './ChallengeSearchBar'; import EditTrackPanel from './EditTrackPanel'; import FiltersIcon from './FiltersSwitch/filters-icon.svg'; @@ -55,7 +54,6 @@ export default function ChallengeFilters({ const act = on ? Filter.addTrack : Filter.removeTrack; const filterObj = act(filterState, track); const newFilterObj = _.pick(filterObj, 'tracks'); - localStorage.setItem('trackStatus', JSON.stringify(newFilterObj)); setFilterState(filterObj); }; From fe9e708007ddd759c17cef19ec963f2bdba9fa20 Mon Sep 17 00:00:00 2001 From: rashmi73 <41687423+rashmi73@users.noreply.github.com> Date: Thu, 10 Sep 2020 20:01:02 +0530 Subject: [PATCH 03/13] Update index.jsx --- .../components/challenge-listing/Filters/FiltersPanel/index.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx index a3320e0735..a5f71d344b 100644 --- a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx +++ b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx @@ -349,7 +349,6 @@ export default function FiltersPanel({ setFilterState({}); selectCommunity(defaultCommunityId); setSearchText(''); - localStorage.setItem('trackStatus', JSON.stringify({})); }} size="sm" theme={{ button: style.button }} From 01405d9e92e0d869a690e0cc91a97b1881d103e4 Mon Sep 17 00:00:00 2001 From: rashmi73 <41687423+rashmi73@users.noreply.github.com> Date: Thu, 10 Sep 2020 20:01:52 +0530 Subject: [PATCH 04/13] Update FilterPanel.jsx --- src/shared/containers/challenge-listing/FilterPanel.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shared/containers/challenge-listing/FilterPanel.jsx b/src/shared/containers/challenge-listing/FilterPanel.jsx index c161b03d44..df1a09565d 100644 --- a/src/shared/containers/challenge-listing/FilterPanel.jsx +++ b/src/shared/containers/challenge-listing/FilterPanel.jsx @@ -10,7 +10,6 @@ import shortId from 'shortid'; import FilterPanel from 'components/challenge-listing/Filters/ChallengeFilters'; import PT from 'prop-types'; import React from 'react'; -import localStorage from 'localStorage'; import sidebarActions from 'actions/challenge-listing/sidebar'; import { BUCKETS, isReviewOpportunitiesBucket } from 'utils/challenge-listing/buckets'; import { bindActionCreators } from 'redux'; From 1310b69f5b1d3e0e2251d04da1f9ca05054c04d5 Mon Sep 17 00:00:00 2001 From: rashmi73 <41687423+rashmi73@users.noreply.github.com> Date: Thu, 10 Sep 2020 20:12:56 +0530 Subject: [PATCH 05/13] Update ChallengeFilters.jsx --- .../components/challenge-listing/Filters/ChallengeFilters.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx b/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx index cdb32d3e76..249582b835 100644 --- a/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx +++ b/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx @@ -53,7 +53,6 @@ export default function ChallengeFilters({ const switchTrack = (track, on) => { const act = on ? Filter.addTrack : Filter.removeTrack; const filterObj = act(filterState, track); - const newFilterObj = _.pick(filterObj, 'tracks'); setFilterState(filterObj); }; From ed9025efb693193ca53158c9c7b2cd2a3c54a243 Mon Sep 17 00:00:00 2001 From: rashmi73 <41687423+rashmi73@users.noreply.github.com> Date: Thu, 10 Sep 2020 20:19:12 +0530 Subject: [PATCH 06/13] Update ChallengeFilters.jsx --- .../components/challenge-listing/Filters/ChallengeFilters.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx b/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx index 249582b835..4866ffdd4e 100644 --- a/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx +++ b/src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx @@ -6,7 +6,6 @@ import PT from 'prop-types'; import SwitchWithLabel from 'components/SwitchWithLabel'; import { challenge as challengeUtils } from 'topcoder-react-lib'; import { COMPETITION_TRACKS as TRACKS } from 'utils/tc'; -import _ from 'lodash'; import ChallengeSearchBar from './ChallengeSearchBar'; import EditTrackPanel from './EditTrackPanel'; From f22bd8b2490c155e986335c26fa2456f501f23db Mon Sep 17 00:00:00 2001 From: narekcat Date: Thu, 10 Sep 2020 19:04:45 +0400 Subject: [PATCH 07/13] fix: for issue #2069 --- .../Stats/SubTrackChallengeView/index.jsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx b/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx index 1fadb2a65f..961606ce5f 100644 --- a/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx +++ b/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx @@ -116,7 +116,7 @@ class SubTrackChallengeView extends React.Component { this.state = { // this is current page number. starts with 0. // everytime we scroll at the bottom, we query from offset = pageNum * CHALLENGE_PER_PAGE - pageNum: 0, + pageNum: 1, // which challenge's modal should be poped. null means no modal challengeIndexToPopModal: null, }; @@ -140,6 +140,10 @@ class SubTrackChallengeView extends React.Component { userId, } = this.props; + const { + pageNum, + } = this.state; + if (track === 'DEVELOP' || track === 'DESIGN') { if (!loadingSubTrackChallengesUUID) { loadSubtrackChallenges( @@ -159,7 +163,7 @@ class SubTrackChallengeView extends React.Component { } } else if (subTrack === 'MARATHON_MATCH') { if (!loadingMarathonUUID) { - loadMarathon(handle, auth.tokenV3, 0, CHALLENGE_PER_PAGE, true); + loadMarathon(handle, userId, auth.tokenV3, pageNum, CHALLENGE_PER_PAGE, true); } } } @@ -209,7 +213,7 @@ class SubTrackChallengeView extends React.Component { } } else if (subTrack === 'MARATHON_MATCH') { if (!loadingMarathonUUID) { - loadMarathon(handle, auth.tokenV3, pageNum + 1, CHALLENGE_PER_PAGE, false); + loadMarathon(handle, userId, auth.tokenV3, pageNum + 1, CHALLENGE_PER_PAGE, false); this.setState({ pageNum: pageNum + 1 }); } } @@ -347,7 +351,6 @@ class SubTrackChallengeView extends React.Component { userMarathons, item => ({ ...item, - submissionEndDate: _.get(item, 'rounds.0.systemTestEndAt'), pointTotal: _.get(item, 'rounds.0.userMMDetails.pointTotal'), }), ); @@ -440,10 +443,18 @@ function mapDispatchToProps(dispatch) { dispatch(action.getUserSrmInit(handle, uuid)); dispatch(action.getUserSrmDone(uuid, handle, tokenV3, pageNum, pageSize, refresh)); }, - loadMarathon: (handle, tokenV3, pageNum, pageSize, refresh) => { + loadMarathon: (handle, memberId, tokenV3, pageNum, pageSize, refresh) => { const uuid = shortId(); dispatch(action.getUserMarathonInit(handle, uuid)); - dispatch(action.getUserMarathonDone(uuid, handle, tokenV3, pageNum, pageSize, refresh)); + dispatch(action.getUserMarathonDone( + uuid, + handle, + memberId, + tokenV3, + pageNum, + pageSize, + refresh, + )); }, }; } From 1c919484fe538eabca0c25717688498aba405b15 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Sun, 13 Sep 2020 17:03:58 -0300 Subject: [PATCH 08/13] fix: for issue #2069 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae87ddb95a..1c34045e62 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.5", "topcoder-react-ui-kit": "2.0.0", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From 09f4c8b41fd1b88bcbd5bfef8f099f940bae911a Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Sun, 13 Sep 2020 17:42:09 -0300 Subject: [PATCH 09/13] Hide RSS feature from front-end --- .../challenge-listing/Sidebar/BucketSelector/index.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/components/challenge-listing/Sidebar/BucketSelector/index.jsx b/src/shared/components/challenge-listing/Sidebar/BucketSelector/index.jsx index 3f267d87c3..66d7ea6988 100644 --- a/src/shared/components/challenge-listing/Sidebar/BucketSelector/index.jsx +++ b/src/shared/components/challenge-listing/Sidebar/BucketSelector/index.jsx @@ -15,7 +15,8 @@ import './style.scss'; const Filter = challengeUtils.filter; -const RSS_LINK = 'http://feeds.topcoder.com/challenges/feed?list=active&contestType=all'; +// DISABLED: Until feeds.topcoder.com domain fixed community-app#4606 +// const RSS_LINK = 'http://feeds.topcoder.com/challenges/feed?list=active&contestType=all'; export default function BucketSelector({ activeBucket, @@ -109,11 +110,14 @@ export default function BucketSelector({ ) : '' }
+ {/* DISABLED: Until feeds.topcoder.com domain fixed community-app#4606 */} + {/*
Get the RSS feed
+ */} ); } From 5b5bb81933a8cbdb698b031a6f43b56d81d47acb Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Sun, 13 Sep 2020 18:43:10 -0300 Subject: [PATCH 10/13] Deploy milestone-20200917 to Dev and Stag Issues: #2069 #4898 --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6180803b84..b115284c8b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -260,6 +260,7 @@ workflows: filters: branches: only: + - milestone-20200917 - develop # Production builds are exectuted # when PR is merged to the master From 77ea49402f5a9cde80e8b53dafcde4837247dcce Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Sun, 13 Sep 2020 23:59:27 -0300 Subject: [PATCH 11/13] fix: for issue #2069 Issue: #2069 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a36e009ab..903a2f69fa 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.5", + "topcoder-react-lib": "1000.22.6", "topcoder-react-ui-kit": "2.0.0", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From 3fba9206797344b3e7bd8859c8e0e92f1fd75293 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Mon, 14 Sep 2020 04:37:26 -0300 Subject: [PATCH 12/13] ChallengeTile: Fix MM link to Challenge details page --- .../ChallengeTile/__snapshots__/index.jsx.snap | 11 +++++++---- src/shared/components/ChallengeTile/index.jsx | 18 ++++-------------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/__tests__/shared/components/ChallengeTile/__snapshots__/index.jsx.snap b/__tests__/shared/components/ChallengeTile/__snapshots__/index.jsx.snap index 26ba777088..c733309a43 100644 --- a/__tests__/shared/components/ChallengeTile/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/ChallengeTile/__snapshots__/index.jsx.snap @@ -202,12 +202,15 @@ exports[`renders marathon 1`] = ` className="src-shared-components-ChallengeTile-___style__completed-challenge___3w5tT" >
- - 2018 TCO Marathon - + + 2018 TCO Marathon + +

diff --git a/src/shared/components/ChallengeTile/index.jsx b/src/shared/components/ChallengeTile/index.jsx index 47e389c869..87f935e7fe 100644 --- a/src/shared/components/ChallengeTile/index.jsx +++ b/src/shared/components/ChallengeTile/index.jsx @@ -2,7 +2,6 @@ * Challenge tile. */ /* eslint-env browser */ -import _ from 'lodash'; import React from 'react'; import PT from 'prop-types'; import { Link } from 'react-router-dom'; @@ -83,36 +82,27 @@ class ChallengeTile extends React.Component { margin: '10px 5px', }; - const isDataScience = track === COMPETITION_TRACKS.DATA_SCIENCE; const isDevelopment = track === COMPETITION_TRACKS.DEVELOP; const isDesign = track === COMPETITION_TRACKS.DESIGN; - const roundId = isDataScience ? _.get(challenge, 'rounds.0.id') : 0; - return (

- { !isDataScience && (!challenge.isPrivate + { !challenge.isPrivate ? ( { challenge.name } - ) : ( + ) + : ( { challenge.name } - )) } - - { isDataScience - && ( - - { challenge.name } - - ) } + )}

{underscoreReplace(type)} From 8a807045a7329019cb21c8654836d14a423e856f Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Mon, 14 Sep 2020 06:28:13 -0300 Subject: [PATCH 13/13] Profile Stats Challenges : Fix loading icon --- .../Stats/SubTrackChallengeView/index.jsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx b/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx index 961606ce5f..332374de38 100644 --- a/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx +++ b/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx @@ -111,10 +111,8 @@ const processPastChallenge = (challenge) => { class SubTrackChallengeView extends React.Component { constructor(props, context) { super(props, context); - // this is current page number. starts with 0. - // everytime we scroll at the bottom, we query from offset = pageNum * CHALLENGE_PER_PAGE this.state = { - // this is current page number. starts with 0. + // this is current page number. starts with 1. // everytime we scroll at the bottom, we query from offset = pageNum * CHALLENGE_PER_PAGE pageNum: 1, // which challenge's modal should be poped. null means no modal @@ -150,7 +148,7 @@ class SubTrackChallengeView extends React.Component { handle, auth.tokenV3, track, subTrack, - 0, + pageNum, CHALLENGE_PER_PAGE, true, userId, @@ -159,7 +157,8 @@ class SubTrackChallengeView extends React.Component { } else if (track === 'DATA_SCIENCE') { if (subTrack === 'SRM') { if (!loadingSRMUUID) { - loadSRM(handle, auth.tokenV3, 0, CHALLENGE_PER_PAGE, true); + // pageNum - 1 to match with v4 offset + loadSRM(handle, auth.tokenV3, pageNum - 1, CHALLENGE_PER_PAGE, true); } } else if (subTrack === 'MARATHON_MATCH') { if (!loadingMarathonUUID) { @@ -208,7 +207,7 @@ class SubTrackChallengeView extends React.Component { } else if (track === 'DATA_SCIENCE') { if (subTrack === 'SRM') { if (!loadingSRMUUID) { - loadSRM(handle, auth.tokenV3, pageNum + 1, CHALLENGE_PER_PAGE, false); + loadSRM(handle, auth.tokenV3, pageNum, CHALLENGE_PER_PAGE, false); this.setState({ pageNum: pageNum + 1 }); } } else if (subTrack === 'MARATHON_MATCH') { @@ -249,7 +248,7 @@ class SubTrackChallengeView extends React.Component { userId, } = this.props; - if (pageNum === 0 + if (pageNum === 1 && (loadingSubTrackChallengesUUID || loadingSRMUUID || loadingMarathonUUID)) { return ; }