Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5bf28b1
- onboarding app page 1/7
suppermancool Jun 22, 2023
9a8b7d4
Merge pull request #668 from topcoder-platform/issue-659
jmgasper Jun 22, 2023
fb6ae72
Merge branch 'onboarding' of github.com:topcoder-platform/platform-ui…
jmgasper Jun 22, 2023
7eaa80d
Deploy onboarding to dev
jmgasper Jun 22, 2023
9885820
Onboarding update
suppermancool Jun 23, 2023
e127b03
Merge pull request #669 from topcoder-platform/issue-659
jmgasper Jun 23, 2023
2e6fe88
Force member login for onboarding
jmgasper Jun 23, 2023
4dbb2e0
Onboarding: work experience page and education page
suppermancool Jun 24, 2023
d262eba
fix date picker placeholder color
suppermancool Jun 24, 2023
9fe8c10
Merge pull request #670 from topcoder-platform/issue-661
jmgasper Jun 24, 2023
e1618f2
onboarding: "+" button is disable for new user
suppermancool Jun 26, 2023
796f12c
Merge branch 'onboarding' into issue-661
suppermancool Jun 26, 2023
6bb73da
Merge pull request #671 from topcoder-platform/issue-661
jmgasper Jun 26, 2023
9ccefd9
- Remove Linked In buttons and references
suppermancool Jun 26, 2023
eb005f1
Merge pull request #676 from topcoder-platform/issue-675
jmgasper Jun 26, 2023
8221660
The entered data is not saved if the user clicks Back button in any step
suppermancool Jun 27, 2023
0491212
Merge branch 'onboarding' into issue-675
suppermancool Jun 27, 2023
1c4a31d
Merge pull request #681 from topcoder-platform/issue-675
jmgasper Jun 27, 2023
5542a84
Onboarding - Input a bio and profile picture
suppermancool Jun 27, 2023
1ee3fdf
Merge branch 'onboarding' into issue-675
suppermancool Jun 27, 2023
67ec5f9
Merge branch 'profiles-app' of github.com:topcoder-platform/platform-…
jmgasper Jun 27, 2023
1b48f50
Onboarding: page 5,6/7
suppermancool Jun 28, 2023
70e468b
Merge branch 'onboarding' into issue-675
suppermancool Jun 28, 2023
eb75c69
Onboarding: page 5,6/7
suppermancool Jun 28, 2023
f607755
Merge pull request #682 from topcoder-platform/issue-675
jmgasper Jun 28, 2023
46649bd
Minor onboarding issues
suppermancool Jul 2, 2023
7d3794a
Merge pull request #693 from topcoder-platform/issue-686
jmgasper Jul 2, 2023
0d5a14f
Merge branch 'skill-selector-input' into onboarding
suppermancool Jul 5, 2023
0d9c556
Merge pull request #699 from topcoder-platform/issue-698
jmgasper Jul 5, 2023
1d8069a
Remove the "welcome to Topcoder" app name
jmgasper Jul 5, 2023
445f4f1
Let’s try this instead
jmgasper Jul 5, 2023
7040f1e
Merge branch 'dev' into onboarding
jmgasper Jul 8, 2023
573bc1b
- Change number of onboarding steps from 7 to 6
suppermancool Jul 8, 2023
21ebe85
Merge pull request #707 from topcoder-platform/issue-705-706
jmgasper Jul 8, 2023
fa70d2f
New onboarding look and feel
suppermancool Jul 9, 2023
793163a
Merge pull request #713 from topcoder-platform/issues-708-to-712
jmgasper Jul 9, 2023
b54573b
update onboarding ui
suppermancool Jul 9, 2023
e47ec60
onboarding fix wrong text
suppermancool Jul 9, 2023
954d22e
onboarding: fix final step link
suppermancool Jul 9, 2023
ec62f72
Merge pull request #714 from topcoder-platform/issues-708-to-712
jmgasper Jul 9, 2023
4fb167e
onboarding new design minor fix
suppermancool Jul 10, 2023
b3c0065
Merge pull request #715 from topcoder-platform/issue-709
jmgasper Jul 10, 2023
828ad1f
Merge branch 'dev' into onboarding
jmgasper Jul 10, 2023
3313bb2
Merge branch 'EMSI-skill-editor' into onboarding
suppermancool Jul 10, 2023
24238be
Test new skill selector integration in onboarding
suppermancool Jul 10, 2023
9acfb5d
Merge pull request #727 from topcoder-platform/issue-725
jmgasper Jul 10, 2023
a48a8cd
Onboarding code cleanup
suppermancool Jul 10, 2023
bbf2b88
Merge pull request #728 from topcoder-platform/issue-725
jmgasper Jul 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ workflows:
branches:
only:
- dev
- talent-search
- onboarding

- deployQa:
context : org-global
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"vue.features.codeActions.enable": false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should remove this file probably

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, logging this, thanks.

}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"react-helmet": "^6.1.0",
"react-html-parser": "^2.0.2",
"react-markdown": "8.0.6",
"react-overlays": "^5.2.1",
"react-redux": "^8.0.4",
"react-redux-toastr": "^7.6.10",
"react-responsive": "^9.0.0-beta.5",
Expand Down
1 change: 1 addition & 0 deletions src/apps/onboarding/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/apps/onboarding/src/assets/images/calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions src/apps/onboarding/src/components/DateInput/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/**
* DateInput
*
* Date Input control.
*/
import { Portal } from 'react-overlays'
import { createRef, FC, useState } from 'react'
import DatePicker from 'react-datepicker'
import cn from 'classnames'
import moment from 'moment'
import 'react-datepicker/dist/react-datepicker.css'

import { IconOutline } from '~/libs/ui'

import { ReactComponent as CalendarIcon } from '../../assets/images/calendar.svg'

import styles from './styles.module.scss'

interface CalendarContainerProps {
children?: any
}
const CalendarContainer: FC<CalendarContainerProps> = (props: CalendarContainerProps) => {
const el: any = document.getElementById('calendar-portal')

return <Portal container={el}>{props.children}</Portal>
}

interface DateInputProps {
style2?: boolean
className?: string
placeholder?: string
value?: Date
onChange?: (date: Date | null) => void
onBlur?: () => void
onFocus?: () => void
allowFutureDate?: boolean
disabled?: boolean
}

const DateInput: FC<DateInputProps> = (props: DateInputProps) => {
const [open, setOpen] = useState(false)
const calendarRef: any = createRef<any>()
return (
<div
className={cn(
styles['datepicker-wrapper'],
props.className,
props.style2 ? styles.style2 : '',
)}
>
<div
onClick={function openCalendar() {
calendarRef.current.setOpen(true)
}}
className={cn(styles.icon, styles['icon-calendar'])}
>
<CalendarIcon />
</div>
<DatePicker
ref={calendarRef}
dateFormat='MM/dd/yyyy'
placeholderText={props.placeholder}
selected={props.value}
onChange={props.onChange as any}
onBlur={props.onBlur}
onCalendarClose={function closeCalendar() {
setOpen(false)
}}
onFocus={props.onFocus}
showYearDropdown
dropdownMode='select'
onCalendarOpen={function openCalendar() {
setOpen(true)
}}
maxDate={
props.allowFutureDate ? undefined : moment()
.subtract(1, 'days')
.toDate()
}
disabled={props.disabled}
popperContainer={CalendarContainer}
/>
<div
className={cn(
styles.icon,
styles['icon-arrow'],
open ? styles['icon-arrow-open'] : '',
)}
onClick={function openCalendar() {
calendarRef.current.setOpen(true)
}}
>
<IconOutline.ChevronDownIcon />
</div>
</div>
)
}

export default DateInput
77 changes: 77 additions & 0 deletions src/apps/onboarding/src/components/DateInput/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
@import '@libs/ui/styles/includes';

.datepicker-wrapper {
position: relative;
padding: 0 10px;
height: 36px;
display: flex;
align-items: center;

.icon {
position: absolute;
display: flex;
padding: 8px 0 8px 4px;
align-items: center;

&>svg {
width: 20px;
height: 20px;
}
}

.icon-calendar {
left: 8px;
cursor: pointer;
}

.icon-arrow {
right: 8px;
top: 0;

&>svg {
color: hsl(0, 0%, 80%);
}

&:hover {
&>svg {
color: hsl(0, 0%, 60%);
}
}

&.icon-arrow-open {
&>svg {
color: hsl(0, 0%, 40%);
}
}
}

&.error {
input {
border-color: #fe665d;
}
}

&>div:nth-child(2) {
margin-left: 24px;
}

&.style2 input {
border: none !important;
box-shadow: none !important;
margin-bottom: 0 !important;
font-size: 14px;
font-weight: 400;

&::placeholder {
color: $black-60;
font-size: 14px;
font-weight: 400;
text-transform: none !important;
opacity: 1;
}
}
}

.datepicker-wrapper>div:nth-child(2)>div:nth-child(2)>div:nth-child(2) {
z-index: 100;
}
135 changes: 135 additions & 0 deletions src/apps/onboarding/src/components/FieldAvatar/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/**
* FieldAvatar
*
* A Form Field Is a wrapper for input to add the label to it
*/
import { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'
import classNames from 'classnames'

import { Button, IconOutline } from '~/libs/ui'

import AvatarPlaceholder from '../../assets/images/avatar-placeholder.png'
import MemberInfo from '../../models/MemberInfo'
import ModalUploadPhoto from '../modal-upload-photo'

import styles from './styles.module.scss'

interface FieldAvatarProps {
className?: string
memberInfo?: MemberInfo,
setMemberPhotoUrl: (photoUrl: string) => void
updateMemberPhotoUrl: (photoUrl: string) => void
}

const FieldAvatar: FC<FieldAvatarProps> = (props: FieldAvatarProps) => {
const [imgUrl, setImgUrl] = useState<string>('')
useEffect(() => {
if (props.memberInfo) {
setImgUrl(props.memberInfo.photoURL)
}
/* eslint-disable react-hooks/exhaustive-deps */
}, [props.memberInfo])

const [isPhotoEditMode, setIsPhotoEditMode]: [boolean, Dispatch<SetStateAction<boolean>>]
= useState<boolean>(false)
const [isSaving, setIsSaving]: [boolean, Dispatch<SetStateAction<boolean>>]
= useState<boolean>(false)

function handleModifyPhotoModalClose(): void {
setIsPhotoEditMode(false)
}

async function handleRemovePhoto(): Promise<void> {
setIsSaving(true)
try {
await props.updateMemberPhotoUrl('')
} catch (error) {
}

setIsSaving(false)
}

function showEditPhoto(): void {
setIsPhotoEditMode(true)
}

return (
<div
className={classNames(styles.container, props.className, 'd-flex flex-column gap-20 align-items-start')}
>
<h3>Photo</h3>
<div className='d-flex gap-30'>
<div className={classNames(
'd-flex',
styles.blockImg,
{
[styles.haveImg]: !!imgUrl,
},
)}
>
{imgUrl ? (
<img className={styles.img} src={imgUrl} alt='avatar' />
) : (
<img className={styles.imgPlaceholder} src={AvatarPlaceholder} alt='avatar' />
)}
</div>
<div className='d-flex flex-column align-items-start'>
<span className='color-black-60'>
Make a great first impression to potential customers with a
professional photo that represents your style.
</span>
{imgUrl ? (
<div className='d-flex gap-8'>
<Button
size='lg'
secondary
iconToLeft
icon={IconOutline.UploadIcon}
disabled={!props.memberInfo || isSaving}
onClick={showEditPhoto}
className='mt-16'
>
change
</Button>
<Button
size='lg'
secondary
iconToLeft
icon={IconOutline.TrashIcon}
disabled={!props.memberInfo || isSaving}
onClick={handleRemovePhoto}
className='mt-16'
>
delete
</Button>
</div>
) : (
<Button
size='lg'
secondary
iconToLeft
icon={IconOutline.UploadIcon}
disabled={!props.memberInfo}
onClick={showEditPhoto}
className='mt-16'
>
add image
</Button>
)}
</div>
</div>

{
isPhotoEditMode && props.memberInfo && (
<ModalUploadPhoto
onClose={handleModifyPhotoModalClose}
memberInfo={props.memberInfo}
setMemberPhotoUrl={props.setMemberPhotoUrl}
/>
)
}
</div>
)
}

export default FieldAvatar
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.container {
strong {
font-weight: bold;
}

ul {
list-style: unset;
padding-left: 30px;
}
}

.blockImg {
width: 120px;
height: 120px;
display: flex;
border-radius: 100%;
overflow: hidden;
border: 3px dashed white;
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.09);
flex-shrink: 0;

.img {
width: 100%;
height: 100%;
object-fit: contain;
}

.imgPlaceholder {
width: 144px;
height: 144px;
object-fit: contain;
max-width: none;
margin-left: -15px;
margin-top: -11px;
}
}
Loading