diff --git a/.circleci/config.yml b/.circleci/config.yml index ab9d75fe91..42ec7a0c28 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -349,6 +349,7 @@ workflows: filters: branches: only: + - develop - reskin-profile # This is alternate dev env for parallel testing - "build-test": @@ -377,7 +378,6 @@ workflows: filters: &filters-staging branches: only: - - develop - fix-security-headers - tco23-BS-comps # Production builds are exectuted diff --git a/__tests__/shared/components/SubmissionManagement/__snapshots__/Submission.jsx.snap b/__tests__/shared/components/SubmissionManagement/__snapshots__/Submission.jsx.snap index 253eaf8c47..404a00e321 100644 --- a/__tests__/shared/components/SubmissionManagement/__snapshots__/Submission.jsx.snap +++ b/__tests__/shared/components/SubmissionManagement/__snapshots__/Submission.jsx.snap @@ -12,6 +12,9 @@ exports[`Snapshot match 1`] = ` > ID +
ID - 12345 +
+ 12345 +
+ +
+ + + +
+ +

+ Earn TCO points by participating in these +
+ challenges. + + Learn more about TCO + +

+
+ } + defaultVisible={false} + id="tco-tip" + onTooltipHover={[Function]} + placeArrow={[Function]} + position="top" + suppressDiv={false} + trigger={ + Array [ + "hover", + "focus", + ] + } + > + + +
+
+ +
diff --git a/config/default.js b/config/default.js index 1e4f3b5492..e5325e57eb 100644 --- a/config/default.js +++ b/config/default.js @@ -103,7 +103,7 @@ module.exports = { * as a more verbose name for the param. */ COMMUNITY_APP: 'https://community-app.topcoder-dev.com', CHALLENGES_URL: 'https://www.topcoder-dev.com/challenges', - + TCO_OPEN_URL: 'https://www.topcoder-dev.com/community/member-programs/topcoder-open', ARENA: 'https://arena.topcoder-dev.com', AUTH: 'https://accounts-auth0.topcoder-dev.com', BASE: 'https://www.topcoder-dev.com', diff --git a/config/production.js b/config/production.js index 6f068449ec..b71f7c9800 100644 --- a/config/production.js +++ b/config/production.js @@ -26,6 +26,7 @@ module.exports = { * as a more verbose name for the param. */ COMMUNITY_APP: 'https://community-app.topcoder.com', CHALLENGES_URL: 'https://www.topcoder.com/challenges', + TCO_OPEN_URL: 'https://www.topcoder.com/community/member-programs/topcoder-open', AUTH: 'https://accounts-auth0.topcoder.com', BASE: 'https://www.topcoder.com', diff --git a/src/shared/components/SubmissionManagement/Submission/index.jsx b/src/shared/components/SubmissionManagement/Submission/index.jsx index def59a603b..7204c28711 100644 --- a/src/shared/components/SubmissionManagement/Submission/index.jsx +++ b/src/shared/components/SubmissionManagement/Submission/index.jsx @@ -45,8 +45,8 @@ export default function Submission(props) { ID - {submissionObject.id} - {/*
{submissionObject.legacySubmissionId}
*/} + {submissionObject.legacySubmissionId} +
{submissionObject.id}
TYPE diff --git a/src/shared/components/SubmissionManagement/Submission/styles.scss b/src/shared/components/SubmissionManagement/Submission/styles.scss index de3e00a565..a6b5b17211 100644 --- a/src/shared/components/SubmissionManagement/Submission/styles.scss +++ b/src/shared/components/SubmissionManagement/Submission/styles.scss @@ -17,7 +17,7 @@ $submission-space-50: $base-unit * 10; } td { - vertical-align: middle; + // vertical-align: middle; padding: 16px; background: $tc-white; border-top: 1px solid $tc-gray-10; @@ -115,8 +115,9 @@ $submission-space-50: $base-unit * 10; } } - .legacy-id { - color: $tc-gray-50; + .v5-id { + font-weight: 400; + line-height: 22px; } .status-col { diff --git a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx index 56da63c1ad..69b8e823f8 100644 --- a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx +++ b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx @@ -257,7 +257,9 @@ export default function FiltersPanel({ const disableClearFilterButtons = isFilterEmpty(filterState, past ? 'past' : '', activeBucket); const isRecommendedChallengesVisible = (activeBucket === 'openForRegistration' && config.ENABLE_RECOMMENDER); + const isTcoChallengesVisible = activeBucket !== BUCKETS.REVIEW_OPPORTUNITIES; const [recommendedToggle, setRecommendedToggle] = useState(false); + const [tcoToggle, setTcoToggle] = useState(false); useEffect(() => { if (!isFilterEmpty(filterState, past ? 'past' : '', activeBucket) @@ -270,11 +272,19 @@ export default function FiltersPanel({ }); } + if (filterState.tco) { + setTcoToggle(true); + } if (filterState.recommended) { setRecommendedToggle(true); } }, [filterState]); + const onSwitchTcoChallenge = (on) => { + setFilterState({ ..._.clone(filterState), tco: on ? on.toString() : on }); + setTcoToggle(on); + }; + const onSwitchRecommendedChallenge = (on) => { setFilterState({ ..._.clone(filterState), recommended: on }); selectBucket(BUCKETS.OPEN_FOR_REGISTRATION); @@ -314,6 +324,14 @@ export default function FiltersPanel({
); + const tcoCheckboxTip = ( +
+

Earn TCO points by participating in these
+ challenges. Learn more about TCO +

+
+ ); + return (
@@ -648,10 +666,42 @@ export default function FiltersPanel({ ) } + {isTcoChallengesVisible + && ( + +
+ + + + +
+ + + +
+
+
+ ) + } +
{ - isRecommendedChallengesVisible && _.get(auth, 'user.userId') + ((isRecommendedChallengesVisible && _.get(auth, 'user.userId')) || isTcoChallengesVisible) && (
) } @@ -661,6 +711,7 @@ export default function FiltersPanel({ disabled={disableClearFilterButtons} onClick={() => { setRecommendedToggle(false); + setTcoToggle(false); setSort('openForRegistration', 'startDate'); setFilterState({ tracks: { @@ -670,6 +721,7 @@ export default function FiltersPanel({ QA: true, }, search: '', + tco: false, tags: [], types: ['CH', 'F2F', 'TSK'], groups: [], diff --git a/src/shared/components/challenge-listing/Filters/FiltersPanel/style.scss b/src/shared/components/challenge-listing/Filters/FiltersPanel/style.scss index bdc59c2906..c6fe1708e6 100644 --- a/src/shared/components/challenge-listing/Filters/FiltersPanel/style.scss +++ b/src/shared/components/challenge-listing/Filters/FiltersPanel/style.scss @@ -118,7 +118,8 @@ hr.hr { .filter-row { display: flex; - .recommended-select-label { + .recommended-select-label, + .tco-select-label { width: 45%; margin-bottom: 16px; display: flex; @@ -606,7 +607,8 @@ hr.hr { } } - .recommended-challenges-filter { + .recommended-challenges-filter, + .tco-challenges-filter { display: flex; margin: 0; position: relative; @@ -619,7 +621,8 @@ hr.hr { flex-direction: row; } - .recommended-challenge-tooltip { + .recommended-challenge-tooltip, + .tco-challenge-tooltip { position: absolute; left: 210px; display: flex; @@ -639,6 +642,10 @@ hr.hr { color: $tc-white; border-radius: 8px; padding: 10px; + + a { + font-weight: bold; + } } .tctooltiptext::after { diff --git a/src/shared/components/challenge-listing/Listing/Bucket/index.jsx b/src/shared/components/challenge-listing/Listing/Bucket/index.jsx index 4556f866d9..e500d0af64 100644 --- a/src/shared/components/challenge-listing/Listing/Bucket/index.jsx +++ b/src/shared/components/challenge-listing/Listing/Bucket/index.jsx @@ -137,7 +137,7 @@ export default function Bucket({ title={BUCKET_DATA[bucket].name} />

- {(filterState.recommended && activeBucket === 'openForRegistration') ? null : `${NO_LIVE_CHALLENGES_CONFIG[activeBucket]}`} + {`${NO_LIVE_CHALLENGES_CONFIG[activeBucket]}`}

diff --git a/src/shared/reducers/challenge-listing/index.js b/src/shared/reducers/challenge-listing/index.js index 8632e3363c..319c245e0b 100644 --- a/src/shared/reducers/challenge-listing/index.js +++ b/src/shared/reducers/challenge-listing/index.js @@ -422,7 +422,7 @@ function onSetFilter(state, { payload }) { * do it very carefuly (many params are not validated). */ const filter = _.pickBy(_.pick( payload, - ['tags', 'types', 'search', 'startDateEnd', 'endDateStart', 'groups', 'events', 'tracks'], + ['tags', 'types', 'search', 'startDateEnd', 'endDateStart', 'groups', 'events', 'tracks', 'tco'], ), value => (!_.isArray(value) && value && value !== '') || (_.isArray(value) && value.length > 0)); const emptyArrayAllowedFields = ['types']; diff --git a/src/shared/utils/challenge-listing/buckets.js b/src/shared/utils/challenge-listing/buckets.js index 31ed78007a..b498a8451e 100644 --- a/src/shared/utils/challenge-listing/buckets.js +++ b/src/shared/utils/challenge-listing/buckets.js @@ -190,6 +190,7 @@ export function filterChanged(filter, prevFilter) { } return (!_.isEqual(filter.tracks, prevFilter.tracks)) || (filter.search !== prevFilter.search) + || (filter.tco !== prevFilter.tco) || (filter.startDateEnd !== prevFilter.startDateEnd) || (filter.endDateStart !== prevFilter.endDateStart) // eslint-disable-next-line max-len @@ -216,8 +217,13 @@ export function isFilterEmpty(filter, tab, bucket) { let f; let empty; + if (!filter.tco) { + // eslint-disable-next-line no-param-reassign + delete filter.tco; + } + if (tab === 'past') { - f = _.pick(filter, 'tracks', 'search', 'types', 'startDateEnd', 'endDateStart'); + f = _.pick(filter, 'tracks', 'search', 'types', 'startDateEnd', 'endDateStart', 'tco'); if (f.types) f.types = [...f.types].sort(); empty = { tracks: { @@ -244,7 +250,7 @@ export function isFilterEmpty(filter, tab, bucket) { reviewOpportunityTypes: _.keys(REVIEW_OPPORTUNITY_TYPES), }; } else { - f = _.pick(filter, 'tracks', 'search', 'types'); + f = _.pick(filter, 'tracks', 'search', 'types', 'tco'); if (f.types) f.types = [...f.types].sort(); empty = { tracks: {