Skip to content

Commit cb54923

Browse files
authored
Merge pull request #807 from topcoder-platform/profiles-app
Profiles app -> dev
2 parents cf2f11a + d7f5aa6 commit cb54923

33 files changed

+425
-943
lines changed

src/apps/profiles/src/lib/helpers.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ export function subTrackLabelToHumanName(label: string): string {
3232
return 'First2Finish'
3333
case 'CONCEPTUALIZATION':
3434
return 'Conceptualization'
35+
case 'SPECIFICATION':
36+
return 'Specification'
37+
case 'BUG_HUNT':
38+
return 'Bug Hunt'
39+
case 'TEST_SUITES':
40+
return 'Test Suites'
41+
case 'TEST_SCENARIOS':
42+
return 'Test Scenarios'
43+
case 'CONTENT_CREATION':
44+
return 'Content Creation'
45+
case 'COPILOT_POSTING':
46+
return 'Copilot Posting'
3547
default: return label
3648
}
3749

src/apps/profiles/src/member-profile/links/MemberLinks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const MemberLinks: FC<MemberLinksProps> = (props: MemberLinksProps) => {
8383
}, 1000)
8484
}
8585

86-
return !loading && (canEdit || memberLinks?.links) ? (
86+
return !loading && (canEdit || memberLinks?.links?.length) ? (
8787
<div className={styles.container}>
8888
<div className={styles.titleWrap}>
8989
<p className='body-main-bold'>Links</p>

src/apps/profiles/src/member-profile/page-layout/ProfilePageLayout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ const ProfilePageLayout: FC<ProfilePageLayoutProps> = (props: ProfilePageLayoutP
9696
</div>
9797
</div>
9898

99-
{/* <MemberTCActivityInfo profile={props.profile} /> */}
100-
10199
</ContentLayout>
102100

103101
<OnboardingCompleted authProfile={props.authProfile} />

src/apps/profiles/src/member-profile/skills/HowSkillsWorkModal/HowSkillsWorkModal.tsx

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,48 @@ import styles from './HowSkillsWorkModal.module.scss'
77
interface HowSkillsWorkModalProps {
88
onClose: () => void
99
isTalentSearch?: boolean
10+
canEdit?: boolean
1011
}
1112

1213
const HowSkillsWorkModal: FC<HowSkillsWorkModalProps> = (props: HowSkillsWorkModalProps) => (
1314
<BaseModal
1415
onClose={props.onClose}
1516
open
16-
title='How Skills Work?'
17+
title='How Skills Work'
1718
size='lg'
1819
>
1920
{
20-
props.isTalentSearch ? (
21+
!!props.canEdit && (
22+
<div className={styles.container}>
23+
<p className='body-large-bold'>
24+
Topcoder Proven Skills
25+
</p>
26+
<p className={styles.checkIconRow}>
27+
Look for the proven
28+
<IconOutline.CheckCircleIcon />
29+
next to skills.
30+
</p>
31+
<p>Here’s how it works:</p>
32+
<ul>
33+
<li>You perform specific Topcoder opportunities</li>
34+
<li>Each opportunity has associated skills (ex: javascript, HTML)</li>
35+
<li>
36+
You can prove you are proficient in these skills
37+
by completing opportunities on the platform
38+
</li>
39+
<li>Topcoder tracks and labels these skills, displaying what skills have been proven</li>
40+
<li>The more opportunities our experts complete the higher they rate for associated skills</li>
41+
</ul>
42+
<p>
43+
You can also self-proclaim skills that have not yet been proven.
44+
These will display as skills without a checkmark.
45+
</p>
46+
</div>
47+
)
48+
}
49+
50+
{
51+
!props.canEdit && props.isTalentSearch && (
2152
<div className={styles.container}>
2253
<p className='body-large-bold'>
2354
Topcoder Skill Matching
@@ -44,7 +75,11 @@ const HowSkillsWorkModal: FC<HowSkillsWorkModalProps> = (props: HowSkillsWorkMod
4475
These will display as skills without a checkmark.
4576
</p>
4677
</div>
47-
) : (
78+
)
79+
}
80+
81+
{
82+
!props.canEdit && !props.isTalentSearch && (
4883
<div className={styles.container}>
4984
<p className='body-large-bold'>
5085
Topcoder Proven Skills

src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const MemberSkillsInfo: FC<MemberSkillsInfoProps> = (props: MemberSkillsInfoProp
4141
const [isTalentSearch, setIsTalentSearch]: [boolean, Dispatch<SetStateAction<boolean>>]
4242
= useState<boolean>(false)
4343

44+
const [skillsToRender, setSkillsToRender]: [number, Dispatch<SetStateAction<number>>]
45+
= useState<number>(10)
46+
4447
useEffect(() => {
4548
if (props.authProfile && editMode === profileEditModes.skills) {
4649
setIsEditMode(true)
@@ -75,6 +78,10 @@ const MemberSkillsInfo: FC<MemberSkillsInfoProps> = (props: MemberSkillsInfoProp
7578
setHowSkillsWorkVisible(false)
7679
}
7780

81+
function handleExpandSkillsClick(): void {
82+
setSkillsToRender(memberEMSISkills.length)
83+
}
84+
7885
return memberEMSISkills ? (
7986
<div className={styles.container}>
8087
<div className={styles.titleWrap}>
@@ -98,18 +105,19 @@ const MemberSkillsInfo: FC<MemberSkillsInfoProps> = (props: MemberSkillsInfoProp
98105

99106
<div className={styles.skillsWrap}>
100107
{memberEMSISkills?.length > 0
101-
? memberEMSISkills.map((memberEMSISkill: UserEMSISkill) => (
102-
<div
103-
className={classNames(
104-
styles.skillItem,
105-
isVerifiedSkill(memberEMSISkill.skillSources) ? styles.verifiedSkillItem : '',
106-
)}
107-
key={memberEMSISkill.id}
108-
>
109-
{memberEMSISkill.name}
110-
{isVerifiedSkill(memberEMSISkill.skillSources) && <IconOutline.CheckCircleIcon />}
111-
</div>
112-
))
108+
? memberEMSISkills.slice(0, skillsToRender)
109+
.map((memberEMSISkill: UserEMSISkill) => (
110+
<div
111+
className={classNames(
112+
styles.skillItem,
113+
isVerifiedSkill(memberEMSISkill.skillSources) ? styles.verifiedSkillItem : '',
114+
)}
115+
key={memberEMSISkill.id}
116+
>
117+
{memberEMSISkill.name}
118+
{isVerifiedSkill(memberEMSISkill.skillSources) && <IconOutline.CheckCircleIcon />}
119+
</div>
120+
))
113121
: (
114122
<EmptySection
115123
title='Topcoder verifies and tracks skills as our members complete projects and challenges.'
@@ -121,6 +129,15 @@ const MemberSkillsInfo: FC<MemberSkillsInfoProps> = (props: MemberSkillsInfoProp
121129
they complete project tasks.
122130
</EmptySection>
123131
)}
132+
{
133+
memberEMSISkills?.length > skillsToRender && (
134+
<Button
135+
primary
136+
label={`+ ${memberEMSISkills.length - skillsToRender}`}
137+
onClick={handleExpandSkillsClick}
138+
/>
139+
)
140+
}
124141
</div>
125142
{canEdit && !memberEMSISkills?.length && (
126143
<AddButton
@@ -143,6 +160,7 @@ const MemberSkillsInfo: FC<MemberSkillsInfoProps> = (props: MemberSkillsInfoProp
143160
<HowSkillsWorkModal
144161
onClose={handleHowSkillsWorkClose}
145162
isTalentSearch={isTalentSearch}
163+
canEdit={canEdit}
146164
/>
147165
)
148166
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@import "@libs/ui/styles/includes";
2+
3+
.winWrapper {
4+
display: flex;
5+
flex-direction: column;
6+
align-items: center;
7+
padding: 0 $sp-2;
8+
cursor: pointer;
9+
min-width: 115px;
10+
11+
.winCnt {
12+
font-family: $font-barlow-condensed;
13+
font-size: 32px;
14+
font-weight: 500;
15+
line-height: 34px;
16+
margin-top: $sp-8;
17+
}
18+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { FC } from 'react'
2+
3+
import styles from './ChallengeWin.module.scss'
4+
5+
interface ChallengeWinProps {
6+
typeName: string
7+
onClick: () => void
8+
winCnt: number
9+
winLabel?: string
10+
}
11+
12+
const ChallengeWin: FC<ChallengeWinProps> = (props: ChallengeWinProps) => (
13+
<div className={styles.winWrapper} onClick={props.onClick}>
14+
<p className={styles.winCnt}>
15+
{props.winCnt}
16+
{' '}
17+
</p>
18+
<p className='body-ultra-small-bold'>{props.winLabel || 'WINS'}</p>
19+
<p className='body-small-bold'>{props.typeName}</p>
20+
</div>
21+
)
22+
23+
export default ChallengeWin
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as ChallengeWin } from './ChallengeWin'

src/apps/profiles/src/member-profile/tc-achievements/ChallengeWinsBanner/ChallengeWinsBanner.module.scss

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
margin-bottom: $sp-8;
2424
background-image: linear-gradient(90deg, #7B21A7, #1974AD);
2525
color: $tc-white;
26-
padding: $sp-8;
26+
padding: $sp-4;
2727

2828
@include ltelg {
2929
padding: $sp-4;
@@ -36,21 +36,8 @@
3636
.wins {
3737
display: flex;
3838
flex-wrap: wrap;
39-
justify-content: space-evenly;
39+
justify-content: center;
4040
width: 100%;
41-
42-
.winWrapper {
43-
display: flex;
44-
flex-direction: column;
45-
align-items: center;
46-
47-
.winCnt {
48-
font-size: 44px;
49-
font-weight: 500;
50-
line-height: 34px;
51-
margin-top: $sp-8;
52-
}
53-
}
5441
}
5542
}
5643
}

0 commit comments

Comments
 (0)