Skip to content

Commit 5f31b78

Browse files
committed
fixes based on feedback
1 parent 1d2a7f1 commit 5f31b78

File tree

2 files changed

+54
-20
lines changed

2 files changed

+54
-20
lines changed

src/shared/components/challenge-detail/Specification/SideBar/index.jsx

Lines changed: 50 additions & 20 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">
@@ -199,15 +221,20 @@ export default function SideBar({
199221
}
200222
{
201223
!isDesign && (
202-
<span styleName="link-like-paragraph">
224+
<span styleName="link-like-paragraph tooltip-container no-margin-top">
203225
<a
204226
href="https://www.topcoder.com/thrive/articles/Usable%20Code%20in%20Dev%20Challenges"
205-
title="Usable Code in Dev Challenges"
227+
title="Useable Code Rules"
206228
target="_blank"
207229
rel="noreferrer"
208230
>
209-
Usable Code in Dev Challenges
231+
Useable Code Rules
210232
</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>
211238
</span>
212239
)
213240
}
@@ -362,23 +389,26 @@ export default function SideBar({
362389
</div>
363390
)
364391
}
365-
{ !isDesign && (
366-
<div>
367-
<h2>
368-
TOOLBOX:
369-
</h2>
370-
<p styleName="link-like-paragraph">
371-
<a
372-
href="https://marketplace.visualstudio.com/items?itemName=Topcoder.topcoder-workflow&ssr=false#overview"
373-
title="Topcoder Extension for VSCode"
374-
target="_blank"
375-
rel="noreferrer"
376-
>
377-
Topcoder Extension for VSCode
378-
</a>
379-
</p>
380-
</div>
381-
)}
392+
<div>
393+
<h2>
394+
TOOLBOX:
395+
</h2>
396+
<span styleName="link-like-paragraph tooltip-container">
397+
<a
398+
href="https://marketplace.visualstudio.com/items?itemName=Topcoder.topcoder-workflow&ssr=false#overview"
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>
382412
{ shareable && (
383413
<div>
384414
<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)