Skip to content

Commit 00a046b

Browse files
authored
Merge pull request #2041 from topcoder-platform/legacy-tco
Legacy tco18 as sub-community
2 parents b95c0a6 + 80b7997 commit 00a046b

File tree

12 files changed

+5690
-3873
lines changed

12 files changed

+5690
-3873
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ workflows:
181181
filters:
182182
branches:
183183
only:
184-
- hot-fixes
185184
- develop_masterscript
185+
- legacy-tco
186186
# This is beta env for production soft releases
187187
- "build-prod-beta":
188188
context : org-global
@@ -205,4 +205,4 @@ workflows:
205205
filters:
206206
branches:
207207
ignore:
208-
- develop
208+
- develop

__tests__/shared/components/challenge-listing/Filters/__snapshots__/DateRangePicker.jsx.snap

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ exports[`Matches shallow shapshot 1`] = `
4949
"clearDates": "Clear Dates",
5050
"closeDatePicker": "Close",
5151
"dateIsSelected": [Function],
52+
"dateIsSelectedAsEndDate": [Function],
53+
"dateIsSelectedAsStartDate": [Function],
5254
"dateIsUnavailable": [Function],
5355
"enterKey": "Enter key",
5456
"escape": "Escape key",

package-lock.json

+5,421-3,868
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev",
109109
"topcoder-react-lib": "^0.7.8",
110110
"topcoder-react-ui-kit": "^0.5.10",
111-
"topcoder-react-utils": "^0.7.8",
111+
"topcoder-react-utils": "0.7.8",
112112
"turndown": "^4.0.2",
113113
"url-parse": "^1.4.1",
114114
"uuid": "^3.3.2",
@@ -172,7 +172,7 @@
172172
"style-loader": "^0.21.0",
173173
"stylelint": "^9.3.0",
174174
"stylelint-config-standard": "^18.2.0",
175-
"webpack": "^4.14.0",
175+
"webpack": "4.28.4",
176176
"webpack-cli": "^3.0.8",
177177
"webpack-dev-middleware": "^3.1.3",
178178
"webpack-hot-middleware": "^2.22.2",

src/assets/themes/tco18/TCO18.svg

+55
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"challengeFilter": {
3+
"groupIds": [],
4+
"or": [{
5+
"tags": ["TCO", "TCO18"]
6+
}]
7+
},
8+
"communityId": "tco18",
9+
"communityName": "TCO18",
10+
"groupIds": [],
11+
"hideSearch": true,
12+
"logos": [{
13+
"img": "/community-app-assets/themes/tco18/TCO18.svg",
14+
"url": "https://tco18.topcoder.com"
15+
}],
16+
"menuItems": [{
17+
"navigationMenu": "2UqnNygSaor5r7xZP5Dsbc"
18+
}],
19+
"newsFeed": "http://www.topcoder.com/feed",
20+
"subdomains": ["tco18"],
21+
"description": "2018 Topcoder Open. The Ultimate Programming & Design Tournament"
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
Theme for Header component used in TCO sites
3+
*/
4+
@import '~styles/mixins';
5+
@import './mixins';
6+
7+
.container {
8+
background-color: $header-color;
9+
box-shadow: none;
10+
min-height: 60px;
11+
}
12+
13+
.logosWrap {
14+
.logo > img {
15+
height: 40px;
16+
}
17+
}
18+
19+
.challengeDropdown {
20+
@include roboto-regular;
21+
22+
font-size: 13px;
23+
font-weight: 700;
24+
line-height: 25px;
25+
color: $tc-white;
26+
text-transform: uppercase;
27+
28+
:global {
29+
.Select-menu-outer {
30+
padding-left: 0;
31+
padding-right: 0;
32+
border-radius: 0 0 6px 6px;
33+
box-shadow: 0 2px 9px 0 rgba(38, 38, 40, 0.15);
34+
35+
.Select-option {
36+
@include roboto-regular;
37+
38+
font-size: 13px;
39+
font-weight: 400;
40+
line-height: 30px;
41+
text-transform: uppercase;
42+
color: #47474f;
43+
padding-left: 10px;
44+
padding-right: 20px;
45+
46+
&.is-selected,
47+
&:hover {
48+
background-color: #dcdce0;
49+
}
50+
}
51+
}
52+
}
53+
54+
@include lg-to-xl {
55+
border-left: none;
56+
padding-left: 90px;
57+
}
58+
}
59+
60+
.menuWrap {
61+
@include lg-to-xl {
62+
max-width: $screen-lg;
63+
}
64+
}
65+
66+
.menuWrapOpen {
67+
@include xs-to-md {
68+
overflow: visible;
69+
}
70+
}
71+
72+
.userWrap {
73+
.additionalLogos {
74+
@include xs-to-sm {
75+
margin: 0;
76+
}
77+
}
78+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
Common mixins for TCO19 community
3+
*/
4+
@import '~styles/mixins';
5+
6+
$header-color: $tc-black;

src/shared/routes/Communities/Routes.jsx

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Veterans from './Veterans';
1717
import Wipro from './Wipro';
1818
import Cognitive from './Cognitive';
1919
import IoT from './iot';
20+
import TCO18 from './TCO18';
2021
import TCO19 from './TCO19';
2122
import Mobile from './Mobile';
2223
import Zurich from './Zurich';
@@ -40,6 +41,7 @@ export default function Communities({
4041
case 'wipro': return <Wipro base={base} meta={meta} />;
4142
case 'cognitive': return <Cognitive base={base} member={member} meta={meta} />;
4243
case 'iot': return <IoT base={base} meta={meta} />;
44+
case 'tco18': return <TCO18 base={base} meta={meta} />;
4345
case 'tco19': return <TCO19 base={base} meta={meta} />;
4446
case 'mobile': return <Mobile base={base} meta={meta} />;
4547
default: throw new Error('Unknown community ID!');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/**
2+
* Routing of TCO18 Community.
3+
*/
4+
5+
import ContentfulRoute from 'components/Contentful/Route';
6+
import Error404 from 'components/Error404';
7+
import Header from 'containers/tc-communities/Header';
8+
import PT from 'prop-types';
9+
import React from 'react';
10+
import { Route, Switch } from 'react-router-dom';
11+
12+
import headerTheme from 'components/tc-communities/communities/tco/themes/header.scss';
13+
14+
export default function TCO18({ base }) {
15+
return (
16+
<Route
17+
component={({ match }) => (
18+
<div>
19+
<Header
20+
baseUrl={base}
21+
pageId={match.params.pageId || 'home'}
22+
theme={headerTheme}
23+
/>
24+
<Switch>
25+
{/* Competition Rules */}
26+
<ContentfulRoute
27+
path={`${base}/competition-rules`}
28+
error404={<Error404 />}
29+
id="7ILa27AKAXfnXvxG10YuUb"
30+
/>
31+
{/* Tracks */}
32+
<ContentfulRoute
33+
path={`${base}/tracks`}
34+
error404={<Error404 />}
35+
id="fPxQ2U23WkkAPTEIj4WVM"
36+
/>
37+
{/* Regional events */}
38+
<ContentfulRoute
39+
path={`${base}/regional-events`}
40+
error404={<Error404 />}
41+
id="3g6g5UDJXDM1qMZGH2cKY1"
42+
/>
43+
{/* Home route */}
44+
<ContentfulRoute
45+
path={base || '/'}
46+
error404={<Error404 />}
47+
id="5MK8iGUoAy7CTwGsJ7QtIE"
48+
/>
49+
<Route
50+
component={Error404}
51+
path={`${base}/:any`}
52+
/>
53+
</Switch>
54+
</div>
55+
)}
56+
path={`${base}/:pageId?`}
57+
/>
58+
);
59+
}
60+
61+
TCO18.defaultProps = {
62+
base: '',
63+
};
64+
65+
TCO18.propTypes = {
66+
base: PT.string,
67+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Loader for the community's code chunks.
3+
*/
4+
5+
import LoadingIndicator from 'components/LoadingIndicator';
6+
import path from 'path';
7+
import PT from 'prop-types';
8+
import React from 'react';
9+
import { AppChunk, webpack } from 'topcoder-react-utils';
10+
11+
export default function ChunkLoader({ base, meta }) {
12+
return (
13+
<AppChunk
14+
chunkName="tco18-community/chunk"
15+
renderClientAsync={() => import(/* webpackChunkName: "tco18-community/chunk" */ './Routes')
16+
.then(({ default: Routes }) => (
17+
<Routes base={base} meta={meta} />
18+
))
19+
}
20+
renderPlaceholder={() => <LoadingIndicator />}
21+
renderServer={() => {
22+
const Routes = webpack.requireWeak(path.resolve(__dirname, './Routes'));
23+
return <Routes base={base} meta={meta} />;
24+
}}
25+
/>
26+
);
27+
}
28+
29+
ChunkLoader.propTypes = {
30+
base: PT.string.isRequired,
31+
meta: PT.shape().isRequired,
32+
};

src/shared/routes/Communities/TCO19/Routes.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Routing of TCO Community.
2+
* Routing of TCO19 Community.
33
*/
44

55
import _ from 'lodash';

0 commit comments

Comments
 (0)