Skip to content

Release 2020/12/04 #5240

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

Merged
merged 13 commits into from
Dec 4, 2020
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,14 @@ workflows:
filters:
branches:
only:
- free
- gig-apply-fixes
# This is alternate dev env for parallel testing
- "build-qa":
context : org-global
filters:
branches:
only:
- free
- seo-fix
# This is beta env for production soft releases
- "build-prod-beta":
context : org-global
Expand All @@ -260,6 +260,7 @@ workflows:
branches:
only:
- develop
- listing-search
# Production builds are exectuted
# when PR is merged to the master
# Don't change anything in this configuration
Expand All @@ -279,3 +280,4 @@ workflows:
branches:
ignore:
- develop

22 changes: 8 additions & 14 deletions src/shared/components/GUIKit/DropdownTerms/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,12 @@ function DropdownTerms({
let inputField;
useEffect(() => {
const selectInput = containerRef.current.getElementsByClassName('Select-input');
const selectMenuOuter = containerRef.current.getElementsByClassName('Select-menu-outer');
if (selectInput && selectInput.length) {
const selectControl = containerRef.current.getElementsByClassName(
'Select-control',
);
const height1 = selectMenuOuter && selectMenuOuter.length
? selectMenuOuter[0].offsetHeight
: 0;
const height2 = selectControl && selectControl.length
? selectControl[0].offsetHeight
: 0;
selectInput[0].style.top = focused ? `${height1 + height2 - 1}px` : '0';
inputField = selectInput[0].getElementsByTagName('input');
inputField[0].placeholder = focused ? addNewOptionPlaceholder : '';
inputField[0].style.border = 'none';
inputField[0].style.boxShadow = 'none';
selectInput[0].style.borderTop = 'none';
}
}, [focused, selectedOption]);

Expand Down Expand Up @@ -145,9 +135,13 @@ function DropdownTerms({
backspaceRemoves={false}
multi
promptTextCreator={() => null}
filterOptions={() => _.filter(
internalTerms, t => !_.find(selectedOption, { label: t.label }),
).map(o => ({ value: o.label, label: o.label }))}
filterOptions={(option, inputValue) => _.filter(
internalTerms,
t => (inputValue && inputValue.length >= 2
? t.label.toLowerCase().includes(inputValue.toLowerCase())
&& !_.find(selectedOption, { label: t.label })
: !_.find(selectedOption, { label: t.label })),
)}
/>
<img width="15" height="9" styleName="iconDropdown" src={iconDown} alt="dropdown-arrow-icon" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function ChallengeFilters({

const clearSearch = () => {
// setFilterState(Filter.setText(filterState, ''));
setFilterState({ ..._.clone(filterState), name: '' });
setFilterState({ ..._.clone(filterState), search: '' });
setSearchText('');
};

Expand All @@ -77,7 +77,7 @@ export default function ChallengeFilters({
onSearch={(text) => {
// console.log('search text');
// console.log(text);
setFilterState({ ..._.clone(filterState), name: text });
setFilterState({ ..._.clone(filterState), search: text });
}}
// onSearch={text => setFilterState(Filter.setText(filterState, text))}
onClearSearch={() => clearSearch()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ export default function FiltersPanel({
DS: true,
QA: true,
},
name: '',
search: '',
tags: [],
types: [],
groups: [],
Expand Down
4 changes: 3 additions & 1 deletion src/shared/containers/Gigs/RecruitCRMJobApply.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ class RecruitCRMJobApplyContainer extends React.Component {
}
// require atleast 1 skill
if (!prop || prop === 'skills') {
if (!_.find(formData.skills, { selected: true })) formErrors.skills = 'Please, add technical skills';
const skills = _.filter(formData.skills, ['selected', true]);
if (!skills.length) formErrors.skills = 'Please, add technical skills';
else if (skills.map(skill => skill.label).join(',').length >= 100) formErrors.skills = 'Sum of all skill characters may not be greater than 100';
else delete formErrors.skills;
}
// have accepted terms
Expand Down
2 changes: 1 addition & 1 deletion src/shared/containers/challenge-detail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class ChallengeDetailPageContainer extends React.Component {
image={getOgImage(challenge)}
siteName="Topcoder"
socialDescription={description}
socialTitle={`${prizesStr}${title}`}
socialTitle={`${prizesStr}${challenge.name}`}
title={title}
/>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ export class ListingContainer extends React.Component {
reviewOpportunities={reviewOpportunities}
setFilterState={(state) => {
setFilter(state);
setSearchText(state.name || '');
setSearchText(state.search || '');
// if (activeBucket === BUCKETS.SAVED_FILTER) {
// selectBucket(BUCKETS.OPEN_FOR_REGISTRATION);
// } else if (activeBucket === BUCKETS.SAVED_REVIEW_OPPORTUNITIES_FILTER) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/utils/challenge-listing/buckets.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export function filterChanged(filter, prevFilter) {
return true;
}
return (!_.isEqual(filter.tracks, prevFilter.tracks))
|| (filter.name !== prevFilter.name)
|| (filter.search !== prevFilter.search)
|| (filter.status !== prevFilter.status)
|| (filter.startDateEnd !== prevFilter.startDateEnd)
|| (filter.endDateStart !== prevFilter.endDateStart)
Expand Down