Skip to content

Commit 18a82aa

Browse files
Merge pull request #6573 from topcoder-platform/develop
Release v1.17.8
2 parents 0994dc0 + aa038e9 commit 18a82aa

File tree

18 files changed

+1078
-77
lines changed

18 files changed

+1078
-77
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ workflows:
356356
filters:
357357
branches:
358358
only:
359-
- tco23
359+
- free
360360
# This is alternate dev env for parallel testing
361361
- "build-qa":
362362
context : org-global
@@ -370,7 +370,6 @@ workflows:
370370
filters:
371371
branches:
372372
only:
373-
- footer-update
374373
- reskin-profile
375374
# This is stage env for production QA releases
376375
- "build-prod-staging":
@@ -380,6 +379,7 @@ workflows:
380379
only:
381380
- develop
382381
- fix-security-headers
382+
- tco23-BS-comps
383383
# Production builds are exectuted
384384
# when PR is merged to the master
385385
# Don't change anything in this configuration

__tests__/shared/components/Leaderboard/__snapshots__/LeaderboardTable.jsx.snap

+24-12
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ exports[`Matches shallow shapshot 1`] = `
3636
<td
3737
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-rank___3kfOx"
3838
>
39-
1
39+
<span>
40+
1
41+
</span>
4042
</td>
4143
<td
4244
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-avatar___3VhCz"
@@ -55,7 +57,8 @@ exports[`Matches shallow shapshot 1`] = `
5557
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-handle___1wDhG"
5658
>
5759
<a
58-
href="undefined/members/undefined/"
60+
href="https://www.topcoder-dev.com/members/undefined/"
61+
rel="noreferrer"
5962
style={
6063
Object {
6164
"color": null,
@@ -71,7 +74,7 @@ exports[`Matches shallow shapshot 1`] = `
7174
points
7275
</span>
7376
<span>
74-
challenges
77+
undefined challenges
7578
</span>
7679
</div>
7780
</td>
@@ -88,7 +91,9 @@ exports[`Matches shallow shapshot 1`] = `
8891
<td
8992
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-rank___3kfOx"
9093
>
91-
1
94+
<span>
95+
1
96+
</span>
9297
</td>
9398
<td
9499
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-avatar___3VhCz"
@@ -107,7 +112,8 @@ exports[`Matches shallow shapshot 1`] = `
107112
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-handle___1wDhG"
108113
>
109114
<a
110-
href="undefined/members/undefined/"
115+
href="https://www.topcoder-dev.com/members/undefined/"
116+
rel="noreferrer"
111117
style={
112118
Object {
113119
"color": null,
@@ -123,7 +129,7 @@ exports[`Matches shallow shapshot 1`] = `
123129
points
124130
</span>
125131
<span>
126-
challenges
132+
undefined challenges
127133
</span>
128134
</div>
129135
</td>
@@ -140,7 +146,9 @@ exports[`Matches shallow shapshot 1`] = `
140146
<td
141147
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-rank___3kfOx"
142148
>
143-
1
149+
<span>
150+
1
151+
</span>
144152
</td>
145153
<td
146154
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-avatar___3VhCz"
@@ -159,7 +167,8 @@ exports[`Matches shallow shapshot 1`] = `
159167
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-handle___1wDhG"
160168
>
161169
<a
162-
href="undefined/members/undefined/"
170+
href="https://www.topcoder-dev.com/members/undefined/"
171+
rel="noreferrer"
163172
style={
164173
Object {
165174
"color": null,
@@ -175,7 +184,7 @@ exports[`Matches shallow shapshot 1`] = `
175184
points
176185
</span>
177186
<span>
178-
challenges
187+
undefined challenges
179188
</span>
180189
</div>
181190
</td>
@@ -192,7 +201,9 @@ exports[`Matches shallow shapshot 1`] = `
192201
<td
193202
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-rank___3kfOx"
194203
>
195-
1
204+
<span>
205+
1
206+
</span>
196207
</td>
197208
<td
198209
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-avatar___3VhCz"
@@ -211,7 +222,8 @@ exports[`Matches shallow shapshot 1`] = `
211222
className="src-shared-components-Leaderboard-LeaderboardTable-themes-___styles__col-handle___1wDhG"
212223
>
213224
<a
214-
href="undefined/members/undefined/"
225+
href="https://www.topcoder-dev.com/members/undefined/"
226+
rel="noreferrer"
215227
style={
216228
Object {
217229
"color": null,
@@ -227,7 +239,7 @@ exports[`Matches shallow shapshot 1`] = `
227239
points
228240
</span>
229241
<span>
230-
challenges
242+
undefined challenges
231243
</span>
232244
</div>
233245
</td>

__tests__/shared/components/Leaderboard/__snapshots__/Podium.jsx.snap

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
exports[`Matches shallow shapshot 1`] = `
44
<div
5-
className="src-shared-components-Leaderboard-Podium-___styles__Podium___2rb4T"
5+
className="src-shared-components-Leaderboard-Podium-themes-___default__Podium___1qIZm"
66
>
77
<div
8-
className="src-shared-components-Leaderboard-Podium-___styles__PodiumWrap___2Czwe"
8+
className="src-shared-components-Leaderboard-Podium-themes-___default__PodiumWrap___2hDWP"
99
style={
1010
Object {
1111
"justify-content": "space-between",
1212
}
1313
}
1414
>
1515
<div
16-
className="src-shared-components-Leaderboard-Podium-___styles__podium-column___rPHl-"
16+
className="src-shared-components-Leaderboard-Podium-themes-___default__podium-column___2Zi0Z"
1717
>
1818
<PodiumSpot
1919
competitor={
@@ -33,7 +33,7 @@ exports[`Matches shallow shapshot 1`] = `
3333
/>
3434
</div>
3535
<div
36-
className="src-shared-components-Leaderboard-Podium-___styles__podium-column___rPHl-"
36+
className="src-shared-components-Leaderboard-Podium-themes-___default__podium-column___2Zi0Z"
3737
>
3838
<PodiumSpot
3939
competitor={
@@ -53,7 +53,7 @@ exports[`Matches shallow shapshot 1`] = `
5353
/>
5454
</div>
5555
<div
56-
className="src-shared-components-Leaderboard-Podium-___styles__podium-column___rPHl-"
56+
className="src-shared-components-Leaderboard-Podium-themes-___default__podium-column___2Zi0Z"
5757
>
5858
<PodiumSpot
5959
competitor={
@@ -73,7 +73,7 @@ exports[`Matches shallow shapshot 1`] = `
7373
/>
7474
</div>
7575
<div
76-
className="src-shared-components-Leaderboard-Podium-___styles__podium-column___rPHl-"
76+
className="src-shared-components-Leaderboard-Podium-themes-___default__podium-column___2Zi0Z"
7777
>
7878
<PodiumSpot
7979
competitor={
@@ -98,10 +98,10 @@ exports[`Matches shallow shapshot 1`] = `
9898

9999
exports[`Matches shallow shapshot 2`] = `
100100
<div
101-
className="src-shared-components-Leaderboard-Podium-___styles__Podium___2rb4T"
101+
className="src-shared-components-Leaderboard-Podium-themes-___default__Podium___1qIZm"
102102
>
103103
<div
104-
className="src-shared-components-Leaderboard-Podium-___styles__PodiumWrap___2Czwe"
104+
className="src-shared-components-Leaderboard-Podium-themes-___default__PodiumWrap___2hDWP"
105105
style={Object {}}
106106
/>
107107
</div>

src/shared/components/Contentful/Tabs/themes/underline.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $text-color-pannel: #4a4a4a;
88
.container {
99
@include roboto-regular;
1010

11-
max-width: $screen-md;
11+
max-width: $screen-lg;
1212
margin: auto;
1313
}
1414

@@ -98,6 +98,6 @@ $text-color-pannel: #4a4a4a;
9898
display: block;
9999

100100
@include xs-to-sm {
101-
padding: 0 15px;
101+
// padding: 0 15px;
102102
}
103103
}

src/shared/components/Contentful/_brackets.scss

+4
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@
154154
color: #0d61bf;
155155
text-decoration: none;
156156

157+
@include sm {
158+
text-decoration: underline;
159+
}
160+
157161
&:hover {
158162
text-decoration: none;
159163
color: #0d61bf;

src/shared/components/Leaderboard/ChallengeHistoryModal/index.jsx

+43-32
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@ import LoadingIndicator from 'components/LoadingIndicator';
55
import { config } from 'topcoder-react-utils';
66
import cn from 'classnames';
77
import _ from 'lodash';
8-
import theme from './styles.scss';
98
import PodiumSpot from '../PodiumSpot';
109

10+
import defaultTheme from './themes/styles.scss';
11+
import tco23Theme from './themes/tco23.scss';
12+
13+
const THEMES = {
14+
Default: defaultTheme,
15+
TCO23: tco23Theme,
16+
};
17+
1118
class ChallengeHistoryModal extends Component {
1219
constructor(props) {
1320
super(props);
@@ -34,31 +41,49 @@ class ChallengeHistoryModal extends Component {
3441
const challengesOrdered = _.orderBy(challenges, [sortParam.field], [sortParam.order]);
3542
const placeLabel = competitor['member_profile_basic.handle'] ? 'tco_leaderboard.placement' : 'place';
3643
const pointsLabel = competitor['member_profile_basic.handle'] ? 'tco_leaderboard.tco_points' : 'points';
44+
const styles = THEMES[themeName] || THEMES.Default;
45+
/* eslint-disable no-confusing-arrow */
46+
const sortInner = () => themeName === 'TCO23' ? (
47+
<svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
48+
<path fillRule="evenodd" clipRule="evenodd" d="M3.26721 0.267169C3.48786 0.046523 3.84559 0.046523 4.06624 0.267169L6.73291 2.93384C6.95355 3.15448 6.95355 3.51222 6.73291 3.73287C6.51226 3.95351 6.15452 3.95351 5.93388 3.73287L4.23173 2.03072V8.66668C4.23173 8.97873 3.97877 9.23168 3.66673 9.23168C3.35468 9.23168 3.10173 8.97873 3.10173 8.66668V2.03072L1.39957 3.73287C1.17893 3.95351 0.821189 3.95351 0.600543 3.73287C0.379897 3.51222 0.379897 3.15448 0.600543 2.93384L3.26721 0.267169ZM9.76839 3.33335C9.76839 3.02131 10.0214 2.76835 10.3334 2.76835C10.6454 2.76835 10.8984 3.02131 10.8984 3.33335V9.96932L12.6005 8.26717C12.8212 8.04652 13.1789 8.04652 13.3996 8.26717C13.6202 8.48781 13.6202 8.84555 13.3996 9.0662L10.7329 11.7329C10.5123 11.9535 10.1545 11.9535 9.93388 11.7329L7.26721 9.0662C7.04656 8.84555 7.04656 8.48781 7.26721 8.26717C7.48786 8.04652 7.84559 8.04652 8.06624 8.26717L9.76839 9.96932V3.33335Z" fill="#767676" />
49+
</svg>
50+
) : (
51+
<div>
52+
<div className={cn(styles['sort-up'], {
53+
active: sortParam.field === pointsLabel && sortParam.order === styles.asc,
54+
})}
55+
/>
56+
<div className={cn(styles['sort-down'], {
57+
active: sortParam.field === pointsLabel && sortParam.order === styles.desc,
58+
})}
59+
/>
60+
</div>
61+
);
3762

3863
return (
39-
<Modal onCancel={onCancel} theme={theme}>
64+
<Modal onCancel={onCancel} theme={THEMES[themeName] || THEMES.Default}>
4065
<h3>
4166
Completed Challenges History
4267
</h3>
43-
<div styleName="podium-spot-wrapper">
68+
<div className={styles['podium-spot-wrapper']}>
4469
<PodiumSpot
4570
competitor={competitor}
4671
isCopilot={isCopilot}
4772
isAlgo={isAlgo}
4873
themeName={themeName}
4974
/>
5075
</div>
51-
<table styleName="history-table">
76+
<table className={styles['history-table']}>
5277
<thead>
5378
<tr>
5479
<th>Challenge Name</th>
5580
{
5681
!isCopilot ? (
5782
<th>
58-
<div styleName="header-table-content">
83+
<div className={styles['header-table-content']}>
5984
<span>Placement</span>
6085
<button
61-
styleName="sort-container"
86+
className={styles['sort-container']}
6287
onClick={() => {
6388
if (!sortParam.field || sortParam.field !== placeLabel) {
6489
sortParam.field = placeLabel;
@@ -70,24 +95,17 @@ class ChallengeHistoryModal extends Component {
7095
}}
7196
type="button"
7297
>
73-
<div styleName={cn('sort-up', {
74-
active: sortParam.field === placeLabel && sortParam.order === 'asc',
75-
})}
76-
/>
77-
<div styleName={cn('sort-down', {
78-
active: sortParam.field === placeLabel && sortParam.order === 'desc',
79-
})}
80-
/>
98+
{ sortInner() }
8199
</button>
82100
</div>
83101
</th>
84102
) : null
85103
}
86104
<th>
87-
<div styleName="header-table-content">
105+
<div className={styles['header-table-content']}>
88106
<span>Points</span>
89107
<button
90-
styleName="sort-container"
108+
className={styles['sort-container']}
91109
onClick={() => {
92110
if (!sortParam.field || sortParam.field !== pointsLabel) {
93111
sortParam.field = pointsLabel;
@@ -99,14 +117,7 @@ class ChallengeHistoryModal extends Component {
99117
}}
100118
type="button"
101119
>
102-
<div styleName={cn('sort-up', {
103-
active: sortParam.field === pointsLabel && sortParam.order === 'asc',
104-
})}
105-
/>
106-
<div styleName={cn('sort-down', {
107-
active: sortParam.field === pointsLabel && sortParam.order === 'desc',
108-
})}
109-
/>
120+
{ sortInner() }
110121
</button>
111122
</div>
112123
</th>
@@ -115,19 +126,19 @@ class ChallengeHistoryModal extends Component {
115126
<tbody>
116127
{
117128
challengesOrdered.map(challenge => (
118-
<tr styleName="row" key={`${challenge['tco_leaderboard.challenge_id'] || challenge['challenge.challenge_id'] || challenge.challenge_id}`}>
119-
<td styleName="name">
120-
<a href={`${config.URL.BASE}/challenges/${challenge['tco_leaderboard.challenge_id'] || challenge['challenge.challenge_id'] || challenge.challenge_id || challenge['challenge.challenge_GUID']}/`} styleName="link" target="_blank" rel="noopener noreferrer">
129+
<tr className={styles.row} key={`${challenge['tco_leaderboard.challenge_id'] || challenge['challenge.challenge_id'] || challenge.challenge_id}`}>
130+
<td className={styles.name}>
131+
<a href={`${config.URL.BASE}/challenges/${challenge['tco_leaderboard.challenge_id'] || challenge['challenge.challenge_id'] || challenge.challenge_id || challenge['challenge.challenge_GUID']}/`} className={styles.link} target="_blank" rel="noopener noreferrer">
121132
{challenge.challenge_name || challenge['challenge.challenge_name'] || challenge['tco_leaderboard.challenge_id'] || challenge.challenge_id}
122133
</a>
123134
</td>
124135
{
125136
!isCopilot ? (
126-
<td styleName="placement">{challenge['tco_leaderboard.placement'] || challenge.place}</td>
137+
<td className={styles.placement}>{challenge['tco_leaderboard.placement'] || challenge.place}<span>placement</span></td>
127138
) : null
128139
}
129-
<td styleName="points">
130-
{challenge['tco_leaderboard.tco_points'] || challenge.points}
140+
<td className={styles.points}>
141+
{challenge['tco_leaderboard.tco_points'] || challenge.points}<span>points</span>
131142
</td>
132143
</tr>
133144
))
@@ -142,8 +153,8 @@ class ChallengeHistoryModal extends Component {
142153
<center><strong>No data available.</strong></center>
143154
)
144155
}
145-
<div styleName="buttons">
146-
<button onClick={onCancel} type="button" styleName="close-btn">
156+
<div className={styles.buttons}>
157+
<button onClick={onCancel} type="button" className={styles['close-btn']}>
147158
Return to page
148159
</button>
149160
</div>

0 commit comments

Comments
 (0)