Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IC-28 Production releas -> master #6947

Merged
merged 25 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
20ce353
Add drop shadow to skill selector on gig appliction
jmgasper Nov 14, 2023
1120644
IC-13 ICs on dashboard init
kkartunov Dec 1, 2023
1be54ea
IC-13 ci: on test
kkartunov Dec 1, 2023
72070f1
IC-13 fix lint errors
kkartunov Dec 1, 2023
3cdd971
IC-13 add debug and fix map for no challenges
kkartunov Dec 1, 2023
ec574b4
IC-13 add tracks suppoer for query param
kkartunov Dec 1, 2023
23b3a27
IC-13 fix linting errors
kkartunov Dec 1, 2023
9019431
IC-13 await API call in action hook
kkartunov Dec 1, 2023
7a341ef
IC-13 cleanup & allow 20 ICs on dash
kkartunov Dec 1, 2023
5762b42
IC-13 fix arg name clash & all link
kkartunov Dec 1, 2023
26ba57c
IC-13 hide section for no challnegs & config
kkartunov Dec 4, 2023
6d4e1ba
IC-13 fix lint error
kkartunov Dec 4, 2023
b8ebc05
IC-13 return null instead undefined to render nothing
kkartunov Dec 4, 2023
8d16cd6
IC-13 add query param to open in IC tab
kkartunov Dec 7, 2023
1d956d3
IC-13 fixed lint error
kkartunov Dec 7, 2023
1888ccc
Merge pull request #6946 from topcoder-platform/IC-13
kkartunov Dec 7, 2023
4cbbff0
Merge branch 'develop' into TSJR-275
jmgasper Dec 8, 2023
3a4f65d
Merge pull request #6948 from topcoder-platform/TSJR-275
jmgasper Dec 8, 2023
ac471eb
Add “Innovation Challenges” tab to challenge listing
jmgasper Nov 28, 2023
0cdd461
Fix tab name
jmgasper Nov 28, 2023
9a0b7de
Testing for cherry-picked IC-15
jmgasper Dec 8, 2023
e4679db
Lint fixes
jmgasper Dec 8, 2023
2e9093a
Always go to active innovation challenges
jmgasper Dec 9, 2023
04b7193
Merge pull request #6950 from topcoder-platform/IC-15
jmgasper Dec 12, 2023
27d2d40
Fix for quickly switching between tabs
jmgasper Dec 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,17 @@ workflows:
- PROD-4183
- changelog
- remove_submission_review
- standardised_skills
- TSJR-275
- skills_updates
- IC-15
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
filters:
branches:
only:
- PROD-4251
- IC-13
# This is alternate dev env for parallel testing
- "build-qa":
context : org-global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ exports[`Matches shallow shapshot 1 shapshot 1 1`] = `
>
<ChallengeTab
activeBucket="abc"
filterState={Object {}}
location={Object {}}
previousBucketOfActiveTab={null}
previousBucketOfPastChallengesTab={null}
selectBucket={[MockFunction]}
setFilterState={[MockFunction]}
setPreviousBucketOfActiveTab={[Function]}
setPreviousBucketOfPastChallengesTab={[Function]}
/>
Expand Down Expand Up @@ -70,10 +72,12 @@ exports[`Matches shallow shapshot 2 shapshot 2 1`] = `
>
<ChallengeTab
activeBucket="abc"
filterState={Object {}}
location={Object {}}
previousBucketOfActiveTab={null}
previousBucketOfPastChallengesTab={null}
selectBucket={[MockFunction]}
setFilterState={[MockFunction]}
setPreviousBucketOfActiveTab={[Function]}
setPreviousBucketOfPastChallengesTab={[Function]}
/>
Expand Down
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,4 +476,5 @@ 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',
INNOVATION_CHALLENGES_TAG: 'Innovation Challenge',
};
28 changes: 28 additions & 0 deletions src/shared/actions/challenge-listing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,27 @@ function getMyPastChallengesInit(uuid, page, frontFilter) {
// return getAllActiveChallengesWithUsersDone(uuid, tokenV3, filter);
// }

/**
* Extract search from front filter
*
* @param {Object} frontFilter
* @returns
*/
function extractSearchFilter(frontFilter = {}) {
const searchs = [];
if (frontFilter.search) {
searchs.push(frontFilter.search);
}
if (frontFilter.isInnovationChallenge === 'true') {
searchs.push('Innovation Challenge');
}

return {
search: _.uniq(searchs).join(' '),
isInnovationChallenge: '', // remove isInnovationChallenge from challenges query
};
}

/**
* Gets 1 page of active challenges (including marathon matches) from the backend.
* Once this action is completed any active challenges saved to the state before
Expand All @@ -178,6 +199,7 @@ function getActiveChallengesDone(uuid, page, backendFilter, tokenV3, frontFilter
backendFilter,
frontFilter: {
...frontFilter,
...extractSearchFilter(frontFilter),
status: 'Active',
currentPhaseName: 'Submission',
registrationEndDateEnd: new Date().toISOString(),
Expand Down Expand Up @@ -240,6 +262,7 @@ function getOpenForRegistrationChallengesDone(uuid, page, backendFilter,
backendFilter,
frontFilter: {
...frontFilter,
...extractSearchFilter(frontFilter),
status: 'Active',
currentPhaseName: 'Registration',
perPage: PAGE_SIZE,
Expand Down Expand Up @@ -275,6 +298,7 @@ function getMyChallengesDone(uuid, page, backendFilter, tokenV3, frontFilter = {
backendFilter,
frontFilter: {
...frontFilter,
...extractSearchFilter(frontFilter),
status: 'Active',
memberId: userId,
perPage: PAGE_SIZE,
Expand All @@ -300,6 +324,7 @@ function getAllChallengesDone(uuid, page, backendFilter, tokenV3, frontFilter =
backendFilter,
frontFilter: {
...frontFilter,
...extractSearchFilter(frontFilter),
status: 'Active',
perPage: PAGE_SIZE,
page: page + 1,
Expand All @@ -325,6 +350,7 @@ function getMyPastChallengesDone(uuid, page, backendFilter, tokenV3, frontFilter
backendFilter,
frontFilter: {
...frontFilter,
...extractSearchFilter(frontFilter),
status: 'Completed',
memberId: userId,
perPage: PAGE_SIZE,
Expand Down Expand Up @@ -352,6 +378,7 @@ function getTotalChallengesCountDone(uuid, tokenV3, frontFilter = {}) {
backendFilter: {},
frontFilter: {
...frontFilter,
...extractSearchFilter(frontFilter),
status: 'Active',
isLightweight: true,
perPage: 1,
Expand Down Expand Up @@ -434,6 +461,7 @@ function getPastChallengesDone(uuid, page, backendFilter, tokenV3, frontFilter =
backendFilter,
frontFilter: {
...frontFilter,
...extractSearchFilter(frontFilter),
status: 'Completed',
perPage: PAGE_SIZE,
page: page + 1,
Expand Down
16 changes: 12 additions & 4 deletions src/shared/actions/dashboard.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
import _ from 'lodash';
import { createActions } from 'redux-actions';
import { getService } from '../services/dashboard';

const service = getService();

function fetchChallenges(query) {
return service.getChallenges(query);
function fetchChallengesInit(title) {
return title;
}

async function fetchChallenges(title, query) {
const challenges = await service.getChallenges(query);

return {
challenges,
title,
};
}

export default createActions({
DASHBOARD: {
FETCH_CHALLENGES_INIT: _.noop,
FETCH_CHALLENGES_INIT: fetchChallengesInit,
FETCH_CHALLENGES_DONE: fetchChallenges,
},
});
17 changes: 12 additions & 5 deletions src/shared/components/Dashboard/Challenges/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import _ from 'lodash';
import LoadingIndicator from 'components/LoadingIndicator';
import PT from 'prop-types';
import React from 'react';
import qs from 'qs';

import { config } from 'topcoder-react-utils';

Expand All @@ -11,22 +12,24 @@ export default function ChallengesFeed({
challenges,
loading,
theme,
title,
challengeListingQuery,
}) {
return (
return challenges && challenges.length ? (
<div styleName={`container ${theme}`}>
<div styleName="header">
<span styleName="title">CHALLENGES</span>
<span styleName="title">{title}</span>
<a
styleName="allLink"
href={`${config.URL.CHALLENGES_URL}`}
href={`${config.URL.CHALLENGES_URL}${challengeListingQuery ? `?${qs.stringify(challengeListingQuery)}` : ''}`}
target="_blank"
rel="noreferrer"
>View all <span>challenges</span>
</a>
</div>
<div styleName="challenges">
{loading ? <div styleName="loading"><LoadingIndicator /></div>
: challenges.map(challenge => (
: (challenges || []).map(challenge => (
<div styleName="row" key={challenge.id}>
<a
href={`/challenges/${challenge.id}`}
Expand All @@ -46,16 +49,20 @@ export default function ChallengesFeed({
))}
</div>
</div>
);
) : null;
}

ChallengesFeed.defaultProps = {
challenges: [],
theme: 'light',
title: 'CHALLENGES',
challengeListingQuery: undefined,
};

ChallengesFeed.propTypes = {
challenges: PT.arrayOf(PT.shape()),
loading: PT.bool.isRequired,
theme: PT.oneOf(['dark', 'light']),
title: PT.string,
challengeListingQuery: PT.shape(),
};
2 changes: 1 addition & 1 deletion src/shared/components/GUIKit/DropdownSkills/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function DropdownSkills({
className="dropdownContainer"
styleName={`container ${
selectedOption && !!selectedOption.length ? 'haveValue' : ''
} ${errorMsg ? 'haveError' : ''} ${_.every(internalTerms, { selected: true }) ? 'isEmptySelectList' : ''}`}
} ${errorMsg ? 'haveError' : ''}`}
>
<div styleName="relative">
<Async
Expand Down
9 changes: 0 additions & 9 deletions src/shared/components/GUIKit/DropdownSkills/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,6 @@
border-bottom-left-radius: 0 !important;
}
}

&.isEmptySelectList {
:global {
.Select-menu-outer {
border: none !important;
padding-bottom: 10px !important;
}
}
}
}

.addAnotherSkill {
Expand Down
Loading
Loading