Skip to content

Commit 5b6c782

Browse files
Merge branch 'develop' into gig-work-updates
2 parents 37e384f + bc76bd8 commit 5b6c782

File tree

11 files changed

+59
-26
lines changed

11 files changed

+59
-26
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ workflows:
237237
filters:
238238
branches:
239239
only:
240-
- gig-work-updates
240+
- free
241241
# This is alternate dev env for parallel testing
242242
- "build-qa":
243243
context : org-global

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ exports[`Matches shallow shapshot 1`] = `
5656
>
5757
<a
5858
href="undefined/members/undefined/"
59+
style={
60+
Object {
61+
"color": null,
62+
}
63+
}
5964
target="_blank"
6065
/>
6166
<div
@@ -103,6 +108,11 @@ exports[`Matches shallow shapshot 1`] = `
103108
>
104109
<a
105110
href="undefined/members/undefined/"
111+
style={
112+
Object {
113+
"color": null,
114+
}
115+
}
106116
target="_blank"
107117
/>
108118
<div
@@ -150,6 +160,11 @@ exports[`Matches shallow shapshot 1`] = `
150160
>
151161
<a
152162
href="undefined/members/undefined/"
163+
style={
164+
Object {
165+
"color": null,
166+
}
167+
}
153168
target="_blank"
154169
/>
155170
<div
@@ -197,6 +212,11 @@ exports[`Matches shallow shapshot 1`] = `
197212
>
198213
<a
199214
href="undefined/members/undefined/"
215+
style={
216+
Object {
217+
"color": null,
218+
}
219+
}
200220
target="_blank"
201221
/>
202222
<div
Lines changed: 1 addition & 1 deletion
Loading

src/shared/components/Leaderboard/ChallengeHistoryModal/styles.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ $light-gray: #d4d4d4;
6363
img,
6464
svg {
6565
border-radius: 50%;
66-
border-style: solid;
67-
border-width: 3px;
6866
height: 100%;
6967
width: 100%;
7068
}

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { Avatar } from 'topcoder-react-ui-kit';
2929
import { config } from 'topcoder-react-utils';
3030
import _ from 'lodash';
3131
import DefaultAvatar from 'assets/images/default-avatar-photo.svg';
32+
import { getRatingColor } from 'utils/tc';
3233

3334

3435
import avatarStyles from '../avatarStyles.scss';
@@ -68,6 +69,7 @@ export default function LeaderboardTable(props) {
6869
const fulfillment = competitor['tco_leaderboard.fulfillment']
6970
? (parseFloat(competitor['tco_leaderboard.fulfillment']) * 100).toFixed(2).replace(/[.,]00$/, '')
7071
: competitor.fulfillment;
72+
const rating = competitor['member_profile_basic.max_rating'];
7173
return (
7274
<tr key={competitor.rank}>
7375
<td styleName={`${stylesName}.col-rank`}>{competitor.rank}</td>
@@ -91,11 +93,16 @@ export default function LeaderboardTable(props) {
9193
<div
9294
styleName={`${stylesName}.handle-link`}
9395
onClick={() => onUsernameClick(competitor)}
96+
style={{ color: rating ? getRatingColor(rating) : null }}
9497
>
9598
{competitor['member_profile_basic.handle'] || competitor.handle}
9699
</div>
97100
) : (
98-
<a href={`${window.origin}/members/${competitor['member_profile_basic.handle'] || competitor.handle}/`} target={`${_.includes(window.origin, 'www') ? '_self' : '_blank'}`}>
101+
<a
102+
href={`${window.origin}/members/${competitor['member_profile_basic.handle'] || competitor.handle}/`}
103+
target={`${_.includes(window.origin, 'www') ? '_self' : '_blank'}`}
104+
style={{ color: rating ? getRatingColor(rating) : null }}
105+
>
99106
{competitor['member_profile_basic.handle'] || competitor.handle}
100107
</a>
101108
)

src/shared/components/Leaderboard/LeaderboardTable/themes/tco20.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@import '~styles/mixins';
2-
$table-cell-padding: 8px;
2+
$table-cell-padding: 2px;
33
$table-border-color: #d4d4d4;
44
$table-bg-hover: #f5f5f5;
55

@@ -115,13 +115,13 @@ $table-bg-hover: #f5f5f5;
115115

116116
.col-avatar .leaderboard-avatar {
117117
display: inline-block;
118-
height: 40px;
119-
width: 40px;
118+
height: 34px;
119+
width: 34px;
120120
overflow: hidden;
121121

122122
svg {
123-
border: 3px solid rgba(0, 0, 0, 0.05);
124123
border-radius: 50%;
124+
max-width: 100%;
125125
}
126126
}
127127

src/shared/components/Leaderboard/Podium/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@include roboto-regular;
55

66
line-height: 1.42;
7-
margin: 0 auto 40px auto;
7+
margin: 0 auto 10px auto;
88
text-align: center;
99

1010
&::before,

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { Avatar } from 'topcoder-react-ui-kit';
3030
import { config } from 'topcoder-react-utils';
3131
import _ from 'lodash';
3232
import DefaultAvatar from 'assets/images/default-avatar-photo.svg';
33+
import { getRatingColor } from 'utils/tc';
3334

3435
import avatarStyles from '../avatarStyles.scss';
3536
import defaultStyles from './themes/styles.scss'; // eslint-disable-line
@@ -110,7 +111,7 @@ export default function PodiumSpot(props) {
110111
const fulfillment = competitor['tco_leaderboard.fulfillment']
111112
? (parseFloat(competitor['tco_leaderboard.fulfillment']) * 100).toFixed(2).replace(/[.,]00$/, '')
112113
: competitor.fulfillment;
113-
114+
const rating = competitor['member_profile_basic.max_rating'];
114115
return (
115116
<div styleName={rootStyle}>
116117
<span styleName={`${stylesName}.leaderboard-avatar`}>
@@ -159,6 +160,7 @@ export default function PodiumSpot(props) {
159160
<div
160161
styleName={`${stylesName}.handle-link`}
161162
onClick={() => onUsernameClick(competitor)}
163+
style={{ color: rating ? getRatingColor(rating) : null }}
162164
>
163165
{competitor['member_profile_basic.handle'] || competitor.handle}
164166
</div>
@@ -167,6 +169,7 @@ export default function PodiumSpot(props) {
167169
styleName={`${stylesName}.profile-link`}
168170
href={`${window.origin}/members/${competitor['member_profile_basic.handle'] || competitor.handle}/`}
169171
target={`${_.includes(window.origin, 'www') ? '_self' : '_blank'}`}
172+
style={{ color: rating ? getRatingColor(rating) : null }}
170173
>
171174
{competitor['member_profile_basic.handle'] || competitor.handle}
172175
</a>

src/shared/components/Leaderboard/PodiumSpot/themes/tco20.scss

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,24 @@ $podium-border-color: #ededf2;
1111
display: inline-block;
1212
position: relative;
1313
margin-bottom: 12px;
14-
margin-right: 20px;
14+
margin-right: 11px;
1515
overflow: visible;
1616
}
1717

1818
.ranking {
1919
@include roboto-black;
2020

2121
border-radius: 20px;
22-
padding: 3px 9px;
23-
display: inline-block;
22+
display: flex;
23+
padding: 0;
24+
align-items: center;
25+
justify-content: center;
2426
position: absolute;
2527
right: 0;
2628
bottom: -10px;
2729
font-size: 15px;
30+
width: 28px;
31+
height: 28px;
2832
}
2933

3034
.winnings-info span {
@@ -91,12 +95,13 @@ $podium-border-color: #ededf2;
9195
.handle-link,
9296
a.profile-link {
9397
color: #0d61bf;
94-
font-family: Barlow, sans-serif;
98+
font-family: Roboto, sans-serif;
9599
font-size: 16px;
96100
font-weight: 600;
97-
line-height: 19px;
101+
line-height: 24px;
98102
text-align: left;
99103
text-decoration: underline;
104+
margin-top: 11px;
100105
margin-bottom: 13px;
101106

102107
&:hover {
@@ -110,37 +115,37 @@ $podium-border-color: #ededf2;
110115
}
111116

112117
.PodiumSpot--first {
113-
background-color: #ffd84d;
118+
background-color: #f4f4f4;
114119

115120
.ranking {
116-
background-color: #2a2a2a;
121+
background-color: #ffd84d;
117122
color: #fff;
118123
}
119124
}
120125

121126
.PodiumSpot--second {
122-
background-color: #d4d4d4;
127+
background-color: #f4f4f4;
123128

124129
.ranking {
125-
background-color: #2a2a2a;
130+
background-color: #746b65;
126131
color: #fff;
127132
}
128133
}
129134

130135
.PodiumSpot--third {
131-
background-color: #f1a87d;
136+
background-color: #f4f4f4;
132137

133138
.ranking {
134-
background-color: #2a2a2a;
139+
background-color: #854e29;
135140
color: #fff;
136141
}
137142
}
138143

139144
.PodiumSpot--fourth {
140-
background-color: #8dccd4;
145+
background-color: #f4f4f4;
141146

142147
.ranking {
143-
background-color: #2a2a2a;
148+
background-color: #1e94a3;
144149
color: #fff;
145150
}
146151
}

src/shared/containers/tco/Leaderboard/themes/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.Leaderboard {
44
padding: 0;
5-
margin: 50px auto;
5+
margin: 40px auto;
66
max-width: $screen-md;
77
}
88

src/shared/utils/tc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const RATING_COLORS = [{
112112
color: '#616BD5' /* Blue */,
113113
limit: 1500,
114114
}, {
115-
color: '#FCD617' /* Yellow */,
115+
color: '#F2C900' /* Yellow */,
116116
limit: 2200,
117117
}, {
118118
color: '#EF3A3A' /* Red */,

0 commit comments

Comments
 (0)