File tree Expand file tree Collapse file tree 8 files changed +34
-3
lines changed
Dashboard/TCOLeaderboards Expand file tree Collapse file tree 8 files changed +34
-3
lines changed Original file line number Diff line number Diff line change @@ -349,6 +349,7 @@ workflows:
349
349
filters :
350
350
branches :
351
351
only :
352
+ - enable_dashboard_on_data_science
352
353
- free
353
354
# This is alternate dev env for parallel testing
354
355
- " build-test " :
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ exports[`Snapshot match 1`] = `
23
23
async = { true }
24
24
src = " https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com"
25
25
/>
26
+ <script
27
+ src = " //cdn-3.convertexperiments.com/js/10005965-10006774.js"
28
+ type = " text/javascript"
29
+ />
26
30
</HelmetWrapper >
27
31
<withRouter(Connect(Routes)) />
28
32
<Connect(ErrorMessageContainer) />
@@ -62,6 +66,10 @@ exports[`Snapshot match 2`] = `
62
66
async = { true }
63
67
src = " https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com"
64
68
/>
69
+ <script
70
+ src = " //cdn-3.convertexperiments.com/js/10005965-10006774.js"
71
+ type = " text/javascript"
72
+ />
65
73
</HelmetWrapper >
66
74
<withRouter(Connect(Routes)) />
67
75
<Connect(ErrorMessageContainer) />
Original file line number Diff line number Diff line change @@ -136,6 +136,11 @@ exports[`Default render 1`] = `
136
136
" openNewTab" : true ,
137
137
" title" : " Discord" ,
138
138
},
139
+ Object {
140
+ " href" : " https://platform-ui.topcoder-dev.com/learn" ,
141
+ " openNewTab" : true ,
142
+ " title" : " Learn" ,
143
+ },
139
144
],
140
145
" title" : " COMMUNITY" ,
141
146
},
Original file line number Diff line number Diff line change @@ -410,6 +410,11 @@ module.exports = {
410
410
href : 'https://discord.gg/topcoder' ,
411
411
openNewTab : true ,
412
412
} ,
413
+ {
414
+ title : 'Learn' ,
415
+ href : 'https://platform-ui.topcoder-dev.com/learn' ,
416
+ openNewTab : true ,
417
+ } ,
413
418
] ,
414
419
} ,
415
420
] ,
Original file line number Diff line number Diff line change @@ -194,6 +194,11 @@ module.exports = {
194
194
href : 'https://discord.gg/topcoder?ref=nav' ,
195
195
openNewTab : true ,
196
196
} ,
197
+ {
198
+ title : 'Learn' ,
199
+ href : 'https://platform-ui.topcoder.com/learn' ,
200
+ openNewTab : true ,
201
+ } ,
197
202
] ,
198
203
} ,
199
204
] ,
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ export default function App() {
38
38
< meta name = "theme-color" content = "#FFFFFF" />
39
39
< link rel = "manifest" href = "/challenges/manifest.json" />
40
40
< script src = { config . URL . ABANDONMENT_EMBED } async />
41
+ < script type = "text/javascript" src = "//cdn-3.convertexperiments.com/js/10005965-10006774.js" />
41
42
</ Helmet >
42
43
< Routes />
43
44
< ErrorMessage />
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export default class TCOLeaderboards extends React.Component {
51
51
< div styleName = "handle" >
52
52
< a href = { `https://topcoder.com/members/${ row [ 'member_profile_basic.handle' ] } ` } target = "_blank" rel = "noreferrer" > { row [ 'member_profile_basic.handle' ] } </ a >
53
53
</ div >
54
- < span styleName = "tcoPoints" > { row [ 'tco_leaderboard.tco_points' ] . toLocaleString ( 'en-US' , { maximumFractionDigits : 2 } ) } </ span >
54
+ < span styleName = "tcoPoints" > { ( row [ 'tco23_leaderboard.tco_points' ] ? row [ 'tco23_leaderboard.tco_points' ] : row [ ' tco_leaderboard.tco_points'] ) . toLocaleString ( 'en-US' , { maximumFractionDigits : 2 } ) } </ span >
55
55
</ div >
56
56
) ) : < LoadingIndicator /> ;
57
57
Original file line number Diff line number Diff line change @@ -42,7 +42,12 @@ export default function ChallengeViewSelector(props) {
42
42
viewAsTable,
43
43
} = props ;
44
44
45
- const { type, tags } = challenge ;
45
+ let showDashboard ;
46
+ const { type, tags, metadata } = challenge ;
47
+ const dashboardMetadata = _ . find ( metadata , { name : 'show_data_dashboard' } ) ;
48
+ if ( dashboardMetadata ) {
49
+ showDashboard = dashboardMetadata . value ;
50
+ }
46
51
47
52
const [ currentSelected , setCurrentSelected ] = useState ( 'Details' ) ;
48
53
const [ isTabClosed , setIsTabClosed ] = useState ( true ) ;
@@ -300,7 +305,7 @@ export default function ChallengeViewSelector(props) {
300
305
return '' ;
301
306
} ) ( ) }
302
307
{
303
- ( isMM || challenge . track . toLowerCase ( ) === 'data science' ) && (
308
+ ( challenge . track . toLowerCase ( ) === 'data science' && showDashboard ) && (
304
309
< a
305
310
tabIndex = "0"
306
311
role = "tab"
@@ -455,6 +460,7 @@ ChallengeViewSelector.propTypes = {
455
460
type : PT . string ,
456
461
track : PT . string ,
457
462
tags : PT . arrayOf ( PT . shape ( ) ) ,
463
+ metadata : PT . arrayOf ( PT . string ) ,
458
464
submissionViewable : PT . string ,
459
465
} ) ,
460
466
isMM : PT . bool ,
You can’t perform that action at this time.
0 commit comments