Skip to content

Commit 1bb3ae0

Browse files
Merge branch 'develop' into seo-fix
2 parents 8310b1e + e3d9f3d commit 1bb3ae0

File tree

36 files changed

+410
-96
lines changed

36 files changed

+410
-96
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,22 +230,21 @@ workflows:
230230
filters:
231231
branches:
232232
only:
233-
- develop-auth0-sync
234233
- develop
235234
# This is alternate dev env for parallel testing
236235
- "build-test":
237236
context : org-global
238237
filters:
239238
branches:
240239
only:
241-
- seo-fix
240+
- free
242241
# This is alternate dev env for parallel testing
243242
- "build-qa":
244243
context : org-global
245244
filters:
246245
branches:
247246
only:
248-
- listing-develop-sync
247+
- issue-5041
249248
# This is beta env for production soft releases
250249
- "build-prod-beta":
251250
context : org-global
@@ -261,6 +260,7 @@ workflows:
261260
branches:
262261
only:
263262
- develop
263+
- bug-bash-develop-sync
264264
# Production builds are exectuted
265265
# when PR is merged to the master
266266
# Don't change anything in this configuration

__tests__/shared/components/ChallengeTile/__snapshots__/index.jsx.snap

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,6 @@ exports[`renders marathon 1`] = `
241241
</p>
242242
</div>
243243
</div>
244-
<p
245-
className="src-shared-components-ChallengeTile-___style__roles___1V-WA"
246-
/>
247244
</div>
248245
</div>
249246
</div>

__tests__/shared/components/Dashboard/SRM/__snapshots__/index.jsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ exports[`Matches shallow shapshot 1`] = `
4949
</a>
5050
<a
5151
className="tc-btn tc-btn-s tc-btn-wide tc-btn-ghost src-shared-components-Dashboard-SRM-___styles__tc-btn___3no83"
52-
href="https://www.topcoder-dev.com/member-onboarding/learning-practicing-skills/"
52+
href="https://www.topcoder-dev.com/thrive/articles/How%20To%20Compete%20in%20SRMs"
5353
>
5454
Learn More
5555
</a>

__tests__/shared/components/SubmissionManagement/Submission.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Submission from 'components/SubmissionManagement/Submission';
44
import TU from 'react-dom/test-utils';
55

66
const mockOnDelete = jest.fn();
7+
const mockOnDownload = jest.fn();
78
const mockOnShowDetails = jest.fn();
89

910
const rnd = new Rnd();
@@ -12,6 +13,7 @@ test('Snapshot match', () => {
1213
rnd.render((
1314
<Submission
1415
onDelete={mockOnDelete}
16+
onDownload={mockOnDownload}
1517
onShowDetails={mockOnShowDetails}
1618
showScreeningDetails
1719
type="develop"
@@ -21,6 +23,7 @@ test('Snapshot match', () => {
2123
rnd.render((
2224
<Submission
2325
onDelete={mockOnDelete}
26+
onDownload={mockOnDownload}
2427
onShowDetails={mockOnShowDetails}
2528
submissionObject={{
2629
id: '12345',
@@ -49,6 +52,7 @@ class Wrapper extends React.Component {
4952
const page = TU.renderIntoDocument((
5053
<Wrapper
5154
onDelete={mockOnDelete}
55+
onDownload={mockOnDownload}
5256
onShowDetails={mockOnShowDetails}
5357
submissionObject={{
5458
id: '12345',

__tests__/shared/components/SubmissionManagement/__snapshots__/Submission.jsx.snap

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ exports[`Snapshot match 1`] = `
2121
className="src-shared-components-SubmissionManagement-Submission-___styles__action-col___2M1RY"
2222
>
2323
<div>
24-
<a>
24+
<button
25+
onClick={[Function]}
26+
type="button"
27+
>
2528
<DownloadIcon
2629
height="16"
2730
viewBox="0 0 16 16"
2831
width="16"
2932
xmlns="http://www.w3.org/2000/svg"
3033
/>
31-
</a>
34+
</button>
3235
<button
3336
className="src-shared-components-SubmissionManagement-Submission-___styles__delete-icon___2M67z"
3437
disabled={true}
@@ -81,14 +84,17 @@ exports[`Snapshot match 2`] = `
8184
className="src-shared-components-SubmissionManagement-Submission-___styles__action-col___2M1RY"
8285
>
8386
<div>
84-
<a>
87+
<button
88+
onClick={[Function]}
89+
type="button"
90+
>
8591
<DownloadIcon
8692
height="16"
8793
viewBox="0 0 16 16"
8894
width="16"
8995
xmlns="http://www.w3.org/2000/svg"
9096
/>
91-
</a>
97+
</button>
9298
<button
9399
className="src-shared-components-SubmissionManagement-Submission-___styles__delete-icon___2M67z"
94100
disabled={true}

__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ exports[`Matches shallow shapshot 1`] = `
106106
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
107107
>
108108
<a
109-
href="https://www.topcoder-dev.com/thrive/tracks?track=Data%20Science"
109+
href="https://www.topcoder-dev.com/thrive/tracks?track=Data%20Science&tax="
110110
>
111111
Data Science
112112
</a>
@@ -115,7 +115,7 @@ exports[`Matches shallow shapshot 1`] = `
115115
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
116116
>
117117
<a
118-
href="https://www.topcoder-dev.com/thrive/tracks?track=Design"
118+
href="https://www.topcoder-dev.com/thrive/tracks?track=Design&tax="
119119
>
120120
Design
121121
</a>
@@ -124,7 +124,7 @@ exports[`Matches shallow shapshot 1`] = `
124124
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
125125
>
126126
<a
127-
href="https://www.topcoder-dev.com/thrive/tracks?track=Development"
127+
href="https://www.topcoder-dev.com/thrive/tracks?track=Development&tax="
128128
>
129129
Development
130130
</a>
@@ -133,7 +133,7 @@ exports[`Matches shallow shapshot 1`] = `
133133
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
134134
>
135135
<a
136-
href="https://www.topcoder-dev.com/thrive/tracks?track=QA"
136+
href="https://www.topcoder-dev.com/thrive/tracks?track=QA&tax="
137137
>
138138
QA
139139
</a>

__tests__/shared/components/challenge-listing/Sidebar/__snapshots__/index.jsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports[`Matches shallow shapshot 1`] = `
1616
/>
1717
</div>
1818
<Footer
19-
hideTcLinksInFooter={false}
19+
hideTcLinksInFooter={true}
2020
/>
2121
</div>
2222
`;
@@ -37,7 +37,7 @@ exports[`Matches shallow shapshot 2`] = `
3737
/>
3838
</div>
3939
<Footer
40-
hideTcLinksInFooter={false}
40+
hideTcLinksInFooter={true}
4141
/>
4242
</div>
4343
`;

config/default.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ module.exports = {
135135
STUDIO_FONTS_POLICY:
136136
'http://help.topcoder.com/hc/en-us/articles/217959447-Font-Policy-for-Design-Challenges',
137137
TOPCODER_TERMS: 'https://www.topcoder.com/community/how-it-works/terms/',
138+
HOWTOCOMPETEINMARATHON: 'https://www.topcoder.com/thrive/articles/How%20To%20Compete%20in%20a%20Marathon%20Match',
139+
USABLECODEDEV: 'https://www.topcoder.com/thrive/articles/Usable%20Code%20in%20Dev%20Challenges',
140+
EXTENSIONVSCODE: 'https://marketplace.visualstudio.com/items?itemName=Topcoder.topcoder-workflow&ssr=false#overview',
138141
},
139142

140143
IOS: 'https://ios.topcoder-dev.com',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"supertest": "^3.1.0",
141141
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
142142
"tc-ui": "^1.0.12",
143-
"topcoder-react-lib": "1.1.0",
143+
"topcoder-react-lib": "1.1.1",
144144
"topcoder-react-ui-kit": "2.0.1",
145145
"topcoder-react-utils": "0.7.8",
146146
"turndown": "^4.0.2",

src/assets/themes/tco/TCO20.svg

Lines changed: 36 additions & 0 deletions
Loading

src/shared/actions/page/challenge-details.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function setSpecsTabState(state) {
5959
* @param {Boolean} open
6060
* @return {Object}
6161
*/
62-
function toggleCheckpointFeedback(id, open) {
62+
function toggleCheckpointFeedback(id, open = false) {
6363
return { id, open };
6464
}
6565

src/shared/components/ChallengeTile/index.jsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Challenge tile.
33
*/
44
/* eslint-env browser */
5+
import _ from 'lodash';
56
import React from 'react';
67
import PT from 'prop-types';
78
import { Link } from 'react-router-dom';
@@ -74,6 +75,7 @@ class ChallengeTile extends React.Component {
7475
} = this.props;
7576

7677
const { track, type } = challenge;
78+
const roles = _.get(challenge, 'userDetails.roles');
7779

7880
const outStyleName = `challenge tile-view ${track.replace(' ', '-').toLowerCase()}`;
7981
const extraStyle = {
@@ -307,19 +309,22 @@ class ChallengeTile extends React.Component {
307309
) }
308310
</div>
309311

310-
<p styleName="roles">
311-
{ track !== COMPETITION_TRACKS.DS
312+
{ !_.isEmpty(roles)
313+
&& (
314+
<p styleName="roles">
315+
{ track !== COMPETITION_TRACKS.DS
312316
&& (
313317
<span>
314318
<span>
315319
Role: &nbsp;
316320
</span>
317321
<span>
318-
{ listRoles(challenge.userDetails.roles) }
322+
{ listRoles(roles) }
319323
</span>
320324
</span>
321325
) }
322-
</p>
326+
</p>
327+
) }
323328
</div>
324329
</div>
325330
</div>

src/shared/components/Dashboard/SRM/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const SRM = (props) => {
3535
<a href={`${config.URL.COMMUNITY}/tc?module=ProblemArchive`} className="tc-btn tc-btn-s tc-btn-wide tc-btn-ghost" styleName="tc-btn">
3636
Problem Archive
3737
</a>
38-
<a href={`${config.URL.BASE}/member-onboarding/learning-practicing-skills/`} className="tc-btn tc-btn-s tc-btn-wide tc-btn-ghost" styleName="tc-btn">
38+
<a href={`${config.URL.BASE}/thrive/articles/How%20To%20Compete%20in%20SRMs`} className="tc-btn tc-btn-s tc-btn-wide tc-btn-ghost" styleName="tc-btn">
3939
Learn More
4040
</a>
4141
</div>

src/shared/components/SubmissionManagement/Submission/index.jsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import _ from 'lodash';
1515
import moment from 'moment';
1616
import React from 'react';
17-
import { config } from 'topcoder-react-utils';
1817
import { COMPETITION_TRACKS, CHALLENGE_STATUS } from 'utils/tc';
1918

2019
import PT from 'prop-types';
@@ -31,12 +30,14 @@ export default function Submission(props) {
3130
submissionObject,
3231
showScreeningDetails,
3332
track,
33+
onDownload,
3434
onDelete,
3535
onShowDetails,
3636
status,
3737
allowDelete,
3838
} = props;
3939
const formatDate = date => moment(+new Date(date)).format('MMM DD, YYYY hh:mm A');
40+
const onDownloadSubmission = onDownload.bind(1, submissionObject.id);
4041

4142
return (
4243
<tr styleName="submission-row">
@@ -66,15 +67,12 @@ export default function Submission(props) {
6667
}
6768
<td styleName="action-col">
6869
<div>
69-
<a
70-
href={
71-
track === COMPETITION_TRACKS.DES
72-
? `${config.URL.ONLINE_REVIEW}/review/actions/DownloadContestSubmission?uid=${submissionObject.id}`
73-
: submissionObject.download
74-
}
70+
<button
71+
onClick={() => onDownloadSubmission(submissionObject.id)}
72+
type="button"
7573
>
7674
<DownloadIcon />
77-
</a>
75+
</button>
7876
{ /*
7977
TODO: At the moment we just fetch downloads from the legacy
8078
Topcoder Studio API, and we don't need any JS code to this.
@@ -132,6 +130,7 @@ Submission.propTypes = {
132130
}),
133131
showScreeningDetails: PT.bool,
134132
track: PT.string.isRequired,
133+
onDownload: PT.func.isRequired,
135134
onDelete: PT.func.isRequired,
136135
onShowDetails: PT.func,
137136
status: PT.string.isRequired,

src/shared/components/TopcoderFooter/index.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ export default function TopcoderFooter() {
5858
<div styleName="sep-line" />
5959
<ul styleName="navi-col-links">
6060
<Link to={`${base}/thrive/tracks?track=Competitive%20Programming`}>Competitive Programming</Link>
61-
<Link to={`${base}/thrive/tracks?track=Data%20Science`}>Data Science</Link>
62-
<Link to={`${base}/thrive/tracks?track=Design`}>Design</Link>
63-
<Link to={`${base}/thrive/tracks?track=Development`}>Development</Link>
64-
<Link to={`${base}/thrive/tracks?track=QA`}>QA</Link>
61+
<Link to={`${base}/thrive/tracks?track=Data%20Science&tax=`}>Data Science</Link>
62+
<Link to={`${base}/thrive/tracks?track=Design&tax=`}>Design</Link>
63+
<Link to={`${base}/thrive/tracks?track=Development&tax=`}>Development</Link>
64+
<Link to={`${base}/thrive/tracks?track=QA&tax=`}>QA</Link>
6565
</ul>
6666
</div>
6767
<div styleName="navi-col">

src/shared/components/buttons/themed/tc.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
text-decoration: none !important;
88
text-transform: uppercase !important;
99
margin: 0 !important;
10+
white-space: nowrap !important;
1011
}
1112

1213
@mixin primary-green {
@@ -107,6 +108,7 @@
107108
text-decoration: none !important;
108109
text-transform: uppercase !important;
109110
margin: 0 !important;
111+
white-space: nowrap !important;
110112
}
111113

112114
@mixin secondary-gray {
@@ -133,6 +135,7 @@
133135
font-weight: 700 !important;
134136
text-transform: uppercase !important;
135137
margin: 0 !important;
138+
white-space: nowrap !important;
136139
}
137140

138141
@mixin warn-red {

0 commit comments

Comments
 (0)