Skip to content

Release 2020-09-10 #4885

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 16 commits into from
Sep 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ workflows:
filters:
branches:
only:
- milestone-20200917
- develop
# This is alternate dev env for parallel testing
- "build-test":
Expand All @@ -238,14 +239,13 @@ workflows:
branches:
only:
- feature-contentful
- hot-fix
# This is alternate dev env for parallel testing
- "build-qa":
context : org-global
filters:
branches:
only:
- hot-fix
- community-app-tests-poc
# This is beta env for production soft releases
- "build-prod-beta":
context : org-global
Expand All @@ -260,8 +260,6 @@ workflows:
filters:
branches:
only:
- milestone-v1.3
- milestone-20200910
- develop
# Production builds are exectuted
# when PR is merged to the master
Expand Down
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,4 +409,5 @@ module.exports = {
TC_EDU_SEARCH_BAR_MAX_RESULTS_EACH_GROUP: 3,
POLICY_PAGES_PATH: '/policy',
GIGS_PAGES_PATH: '/gigs',
START_PAGE_PATH: '/start',
};
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions src/assets/images/gig-blob.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/img-gig-work.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/shared/components/Contentful/Modal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { errors } from 'topcoder-react-lib';
import { themr } from 'react-css-super-themr';
import classnames from 'classnames';

import defaultModalTheme from 'components/Leaderboard/ChallengeHistoryModal/styles.scss';
import defaultStyle from './style.scss';

const { fireErrorMessage } = errors;
Expand Down Expand Up @@ -102,7 +103,10 @@ class ContentfulModal extends React.Component {
className: classnames(theme.modalTrigger, child.props.className),
}))}
{isOpen && (
<Modal onCancel={this.onCloseModal}>
<Modal
onCancel={this.onCloseModal}
theme={defaultModalTheme}
>
<div
className={theme.dismissButton}
onClick={this.onCloseModal}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/GUIKit/JobListCard/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}

&:first-child {
width: 200px;
width: 250px;
}

&:nth-child(2) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/Gigs/GigDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default function GigDetails(props) {
</li>
<li>
<img src={iconLabel2} alt="label 2" />
<div><strong>Subscribe to our <a target="_blank" rel="noreferrer" href="https://www.topcoder.com/community/taas">Gig notifications email.</a>.</strong> We’ll send you a weekly update on gigs available so you don’t miss a beat.</div>
<div><strong>Subscribe to our <a target="_blank" rel="noreferrer" href="https://www.topcoder.com/community/taas">Gig notifications email</a>.</strong> We’ll send you a weekly update on gigs available so you don’t miss a beat.</div>
</li>
<li>
<img src={iconLabel3} alt="label 3" />
Expand Down
3 changes: 3 additions & 0 deletions src/shared/components/Gigs/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@

img {
margin-right: 16px;
min-width: 40px;
}

&:last-child {
Expand All @@ -163,6 +164,7 @@
font-weight: 600;
font-family: Barlow, sans-serif;
margin-top: 20px;
line-height: 20px;
}
}

Expand All @@ -189,6 +191,7 @@
.skills {
display: flex;
align-items: center;
line-height: 21px;
/* stylelint-disable */
img {
margin-right: 8px;
Expand Down
8 changes: 8 additions & 0 deletions src/shared/containers/EDU/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import DesignTrackIcon from 'assets/images/track-design.svg';
import MMTrackIcon from 'assets/images/track-MM.svg';
import AlgoTrackIcon from 'assets/images/track-ALGO.svg';
import TCTrackIcon from 'assets/images/tc-logo-icon.svg';
import GigWorkTrackIcon from 'assets/images/gig-blob.svg';
// CSS
import homeTheme from './styles/home.scss';

Expand Down Expand Up @@ -95,6 +96,13 @@ export default class EDUHome extends React.Component {
</div>
<TrackCards theme={homeTheme} track="QA" />
</div>
<div className={homeTheme.trackWrapp}>
<div className={homeTheme.trackInfos}>
<div className={homeTheme.trackIconGigs}><GigWorkTrackIcon /></div>
<TrackInfoInner track="Gig Work" theme={homeTheme} taxonomy={taxonomy} />
</div>
<TrackCards theme={homeTheme} track="Gig Work" />
</div>
<div className={homeTheme.trackWrapp}>
<div className={homeTheme.trackInfos}>
<div className={homeTheme.trackIconTC}><TCTrackIcon /></div>
Expand Down
3 changes: 3 additions & 0 deletions src/shared/containers/EDU/Tracks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import DS from 'assets/images/img-data-science.png';
import Algo from 'assets/images/img-algorithm.png';
import QA from 'assets/images/img-QA.png';
import Topcoder from 'assets/images/img-Topcoder.png';
import GigWork from 'assets/images/img-gig-work.png';
// Partials
import ResultTabs from './partials/ResultTabs';
// CSS
Expand All @@ -33,6 +34,7 @@ const TRACK_BANNER_BACK_COLORS = {
'Competitive Programming': '#FFA45D',
QA: '#8AFB8A',
Topcoder: '#2A2A2A',
'Gig Work': '#ef476f',
};
const TRACK_IMAGES = {
Development: Dev,
Expand All @@ -41,6 +43,7 @@ const TRACK_IMAGES = {
'Competitive Programming': Algo,
QA,
Topcoder,
'Gig Work': GigWork,
};

export default class EDUTracks extends React.Component {
Expand Down
8 changes: 8 additions & 0 deletions src/shared/containers/EDU/styles/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@
height: 71px;
}

.trackIconGigs {
display: flex;
justify-content: center;
align-items: center;
width: 74px;
height: 75px;
}

.trackIconTC {
background-repeat: no-repeat;
background-size: cover;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/containers/Gigs/RecruitCRMJobs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RecruitCRMJobsContainer extends React.Component {
this.state = {
term: '',
page: 0,
sortBy: 'updated_on',
sortBy: 'created_on',
};

this.onSearch = this.onSearch.bind(this);
Expand Down
21 changes: 21 additions & 0 deletions src/shared/routes/StartPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* The loader of Gigs page webpack chunks.
*/
import React from 'react';

import LoadingPagePlaceholder from 'components/LoadingPagePlaceholder';
import { AppChunk } from 'topcoder-react-utils';

export default function GigsPagesRoute(props) {
return (
<AppChunk
chunkName="policyPages/chunk"
renderClientAsync={() => import(/* webpackChunkName: "gigsPages/chunk" */ 'containers/GigsPages')
.then(({ default: GigsPagesContainer }) => (
<GigsPagesContainer {...props} />
))
}
renderPlaceholder={() => <LoadingPagePlaceholder />}
/>
);
}
15 changes: 15 additions & 0 deletions src/shared/routes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
*/

import CommunityLoader from 'containers/tc-communities/Loader';
import ContentfulRoute from 'components/Contentful/Route';
import Content from 'components/Content';
import Footer from 'components/TopcoderFooter';
import React from 'react';

import {
Expand Down Expand Up @@ -103,6 +105,19 @@ function Routes({ communityId }) {
exact
path={`${config.GIGS_PAGES_PATH}/:id?`}
/>
<Route
render={() => (
<React.Fragment>
<ContentfulRoute
baseUrl={config.START_PAGE_PATH}
id="vpcfRkUPoTtxXoEIBvCRl"
/>
<Footer />
</React.Fragment>
)}
exact
path={config.START_PAGE_PATH}
/>
<Topcoder />
</Switch>
</div>
Expand Down
6 changes: 2 additions & 4 deletions src/shared/services/contentful.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ if (isomorphy.isServerSide()) {
/* eslint-enable global-require */
}

const LOCAL_MODE = Boolean(config.CONTENTFUL.LOCAL_MODE);

// Education Center Taxonomy
const EDU_TAXONOMY_ID = '15caxocitaxyK65K9oSd91';
// The keys for subcategory lists/references
// If need to add new track add its fieldID here to be autopickuped
const EDU_TRACK_KEYS = ['dataScience', 'competitiveProgramming', 'design', 'development', 'qualityAssurance', 'topcoder'];
const EDU_TRACK_KEYS = ['dataScience', 'competitiveProgramming', 'design', 'development', 'qualityAssurance', 'topcoder', 'gigWork'];

const EDU_ARTICLE_TYPES = ['Article', 'Video', 'Forum post'];

Expand All @@ -37,7 +35,7 @@ const EDU_ARTICLE_TYPES = ['Article', 'Video', 'Forum post'];

/* Holds the base URL of Community App endpoints that proxy HTTP request to
* Contentful APIs. */
const PROXY_ENDPOINT = `${LOCAL_MODE ? '' : config.URL.APP}/api/cdn/public/contentful`;
const PROXY_ENDPOINT = '/api/cdn/public/contentful';
/* At the client-side only, it holds the cached index of published Contentful
* assets and content. Do not use it directly, use getIndex() function below
* instead (it takes care about updating this when necessary). */
Expand Down
9 changes: 7 additions & 2 deletions src/shared/utils/contentful.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,22 @@ export function menuItemBuilder(baseUrl, item) {
export function tracksTreeBuilder(EDUTaxonomy, query) {
const tax = _.isArray(query.tax) ? query.tax : [query.tax];
let id = 0;
return _.sortBy(
const res = _.sortBy(
_.map(EDUTaxonomy, (categories, track) => ({
title: track,
id: id++,
items: _.sortBy(_.map(categories, cat => ({
title: cat.name, id: id++, items: [], track, selected: _.indexOf(tax, cat.name) !== -1,
title: cat.name,
id: id++,
items: [],
track,
selected: _.indexOf(tax, cat.name) !== -1 && track === query.track,
})), ['title']),
selected: query.track === track,
})),
['title'],
);
return res;
}

export default undefined;