@@ -13,6 +13,7 @@ const table = (props) => {
13
13
}
14
14
const algorithmLeaderboard = track === 'algorithm'
15
15
const f2fLeaderboard = fullWidth
16
+ const isDevOrQa = isDev || isQa
16
17
return (
17
18
< div className = { 'container' + smallClass + sizeClass + `${ trackTableClass ( track ) } ` } >
18
19
< div className = 'header' >
@@ -27,25 +28,25 @@ const table = (props) => {
27
28
{ largeColumns && algorithmLeaderboard && < div className = 'algorithmFieldCell' >
28
29
1000
29
30
</ div > }
30
- { largeColumns && f2fLeaderboard && < div className = 'f2fPblmCell' >
31
+ { largeColumns && f2fLeaderboard && ! isDevOrQa && < div className = 'f2fPblmCell' >
31
32
Problem 1
32
33
</ div > }
33
- { largeColumns && f2fLeaderboard && < div className = 'f2fTestCell' >
34
+ { largeColumns && f2fLeaderboard && ! isDevOrQa && < div className = 'f2fTestCell' >
34
35
TESTS PASSED/TOTAL
35
36
</ div > }
36
- { largeColumns && f2fLeaderboard && < div className = 'f2fPblmCell' >
37
+ { largeColumns && f2fLeaderboard && ! isDevOrQa && < div className = 'f2fPblmCell' >
37
38
Problem 2
38
39
</ div > }
39
- { largeColumns && f2fLeaderboard && < div className = 'f2fTestCell' >
40
+ { largeColumns && f2fLeaderboard && ! isDevOrQa && < div className = 'f2fTestCell' >
40
41
TESTS PASSED/TOTAL
41
42
</ div > }
42
- { largeColumns && f2fLeaderboard && < div className = 'f2fPblmCell' >
43
+ { largeColumns && f2fLeaderboard && ! isDevOrQa && < div className = 'f2fPblmCell' >
43
44
Problem 3
44
45
</ div > }
45
- { largeColumns && f2fLeaderboard && < div className = 'f2fTestCell' >
46
+ { largeColumns && f2fLeaderboard && ! isDevOrQa && < div className = 'f2fTestCell' >
46
47
TESTS PASSED/TOTAL
47
48
</ div > }
48
- { ! isMini && < div className = 'points' > points</ div > }
49
+ { ! isMini && ! isDevOrQa && < div className = 'points' > points</ div > }
49
50
{
50
51
isMini &&
51
52
< div style = { { display : 'flex' , flexGrow : '1' , justifyContent : 'space-between' } } >
@@ -54,6 +55,13 @@ const table = (props) => {
54
55
{ ! isQa && < div className = 'tests-passed' > { isDev ? '% Complete' : 'tests passed' } </ div > }
55
56
</ div >
56
57
}
58
+ {
59
+ f2fLeaderboard && isDevOrQa &&
60
+ < div style = { { display : 'flex' , flexGrow : '1' , justifyContent : 'space-around' } } >
61
+ < div className = 'points' > points</ div >
62
+ { ! isQa && < div className = 'tests-passed' > { isDev ? '% Complete' : 'tests passed' } </ div > }
63
+ </ div >
64
+ }
57
65
</ div >
58
66
{ finalists . map ( ( profile , i ) => (
59
67
< div key = { profile . handle } className = 'row' >
@@ -126,6 +134,67 @@ const table = (props) => {
126
134
{ profile . handle }
127
135
</ div > }
128
136
137
+ { /* Full width leaderboard, but for dev and qa */ }
138
+ { f2fLeaderboard && isDevOrQa && < React . Fragment >
139
+ < div className = { `competitor ${ profile . animationClass } ` } >
140
+ < div className = 'avatar' >
141
+ < img src = { profile . profilePic } />
142
+ </ div >
143
+ < img className = 'country-flag' src = { profile . countryFlag } />
144
+ < div className = 'handle' style = { { color : primaryColor } } > { profile . handle } </ div >
145
+ </ div >
146
+
147
+ < div style = { { display : 'flex' , flexGrow : 1 , justifyContent : 'space-around' } } >
148
+ < div className = { `points ${ profile . animationClass } ` } >
149
+ { profile . scoreLevel && < img className = { `animate fade${ profile . scoreLevel } infinite` } src = { `/static/img/trend/${ profile . scoreLevel } .png` } /> }
150
+ { profile . points >= 0 && < div className = { profile . scoreLevel ? '' : 'non-score-lvl-pt' } >
151
+ < span className = 'value' >
152
+ { profile . points }
153
+ </ span >
154
+ < span className = 'hint' >
155
+ POINTS
156
+ </ span >
157
+ </ div > }
158
+ </ div >
159
+
160
+ {
161
+ ! isQa && profile . totalTestCases > 0 && < div className = { `tests-passed ${ profile . animationClass } ` } >
162
+ < div >
163
+ {
164
+ ! isDev &&
165
+ < React . Fragment >
166
+ < span className = 'value' >
167
+ { `${ profile . testsPassed } / ${ profile . totalTestCases } ` }
168
+ </ span >
169
+ < span className = 'hint' >
170
+ TESTS
171
+ </ span >
172
+ </ React . Fragment >
173
+ }
174
+ {
175
+ isDev &&
176
+ < React . Fragment >
177
+ < span className = 'value' >
178
+ { `${ parseFloat ( profile . testsPassed / profile . totalTestCases * 100 ) . toFixed ( 2 ) } %` }
179
+ </ span >
180
+ < span className = 'hint' >
181
+ COMPLETED
182
+ </ span >
183
+ </ React . Fragment >
184
+ }
185
+ </ div >
186
+ </ div >
187
+ }
188
+
189
+ {
190
+ ! profile . hasOwnProperty ( 'points' ) && < div className = { `status ${ profile . statusAnimationClass } ` } >
191
+ { profile . status }
192
+ </ div >
193
+ }
194
+ </ div >
195
+ </ React . Fragment >
196
+ }
197
+
129
198
{ largeColumns && algorithmLeaderboard && profile . hasOwnProperty ( 'roundOne' ) && < div className = { 'algorithmFieldCell ' + ( profile . roundOne === 'fail' ? 'fail' : '' ) } >
130
199
{ profile . roundOne }
131
200
</ div > }
@@ -145,7 +214,7 @@ const table = (props) => {
145
214
{
146
215
profile . reveal === true && < React . Fragment >
147
216
{ largeColumns && f2fLeaderboard && profile . hasOwnProperty ( 'handle' ) &&
148
- < div className = ' competitor' >
217
+ < div className = { ` competitor ${ profile . animationClass } ` } >
149
218
< div className = 'avatar' >
150
219
< img src = { profile . profilePic } />
151
220
</ div >
@@ -154,7 +223,7 @@ const table = (props) => {
154
223
</ div >
155
224
}
156
225
{ largeColumns && f2fLeaderboard && profile . hasOwnProperty ( 'reviews' ) && profile . reviews . map ( ( review , i ) => (
157
- < div key = { review . challengeId } className = ' f2fScoreTests animate fadeIn' >
226
+ < div key = { ` ${ profile . handle } - ${ review . challengeId } ` } className = { ` f2fScoreTests ${ profile . animationClass } ` } >
158
227
{
159
228
! review . status && < React . Fragment >
160
229
< div className = 'f2fFieldCell' > { review . score } </ div >
@@ -183,7 +252,7 @@ const table = (props) => {
183
252
</ div >
184
253
) ) }
185
254
186
- { largeColumns && f2fLeaderboard && profile . hasOwnProperty ( 'points' ) && < div className = 'f2fPoints f2fFieldCell animate fadeIn ' >
255
+ { largeColumns && f2fLeaderboard && profile . hasOwnProperty ( 'points' ) && < div className = 'f2fPoints f2fFieldCell animate flipInX ' >
187
256
{ profile . points }
188
257
</ div > }
189
258
@@ -194,7 +263,7 @@ const table = (props) => {
194
263
</ React . Fragment >
195
264
}
196
265
{
197
- ! profile . reveal && f2fLeaderboard &&
266
+ ! profile . reveal && f2fLeaderboard && ! isDevOrQa &&
198
267
< React . Fragment >
199
268
{ largeColumns && f2fLeaderboard && profile . hasOwnProperty ( 'handle' ) && < div className = 'handleName animate fadeIn' >
200
269
</ div > }
@@ -467,11 +536,6 @@ const table = (props) => {
467
536
color: #F21919;
468
537
}
469
538
470
- .algorithmTable .points,
471
- .f2fTable .points {
472
- text-align: left;
473
- }
474
-
475
539
.algorithmTable .rank,
476
540
.f2fTable .rank {
477
541
text-align: center;
0 commit comments