Skip to content

Commit 71721f4

Browse files
authored
Merge pull request #5155 from topcoder-platform/develop
Bug fixes
2 parents bce025e + 31958f6 commit 71721f4

File tree

31 files changed

+406
-67
lines changed

31 files changed

+406
-67
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ workflows:
245245
filters:
246246
branches:
247247
only:
248-
- listing-develop-sync
248+
- issue-5041
249249
# This is beta env for production soft releases
250250
- "build-prod-beta":
251251
context : org-global

__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/ProfilePage/__snapshots__/index.jsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports[`renders a full Profile correctly 1`] = `
1616
>
1717
<Sticky
1818
activeClass="active"
19-
bottomBoundary={-250}
19+
bottomBoundary={0}
2020
enableTransforms={true}
2121
enabled={true}
2222
onStateChange={null}
@@ -630,7 +630,7 @@ exports[`renders an empty Profile correctly 1`] = `
630630
>
631631
<Sticky
632632
activeClass="active"
633-
bottomBoundary={-250}
633+
bottomBoundary={0}
634634
enableTransforms={true}
635635
enabled={true}
636636
onStateChange={null}

__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',

src/assets/themes/tco/TCO20.svg

Lines changed: 36 additions & 0 deletions
Loading

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/ProfilePage/Header/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ class ProfileHeader extends React.Component {
3535
const {
3636
info,
3737
} = this.props;
38-
const { photoURL } = info;
38+
let photoURL = '';
39+
if (isomorphy.isClientSide()) {
40+
({ photoURL } = info);
41+
}
3942
this.state = {
4043
imageUrl: photoURL,
4144
};

src/shared/components/ProfilePage/index.jsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import React from 'react';
88
import PT from 'prop-types';
99
import { PrimaryButton } from 'topcoder-react-ui-kit';
1010
import Sticky from 'react-stickynode';
11+
import { isomorphy } from 'topcoder-react-utils';
1112

1213
import Robot from 'assets/images/robot-happy.svg';
1314

@@ -55,11 +56,15 @@ class ProfilePage extends React.Component {
5556

5657
componentDidMount() {
5758
this.handleResize();
58-
window.addEventListener('resize', this.handleResize);
59+
if (isomorphy.isClientSide()) {
60+
window.addEventListener('resize', this.handleResize);
61+
}
5962
}
6063

6164
componentWillUnmount() {
62-
window.removeEventListener('resize', this.handleResize);
65+
if (isomorphy.isClientSide()) {
66+
window.removeEventListener('resize', this.handleResize);
67+
}
6368
}
6469

6570
getActiveTracks() {
@@ -181,7 +186,7 @@ class ProfilePage extends React.Component {
181186
<div styleName="about-container">
182187
<div styleName="profile-header-container">
183188
<Sticky
184-
bottomBoundary={document.body.scrollHeight - 250}
189+
bottomBoundary={isomorphy.isClientSide() ? document.body.scrollHeight - 250 : 0}
185190
enabled={!isMobile}
186191
top={10}
187192
>

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 {

src/shared/components/challenge-detail/Header/DeadlinesPanel/Card/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import './style.scss';
1010

1111
/* Date/time format to use in the card. */
1212
const FORMAT = 'MMM DD, HH:mm';
13+
const FORMAT_YEAR = 'MMM DD YYYY, HH:mm';
1314

1415
export default function Card({ past, time, title }) {
1516
const time2 = moment(time);
@@ -20,7 +21,7 @@ export default function Card({ past, time, title }) {
2021
{title}
2122
</p>
2223
<p styleName="date">
23-
{time2.format(FORMAT)}
24+
{time2.format(time2.year() !== moment().year() ? FORMAT_YEAR : FORMAT)}
2425
</p>
2526
</div>
2627
);

src/shared/components/challenge-detail/Specification/SideBar/index.jsx

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,28 @@ export default function SideBar({
8888
</div>
8989
);
9090

91+
const usableCodeArticle = (
92+
<div styleName="tctooltiptext tooltiptextapproval">
93+
<h4>
94+
Useable Code Rules
95+
</h4>
96+
<p>
97+
A set of guidelines to help determine if code is acceptable or not.
98+
</p>
99+
</div>
100+
);
101+
102+
const vscodeTip = (
103+
<div styleName="tctooltiptext tooltiptextapproval">
104+
<h4>
105+
Topcoder Extension for VSCode
106+
</h4>
107+
<p>
108+
Shortcuts to perform actions related to Topcoder platform without having to open a browser
109+
</p>
110+
</div>
111+
);
112+
91113
return (
92114
<div styleName="challenge-spec-sidebar">
93115
<div styleName="challenge-sidebar-inner">
@@ -197,9 +219,45 @@ export default function SideBar({
197219
</span>
198220
)
199221
}
222+
{
223+
!isDesign && (
224+
<span styleName="link-like-paragraph tooltip-container">
225+
<a
226+
href={config.URL.INFO.USABLECODEDEV}
227+
title="Useable Code Rules"
228+
target="_blank"
229+
rel="noreferrer"
230+
>
231+
Useable Code Rules
232+
</a>
233+
<Tooltip id="usablecode-tip" content={usableCodeArticle} className={styles['tooltip-overlay']} trigger={['hover', 'focus']}>
234+
<div styleName="tctooltip" tabIndex="0" role="button" aria-describedby="usablecode-tip">
235+
?
236+
</div>
237+
</Tooltip>
238+
</span>
239+
)
240+
}
200241
</div>
201242
)
202243
}
244+
{ isMM && (
245+
<div>
246+
<h2>
247+
CHALLENGE LINKS:
248+
</h2>
249+
<p styleName="link-like-paragraph">
250+
<a
251+
href={config.URL.INFO.HOWTOCOMPETEINMARATHON}
252+
title="How To Compete in a Marathon Match"
253+
target="_blank"
254+
rel="noreferrer"
255+
>
256+
How To Compete in a Marathon Match
257+
</a>
258+
</p>
259+
</div>
260+
)}
203261
{
204262
isDesign
205263
&& (
@@ -331,6 +389,26 @@ export default function SideBar({
331389
</div>
332390
)
333391
}
392+
<div>
393+
<h2>
394+
TOOLBOX:
395+
</h2>
396+
<span styleName="link-like-paragraph tooltip-container">
397+
<a
398+
href={config.URL.INFO.EXTENSIONVSCODE}
399+
title="Topcoder Extension for VSCode"
400+
target="_blank"
401+
rel="noreferrer"
402+
>
403+
Topcoder Extension <br /> for VSCode
404+
</a>
405+
<Tooltip id="vscode-tip" content={vscodeTip} className={styles['tooltip-overlay']} trigger={['hover', 'focus']}>
406+
<div styleName="tctooltip" tabIndex="0" role="button" aria-describedby="vscode-tip">
407+
?
408+
</div>
409+
</Tooltip>
410+
</span>
411+
</div>
334412
{ shareable && (
335413
<div>
336414
<h2>

src/shared/components/challenge-detail/Specification/SideBar/styles.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
@import "mixins";
22

3+
.no-margin-top {
4+
margin-top: -10px !important;
5+
}
6+
37
.challenge-spec-sidebar {
48
background: $tc-dark-blue-10;
59
width: 245px;

src/shared/components/challenge-listing/Filters/ChallengeFilters.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import SwitchWithLabel from 'components/SwitchWithLabel';
77
import { challenge as challengeUtils } from 'topcoder-react-lib';
88
// import { COMPETITION_TRACKS as TRACKS } from 'utils/tc';
99
import _ from 'lodash';
10+
import { BUCKETS } from 'utils/challenge-listing/buckets';
1011

1112
// import localStorage from 'localStorage';
1213
import ChallengeSearchBar from './ChallengeSearchBar';
@@ -49,6 +50,7 @@ export default function ChallengeFilters({
4950
if (filterState.events && filterState.events.length) filterRulesCount += 1;
5051
if (filterState.tags && filterState.tags.length) filterRulesCount += 1;
5152
if (filterState.types && filterState.types.length) filterRulesCount += 1;
53+
if (activeBucket === BUCKETS.ALL && filterState.status && filterState.status !== 'All') filterRulesCount += 1;
5254
if (filterState.endDateStart || filterState.startDateEnd) {
5355
filterRulesCount += 1;
5456
}

0 commit comments

Comments
 (0)