Skip to content

Commit 9f13236

Browse files
Merge pull request #5104 from topcoder-platform/dedywahyudi/4029-4994-5102
PR for 4029, 4994, 5102
2 parents 3efa2be + b49fc07 commit 9f13236

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed

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/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;

0 commit comments

Comments
 (0)