-
Notifications
You must be signed in to change notification settings - Fork 21
Onboarding #724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Onboarding #724
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 9a8b7d4
Merge pull request #668 from topcoder-platform/issue-659
jmgasper fb6ae72
Merge branch 'onboarding' of github.com:topcoder-platform/platform-ui…
jmgasper 7eaa80d
Deploy onboarding to dev
jmgasper 9885820
Onboarding update
suppermancool e127b03
Merge pull request #669 from topcoder-platform/issue-659
jmgasper 2e6fe88
Force member login for onboarding
jmgasper 4dbb2e0
Onboarding: work experience page and education page
suppermancool d262eba
fix date picker placeholder color
suppermancool 9fe8c10
Merge pull request #670 from topcoder-platform/issue-661
jmgasper e1618f2
onboarding: "+" button is disable for new user
suppermancool 796f12c
Merge branch 'onboarding' into issue-661
suppermancool 6bb73da
Merge pull request #671 from topcoder-platform/issue-661
jmgasper 9ccefd9
- Remove Linked In buttons and references
suppermancool eb005f1
Merge pull request #676 from topcoder-platform/issue-675
jmgasper 8221660
The entered data is not saved if the user clicks Back button in any step
suppermancool 0491212
Merge branch 'onboarding' into issue-675
suppermancool 1c4a31d
Merge pull request #681 from topcoder-platform/issue-675
jmgasper 5542a84
Onboarding - Input a bio and profile picture
suppermancool 1ee3fdf
Merge branch 'onboarding' into issue-675
suppermancool 67ec5f9
Merge branch 'profiles-app' of github.com:topcoder-platform/platform-…
jmgasper 1b48f50
Onboarding: page 5,6/7
suppermancool 70e468b
Merge branch 'onboarding' into issue-675
suppermancool eb75c69
Onboarding: page 5,6/7
suppermancool f607755
Merge pull request #682 from topcoder-platform/issue-675
jmgasper 46649bd
Minor onboarding issues
suppermancool 7d3794a
Merge pull request #693 from topcoder-platform/issue-686
jmgasper 0d5a14f
Merge branch 'skill-selector-input' into onboarding
suppermancool 0d9c556
Merge pull request #699 from topcoder-platform/issue-698
jmgasper 1d8069a
Remove the "welcome to Topcoder" app name
jmgasper 445f4f1
Let’s try this instead
jmgasper 7040f1e
Merge branch 'dev' into onboarding
jmgasper 573bc1b
- Change number of onboarding steps from 7 to 6
suppermancool 21ebe85
Merge pull request #707 from topcoder-platform/issue-705-706
jmgasper fa70d2f
New onboarding look and feel
suppermancool 793163a
Merge pull request #713 from topcoder-platform/issues-708-to-712
jmgasper b54573b
update onboarding ui
suppermancool e47ec60
onboarding fix wrong text
suppermancool 954d22e
onboarding: fix final step link
suppermancool ec62f72
Merge pull request #714 from topcoder-platform/issues-708-to-712
jmgasper 4fb167e
onboarding new design minor fix
suppermancool b3c0065
Merge pull request #715 from topcoder-platform/issue-709
jmgasper 828ad1f
Merge branch 'dev' into onboarding
jmgasper 3313bb2
Merge branch 'EMSI-skill-editor' into onboarding
suppermancool 24238be
Test new skill selector integration in onboarding
suppermancool 9acfb5d
Merge pull request #727 from topcoder-platform/issue-725
jmgasper a48a8cd
Onboarding code cleanup
suppermancool bbf2b88
Merge pull request #728 from topcoder-platform/issue-725
jmgasper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -262,7 +262,7 @@ workflows: | |
| branches: | ||
| only: | ||
| - dev | ||
| - talent-search | ||
| - onboarding | ||
|
|
||
| - deployQa: | ||
| context : org-global | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "vue.features.codeActions.enable": false | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
77
src/apps/onboarding/src/components/DateInput/styles.module.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
135
src/apps/onboarding/src/components/FieldAvatar/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
36 changes: 36 additions & 0 deletions
36
src/apps/onboarding/src/components/FieldAvatar/styles.module.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, logging this, thanks.