From cea0a3b31b3fbaac849ab159e602099b3333fcad Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:11:31 -0800 Subject: [PATCH 01/30] Changed firstName, middleName, lastName fields to have a legal- prefix --- src/components/ApplicationForm/BasicInfo.js | 26 +++++++++---------- src/components/ApplicationForm/ReviewCards.js | 12 +++++---- src/containers/Application/Part1.js | 8 +++--- src/containers/SubmissionLink.js | 2 +- src/utility/Validation.js | 4 +-- src/utility/firebase.js | 7 ++--- 6 files changed, 31 insertions(+), 28 deletions(-) diff --git a/src/components/ApplicationForm/BasicInfo.js b/src/components/ApplicationForm/BasicInfo.js index 35ee7878..55c6fd9b 100644 --- a/src/components/ApplicationForm/BasicInfo.js +++ b/src/components/ApplicationForm/BasicInfo.js @@ -381,37 +381,37 @@ export default ({ refs, errors, formInputs, onChange }) => ( onChange({ - firstName: e.target.value, + legalFirstName: e.target.value, }) } - customRef={refs['firstNameRef']} + customRef={refs['legalFirstNameRef']} /> onChange({ - middleName: e.target.value, + legalMiddleName: e.target.value, }) } /> onChange({ - lastName: e.target.value, + legalLastName: e.target.value, }) } - customRef={refs['lastNameRef']} + customRef={refs['legalLastNameRef']} /> diff --git a/src/components/ApplicationForm/ReviewCards.js b/src/components/ApplicationForm/ReviewCards.js index ce8d5643..80e14be4 100644 --- a/src/components/ApplicationForm/ReviewCards.js +++ b/src/components/ApplicationForm/ReviewCards.js @@ -167,13 +167,15 @@ export default ({ formInputs, handleEdit, onChange }) => { diff --git a/src/containers/Application/Part1.js b/src/containers/Application/Part1.js index ee4c7252..4894cfb9 100644 --- a/src/containers/Application/Part1.js +++ b/src/containers/Application/Part1.js @@ -7,8 +7,8 @@ import { useHackerApplication } from '../../utility/HackerApplicationContext' import { checkForError, validateFormSection } from '../../utility/Validation' const questionsByOrder = [ - 'firstName', - 'lastName', + 'legalFirstName', + 'legalLastName', 'preferredName', 'ageByHackathon', 'phoneNumber', @@ -55,8 +55,8 @@ export default () => { } const refs = { - firstNameRef: useRef(null), - lastNameRef: useRef(null), + legalFirstNameRef: useRef(null), + legalLastNameRef: useRef(null), preferredNameRef: useRef(null), genderRef: useRef(null), pronounsRef: useRef(null), diff --git a/src/containers/SubmissionLink.js b/src/containers/SubmissionLink.js index 11e20d1f..66fc5542 100644 --- a/src/containers/SubmissionLink.js +++ b/src/containers/SubmissionLink.js @@ -36,7 +36,7 @@ export default ({ user, refreshCallback }) => { } else { let autoFill = [ { - name: userData.basicInfo.firstName + ' ' + userData.basicInfo.lastName, + name: userData.basicInfo.preferredName, email: userData.basicInfo.email, }, ] diff --git a/src/utility/Validation.js b/src/utility/Validation.js index a619c22d..3b206ea7 100644 --- a/src/utility/Validation.js +++ b/src/utility/Validation.js @@ -173,8 +173,8 @@ const validators = { message: EMAIL_MESSAGE, } }, - firstName: noEmptyFunction, - lastName: noEmptyFunction, + legalFirstName: noEmptyFunction, + legalLastName: noEmptyFunction, preferredName: noEmptyFunction, // gender: noEmptyFunction, // identifyAsUnderrepresented: noEmptyFunction, diff --git a/src/utility/firebase.js b/src/utility/firebase.js index 7226d248..e4220ac5 100644 --- a/src/utility/firebase.js +++ b/src/utility/firebase.js @@ -51,12 +51,13 @@ const createNewApplication = async user => { const basicInfo = user?.displayName?.includes(' ') ? { email: user.email, - firstName: user?.displayName?.split(' ')[0] ?? '', - lastName: user?.displayName?.split(' ')[user?.displayName?.split(' ').length - 1] ?? '', + legalFirstName: user?.displayName?.split(' ')[0] ?? '', + legalLastName: + user?.displayName?.split(' ')[user?.displayName?.split(' ').length - 1] ?? '', } : { email: user.email, - firstName: user.displayName ?? '', + legalFirstName: user.displayName ?? '', } const submission = { submission: { From 1b961c95fabfabbe35ff400a1d4bd5e631c2b17c Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:11:47 -0800 Subject: [PATCH 02/30] Change dev portal to point to cmd-f 2024 --- src/utility/Constants.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utility/Constants.js b/src/utility/Constants.js index 8fa60bc5..92141ff4 100644 --- a/src/utility/Constants.js +++ b/src/utility/Constants.js @@ -1,15 +1,15 @@ export const DB_COLLECTION = 'Hackathons' // CHANGE: firebase collection name for this hackathon -export const DB_HACKATHON = 'nwHacks2024' +export const DB_HACKATHON = 'cmd-f2024' export const DAYOF_COLLECTION = 'DayOf' export const FAQ_COLLECTION = 'FAQ' export const NOTIFICATION_SETTINGS_CACHE_KEY = 'livesiteNotificationSettings' export const IS_DEVICE_IOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream export const copyText = Object.freeze({ // CHANGE: name of hackathon to be displayed on login splash - hackathonName: 'nwHacks 2024', - hackathonNameShort: 'nwHacks', + hackathonName: 'cmd-f 2024', + hackathonNameShort: 'cmd-f', }) export const PROJECTS_TO_JUDGE_COUNT = 4 @@ -197,9 +197,9 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ _id: '', basicInfo: { email: '', - firstName: '', - middleName: '', - lastName: '', + legalFirstName: '', + legalMiddleName: '', + legalLastName: '', preferredName: '', gender: '', pronouns: { From ceed91f382394bfaa165f36c349256e41bfce428 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:56:06 -0800 Subject: [PATCH 03/30] Fixed review submission UI - may affect Portal Schedule UI --- src/components/Common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Common.js b/src/components/Common.js index 66cd1e8c..5ea457bf 100644 --- a/src/components/Common.js +++ b/src/components/Common.js @@ -153,5 +153,5 @@ export const ScrollbarLike = css` export const CenterHorizontally = css` margin: 0 50%; - transform: translateY(-50%); + transform: translateX(-50%); ` From 818ff66b9d4b0b3b6c049d15863b27d4d3a7cfce Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:26:51 -0800 Subject: [PATCH 04/30] Changed theme back to nwTheme --- src/theme/ThemeProvider.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/theme/ThemeProvider.js b/src/theme/ThemeProvider.js index a817f220..c814cda1 100644 --- a/src/theme/ThemeProvider.js +++ b/src/theme/ThemeProvider.js @@ -44,16 +44,16 @@ const nwTheme = { ...base, name: 'nwHacks', colors: { - background: '#193545', // Background - card: '#0A1C27', // BG Accent - border: '#8E7EB4', + background: '#3C4BA5', // Background + card: '#0A1361', // BG Accent + border: 'rgba(255, 255, 255, 0.3)', secondaryBackgroundTransparent: '#F0EEF299', secondaryBackgroundTransparentHover: '#9D9FAD', - secondaryBackground: '#244556', // Side bar background + secondaryBackground: '#5667CF', // Side bar background sidebar: { - background: '#193545', - hover: '#244556', - selected: '#244556', + background: '#5667CF', + hover: '#0A1361', + selected: '#3C4BA5', primary: '#DCB551', secondary: '#9D9FAD', link: '#9D9FAD', @@ -88,10 +88,10 @@ const nwTheme = { border: '#9AD4DE', hoverbg: ' linear-gradient(265.48deg, #D9DBFF 3.67%, #CCF2F9 78.93%)', hoverborder: '#A4A9F1', - outlineText: '#191C4F', // Secondary button + outlineText: '#FFF', // Secondary button outlineHover: '#FFFFFF', // secondary - outlineBackground: '#DCB551', //secondary button - outlineBackgroundHover: 'linear-gradient(265.48deg, #244556 3.67%, #244556 78.93%)', + outlineBackground: '#A4A9F1', //secondary button + outlineBackgroundHover: 'linear-gradient(265.48deg, #D9DBFF 3.67%, #CCF2F9 78.93%)', outlineBorder: '#CFD6FF', grey500: '#BDBAC3', grey700: '#55525B', From b6d9b486c043276aefc73a797fd00d103749ed81 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:42:55 -0800 Subject: [PATCH 05/30] Update AppDashboard + App P0 page --- src/components/ApplicationDashboard.js | 5 +- .../ApplicationForm/HackathonInfo.js | 47 ++++++++++++++----- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/components/ApplicationDashboard.js b/src/components/ApplicationDashboard.js index 2a993a00..657afd64 100644 --- a/src/components/ApplicationDashboard.js +++ b/src/components/ApplicationDashboard.js @@ -415,7 +415,10 @@ const Dashboard = ({
- nwHacks 2024 is Western Canada’s largest 24 hour hackathon! + + cmd-f 2024 is Western Canada's largest hackathon celebrating underrepresented genders in + tech! + Registration status: {hackerStatuses()[hackerStatus]?.cardText} diff --git a/src/components/ApplicationForm/HackathonInfo.js b/src/components/ApplicationForm/HackathonInfo.js index c5bf48e6..2143a8d1 100644 --- a/src/components/ApplicationForm/HackathonInfo.js +++ b/src/components/ApplicationForm/HackathonInfo.js @@ -7,25 +7,46 @@ export default () => { <> - Western Canada’s largest hackathon is here! {''} - - 🎉 - + nwPlus is proud to present cmd-f 2024 - Western Canada's largest hackathon celebrating + underrepresented genders in tech.

- Join us on January 20-21, 2024, for a thrilling 24-hour hackathon of innovation and - collaboration. Immerse yourself in a dynamic atmosphere with engaging workshops and - events, and seize the chance to showcase your project live in front of a distinguished - panel of judges and a vibrant community of hackers from across North America. Apply now - and explore the exciting opportunities that await you at nwHacks 2024!{' '} - - 🚀 + We are beyond excited to host the 6th iteration of our hackathon on March 9-10, 2024!  + cmd-f is a hackathon focused on addressing gender inequality in technology. Our main + purpose is to create a safe and dedicated space for gender minorities to hack together. + We’re trying to create access for people who have historically been excluded. We encourage + participation from women, trans, non-binary, Two-Spirit and gender diverse people. Thus, + cmd-f is only open to individuals who identify as an underrepresented gender in + technology. Please make sure your participation in this event is aligned with the + intentions of the event. We also ask all participants who attend to trust that everyone + attending is meant to be here. +

+

+ + 🌱  + + Time: March 9-10, 2024  +

+

+ + 🌱  + Location: Life Sciences Institute, UBC +

+

+ Hacker application deadline: February 22, 2024 +

+

+ If you have any questions, feel free to reach out to the team at{' '} + + cmd-f@nwplus.io + + !

Learn more at{' '} - - https://nwhacks.io + + cmd-f.nwplus.io !

From 63e9606d337c9ea49682c01f75abbc35b5b97cb9 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Thu, 8 Feb 2024 16:53:56 -0800 Subject: [PATCH 06/30] Update P1 mandatory hacker app questions --- src/components/ApplicationForm/BasicInfo.js | 144 ++++++++++---------- src/containers/Application/Part1.js | 8 +- src/utility/Constants.js | 3 +- src/utility/Validation.js | 8 +- 4 files changed, 79 insertions(+), 84 deletions(-) diff --git a/src/components/ApplicationForm/BasicInfo.js b/src/components/ApplicationForm/BasicInfo.js index 55c6fd9b..5017047d 100644 --- a/src/components/ApplicationForm/BasicInfo.js +++ b/src/components/ApplicationForm/BasicInfo.js @@ -52,13 +52,12 @@ const educationOptions = [ { value: 'prefer not to answer', label: 'Prefer not to answer' }, ] -// Removed as of nwHacks 2024 -// const identifyAsUnderrepresentedOptions = [ -// { value: 'yes', label: 'Yes' }, -// { value: 'no', label: 'No' }, -// { value: 'unsure', label: 'Unsure' }, -// { value: 'preferNotToAnswer', label: 'Prefer not to answer' }, -// ] +const identifyAsUnderrepresentedOptions = [ + { value: 'yes', label: 'Yes' }, + { value: 'no', label: 'No' }, + { value: 'unsure', label: 'Unsure' }, + { value: 'preferNotToAnswer', label: 'Prefer not to answer' }, +] const academicYearOptions = [ { value: 'Secondary/High School', label: 'Secondary/High School' }, @@ -417,16 +416,11 @@ export default ({ refs, errors, formInputs, onChange }) => ( question 02 - - What is your preferred name? - - + What is your preferred name? onChange({ preferredName: e.target.value, @@ -524,35 +518,6 @@ export default ({ refs, errors, formInputs, onChange }) => ( question 06 - - {formInputs.educationLevel === 'high school' - ? 'What do you plan on studying?' - : 'What is your current or intended major?'} - - -

Enter your intended/current major, or unknown

- {errors?.major && {errors?.major}} - `${inputValue}`} - label={formInputs.major} - value={creatableDropdownValue(majors, 'label', formInputs.major)} - onChange={e => - onChange({ - major: e.label, - }) - } - emptySearchDefaultOption="Start typing to search" - canCreateNewOption - isValid={!errors?.major} - customRef={refs['majorRef']} - /> -
- - - question 07 What is your level of study? @@ -589,51 +554,51 @@ export default ({ refs, errors, formInputs, onChange }) => ( - question 08 + question 07 - What is your (expected) graduation year? + What is your current academic year? - {errors?.graduation && {errors?.graduation}} + {errors?.academicYear && {errors?.academicYear}} onChange({ - graduation: inputValue.value, + academicYear: inputValue.value, }) } - isValid={!errors?.graduation} - customRef={refs['graduationRef']} + isValid={!errors?.academicYear} + customRef={refs['academicYearRef']} /> - question 09 + question 08 - What is your current academic year? + What is your (expected) graduation year? - {errors?.academicYear && {errors?.academicYear}} + {errors?.graduation && {errors?.graduation}} onChange({ - academicYear: inputValue.value, + graduation: inputValue.value, }) } - isValid={!errors?.academicYear} - customRef={refs['academicYearRef']} + isValid={!errors?.graduation} + customRef={refs['graduationRef']} /> - question 10 + question 09 What is your country of residence? @@ -656,7 +621,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( - question 11 + question 10 Dietary restrictions @@ -696,7 +661,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( )} - + {/* question 12 Will you be 19 years of age or older by January 20th, 2024? @@ -716,21 +681,13 @@ export default ({ refs, errors, formInputs, onChange }) => ( checked={formInputs.willBeAgeOfMajority === false} onChange={() => onChange({ willBeAgeOfMajority: false })} /> - + */} - Optional Questions -

- The following questions are completely optional and do not affect your application as a - hacker. -

-
- - {/* Removed as of nwHacks 2024 */} - {/* - question 13 + question 11 Do you identify as part of an underrepresented gender in the technology industry? + {errors?.identifyAsUnderrepresented && ( {errors?.identifyAsUnderrepresented} @@ -752,7 +709,15 @@ export default ({ refs, errors, formInputs, onChange }) => ( isValid={!errors?.identifyAsUnderrepresented} customRef={refs['identifyAsUnderrepresentedRef']} /> - */} +
+ + + Optional Questions +

+ The following questions are completely optional and do not affect your application as a + hacker. +

+
question 13 @@ -823,6 +788,35 @@ export default ({ refs, errors, formInputs, onChange }) => ( )} + + question 06 + + {formInputs.educationLevel === 'high school' + ? 'What do you plan on studying?' + : 'What is your current or intended major?'} + + +

Enter your intended/current major, or unknown

+ {/* {errors?.major && {errors?.major}} */} + `${inputValue}`} + label={formInputs.major} + value={creatableDropdownValue(majors, 'label', formInputs.major)} + onChange={e => + onChange({ + major: e.label, + }) + } + emptySearchDefaultOption="Start typing to search" + canCreateNewOption + // isValid={!errors?.major} + customRef={refs['majorRef']} + /> +
+ question 15 What is your race/ethnicity? diff --git a/src/containers/Application/Part1.js b/src/containers/Application/Part1.js index 4894cfb9..1c435d6e 100644 --- a/src/containers/Application/Part1.js +++ b/src/containers/Application/Part1.js @@ -19,8 +19,8 @@ const questionsByOrder = [ 'academicYear', 'countryOfResidence', 'dietaryRestriction', - 'willBeAgeOfMajority', - // 'identifyAsUnderrepresented', + // 'willBeAgeOfMajority', + 'identifyAsUnderrepresented', 'pronouns', 'gender', 'ethnicity', @@ -61,7 +61,7 @@ export default () => { genderRef: useRef(null), pronounsRef: useRef(null), dietaryRestrictionRef: useRef(null), - // identifyAsUnderrepresentedRef: useRef(null), + identifyAsUnderrepresentedRef: useRef(null), ageByHackathonRef: useRef(null), phoneNumberRef: useRef(null), schoolRef: useRef(null), @@ -70,7 +70,7 @@ export default () => { graduationRef: useRef(null), academicYearRef: useRef(null), ethnicityRef: useRef(null), - willBeAgeOfMajorityRef: useRef(null), + // willBeAgeOfMajorityRef: useRef(null), hackathonsAttendedRef: useRef(null), contributionRoleRef: useRef(null), countryOfResidenceRef: useRef(null), diff --git a/src/utility/Constants.js b/src/utility/Constants.js index 92141ff4..5a2d7aa2 100644 --- a/src/utility/Constants.js +++ b/src/utility/Constants.js @@ -240,6 +240,7 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ halal: false, other: false, }, + identifyAsUnderrepresented: '', ageByHackathon: null, phoneNumber: '', school: '', @@ -248,7 +249,7 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ graduation: null, academicYear: '', countryOfResidence: '', - willBeAgeOfMajority: null, + // willBeAgeOfMajority: null, }, skills: { firstTimeHacker: null, diff --git a/src/utility/Validation.js b/src/utility/Validation.js index 3b206ea7..b91dfa45 100644 --- a/src/utility/Validation.js +++ b/src/utility/Validation.js @@ -175,20 +175,20 @@ const validators = { }, legalFirstName: noEmptyFunction, legalLastName: noEmptyFunction, - preferredName: noEmptyFunction, + // preferredName: noEmptyFunction, // gender: noEmptyFunction, - // identifyAsUnderrepresented: noEmptyFunction, + identifyAsUnderrepresented: noEmptyFunction, // pronouns: noNoneFunction, // ethnicity: noNoneFunction, dietaryRestriction: noNoneFunction, ageByHackathon: noEmptyFunction, school: noEmptyFunction, - major: noEmptyFunction, + // major: noEmptyFunction, educationLevel: noEmptyFunction, graduation: noEmptyFunction, academicYear: noEmptyFunction, countryOfResidence: noEmptyFunction, - willBeAgeOfMajority: noNeitherFunction, + // willBeAgeOfMajority: noNeitherFunction, phoneNumber: number => { return { error: !validatePhoneNumber(number), From a17e8312973e388858a56471c0ac7baa6d9123f8 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:59:05 -0800 Subject: [PATCH 07/30] Update P1 Optional Questions section --- src/components/ApplicationForm/BasicInfo.js | 188 ++++++++++++++++++-- src/components/Input/Dropdown.js | 7 +- src/components/Input/TextInput.js | 13 +- src/containers/Application/Part1.js | 18 +- src/utility/Constants.js | 72 ++++---- 5 files changed, 237 insertions(+), 61 deletions(-) diff --git a/src/components/ApplicationForm/BasicInfo.js b/src/components/ApplicationForm/BasicInfo.js index 5017047d..b2c87671 100644 --- a/src/components/ApplicationForm/BasicInfo.js +++ b/src/components/ApplicationForm/BasicInfo.js @@ -3,11 +3,13 @@ import styled from 'styled-components' import majors from '../../containers/Application/data/majors.json' import schools from '../../containers/Application/data/schools.json' import { + CULTURAL_BG_OPTIONS, DIETARY_RESTRICTION_OPTIONS, - ETHNICITY_OPTIONS, PRONOUN_OPTIONS, + RACE_OPTIONS, } from '../../utility/Constants' import { applyCustomSort, creatableDropdownValue, findElement } from '../../utility/utilities' +import { TextArea } from '../Input' import Dropdown from '../Input/Dropdown' import Select from '../Input/Select' import { TextInput } from '../Input/TextInput' @@ -29,6 +31,18 @@ const genderOptions = [ { value: 'prefer not to answer', label: 'Prefer not to answer' }, ] +const indigenousIdentificationOptions = [ + { value: 'yes', label: 'Yes' }, + { value: 'no', label: 'No' }, + { value: 'prefer not to answer', label: 'Prefer not to answer' }, +] + +const canadianStatusOptions = [ + { value: 'international student', label: 'International Student' }, + { value: 'canadian student', label: 'Canadian Student' }, + { value: 'other', label: 'Other (Please Describe)' }, +] + const educationOptions = [ { value: 'less than high school', label: 'Less than Secondary / High School' }, { value: 'high school', label: 'Secondary/High school' }, @@ -361,6 +375,10 @@ const StyledTextInput = styled(TextInput)` margin: 0.5em 1em 1em 0; ` +const StyledTextArea = styled(TextArea)` + margin: 1em 0; +` + // form part 1 export default ({ refs, errors, formInputs, onChange }) => ( <> @@ -720,7 +738,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( - question 13 + question 12 What are your pronouns? {/* {errors?.pronouns && {errors?.pronouns}} */} {formInputs && @@ -757,8 +775,8 @@ export default ({ refs, errors, formInputs, onChange }) => ( - question 14 - What gender do you identify as? + question 13 + What is your gender identity? {/* {errors?.gender && {errors?.gender}} */} ( - question 06 + question 14 {formInputs.educationLevel === 'high school' ? 'What do you plan on studying?' : 'What is your current or intended major?'} -

Enter your intended/current major, or unknown

{/* {errors?.major && {errors?.major}} */} @@ -812,50 +829,133 @@ export default ({ refs, errors, formInputs, onChange }) => ( } emptySearchDefaultOption="Start typing to search" canCreateNewOption - // isValid={!errors?.major} + isValid={true} customRef={refs['majorRef']} />
question 15 - What is your race/ethnicity? - {/* {errors?.ethnicity && {errors?.ethnicity}} */} + Which race(s) best describes you? {formInputs && - applyCustomSort(Object.entries(formInputs?.ethnicity), Object.keys(ETHNICITY_OPTIONS)).map( + applyCustomSort(Object.entries(formInputs?.race), Object.keys(RACE_OPTIONS)).map( ([key, val]) => ( + onChange({ + culturalBackground: { ...formInputs.culturalBackground, [key]: !val }, + }) + } + customRef={refs['culturalBackgroundRef']} + /> + ))} +
+ {formInputs?.culturalBackground?.other && ( + + onChange({ + otherCulturalBackground: e.target.value, + }) + } + /> + )} + {formInputs?.culturalBackground?.firstNationsOrIndigenous && ( + + onChange({ + otherFirstNationsOrIndigenous: e.target.value, + }) + } + /> + )} +
+ + {/* question 16 Are you legally authorized to work in Canada? + onChange({ + major: { ...formInputs.major, [key]: !val }, + }) + } + customRef={refs['majorRef']} + /> + ) + )} +
+ {formInputs?.major?.other && ( + + onChange({ + otherMajor: e.target.value, + }) + } + /> + )}
@@ -1013,7 +1053,6 @@ export default ({ refs, errors, formInputs, onChange }) => ( question 19 Do you have any visible or invisible disabilities? - question 20 { }, 0).toFixed(2) } +export const MAJOR_OPTIONS = Object.freeze({ + computerScience: 'Computer science, computer engineering, or software engineering', + otherEngineering: 'Another engineering discipline (such as civil, electrical, mechanical, etc.)', + informationTech: 'Information systems, information technology, or system administration', + naturalScience: 'A natural science (such as biology, chemistry, physics, etc.)', + mathOrStats: 'Mathematics or statistics', + webDevOrDesign: 'Web development or web design', + business: 'Business discipline (such as accounting, finance, marketing, etc.)', + humanities: 'Humanities discipline (such as literature, history, philosophy, etc.)', + socialScience: 'Social science (such as anthropology, psychology, political science, etc.)', + arts: 'Fine arts or performing arts (such as graphic design, music, studio art, etc.)', + healthScience: 'Health science (such as nursing, pharmacy, radiology, etc.)', + other: 'Other (Please Specify)', + undecidedOrUndeclared: 'Undecided / No Declared Major', + schoolDoesNotOfferMajors: 'My school does not offer majors / primary areas of study', + preferNotToAnswer: 'Prefer not to answer', +}) + export const RACE_OPTIONS = Object.freeze({ asian: 'Asian', black: 'Black', @@ -251,7 +269,23 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ canadianStatus: '', phoneNumber: '', school: '', - major: '', + major: { + computerScience: false, + otherEngineering: false, + informationTech: false, + naturalScience: false, + mathOrStats: false, + webDevOrDesign: false, + business: false, + humanities: false, + socialScience: false, + arts: false, + healthScience: false, + other: false, + undecidedOrUndeclared: false, + schoolDoesNotOfferMajors: false, + preferNotToAnswer: false, + }, educationLevel: '', graduation: null, academicYear: '', From 1fd7edeb9d869bcf83284fb6abf87ef1065200a2 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Thu, 8 Feb 2024 21:03:48 -0800 Subject: [PATCH 09/30] Update P2 Skills questions --- src/components/ApplicationForm/Skills.js | 121 +++++++++++++++-------- src/containers/Application/Part2.js | 9 +- src/utility/Constants.js | 4 + src/utility/Validation.js | 23 ++++- 4 files changed, 107 insertions(+), 50 deletions(-) diff --git a/src/components/ApplicationForm/Skills.js b/src/components/ApplicationForm/Skills.js index 6b25071e..b0dd3d52 100644 --- a/src/components/ApplicationForm/Skills.js +++ b/src/components/ApplicationForm/Skills.js @@ -85,7 +85,29 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => { - question 17 + question 20 + + Is this your first hackathon? + + + {errors?.firstTimeHacker && {errors?.firstTimeHacker}} + onChange({ firstTimeHacker: false })} + /> + + + + question 21 What is your intended role at {copyText.hackathonName}? @@ -124,45 +146,17 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => { )} - - question 18 - - Is this your first hackathon? - - - {errors?.firstTimeHacker && {errors?.firstTimeHacker}} - onChange({ firstTimeHacker: false })} - /> - - - Short Answer Questions + Long Answer Questions - question 19 - - Although many come to hackathons to work together to build a software project, we - recognize that there may be other reasons for attending a hackathon, such as attending - workshops, or connecting with sponsors. - + question 22 - In your own words, describe your definition of a hackathon, and what it means to you. - (max 200 words) + Why do you want to attend cmd-f 2024? (max 150 words) { /> - question 20 + question 23 - Describe a project (does not need to be a technical project) that you worked on and a - useful skill that you learned from it. (max 200 words) + How would you make tech a more welcoming space for underrepresented demographics? (150 + words max) { /> - question 21 + question 24 - What character (from a movie, show, book, etc.) do you relate to most and why? (max 50 - words) + Tell us about a project you’re really proud of and what you learnt from it. (200 words + max) { customRef={refs['longAnswers3Ref']} /> + + + question 25 + + In the past, have there been reasons deterring you from attending hackathons or other + tech events? (optional) + + + onChange({ + longAnswers4: val, + }) + } + customRef={refs['longAnswers4Ref']} + /> + + + + question 26 + + Is there anything you want to let us know to ensure that we can help you feel + comfortable throughout the event? (optional) + + + + onChange({ + longAnswers5: val, + }) + } + customRef={refs['longAnswers5']} + /> + - question 22 + question 27 Help us get to know you better by providing as many links as you feel will support your registration! diff --git a/src/containers/Application/Part2.js b/src/containers/Application/Part2.js index 7f9d827c..47a6ba4e 100644 --- a/src/containers/Application/Part2.js +++ b/src/containers/Application/Part2.js @@ -1,13 +1,13 @@ import React, { useRef, useState } from 'react' +import { useLocation } from 'wouter' import Skills from '../../components/ApplicationForm/Skills' import NavigationButtons from '../../components/NavigationButtons' import VerticalProgressBar from '../../components/VerticalProgressBar' -import { useLocation } from 'wouter' -import { useHackerApplication, uploadResumeToStorage } from '../../utility/HackerApplicationContext' +import { uploadResumeToStorage, useHackerApplication } from '../../utility/HackerApplicationContext' import { + MAX_RESUME_FILE_SIZE_MB, checkForError, validateFormSection, - MAX_RESUME_FILE_SIZE_MB, } from '../../utility/Validation' const questionsByOrder = [ @@ -17,6 +17,8 @@ const questionsByOrder = [ 'longAnswers1', 'longAnswers2', 'longAnswers3', + 'longAnswers4', + 'longAnswers5', ] export default () => { @@ -92,6 +94,7 @@ export default () => { longAnswers2Ref: useRef(null), longAnswers3Ref: useRef(null), longAnswers4Ref: useRef(null), + longAnswers5Ref: useRef(null), } return ( diff --git a/src/utility/Constants.js b/src/utility/Constants.js index 572897cb..1017ec5c 100644 --- a/src/utility/Constants.js +++ b/src/utility/Constants.js @@ -194,6 +194,7 @@ export const DIETARY_RESTRICTION_OPTIONS = Object.freeze({ }) export const CONTRIBUTION_ROLE_OPTIONS = Object.freeze({ + beginner: 'Beginner', designer: 'Designer', developer: 'Developer', pm: 'Product/project manager', @@ -296,6 +297,7 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ skills: { firstTimeHacker: null, contributionRole: { + beginner: false, designer: false, developer: false, pm: false, @@ -308,6 +310,8 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ longAnswers1: '', longAnswers2: '', longAnswers3: '', + longAnswers4: '', + longAnswers5: '', }, questionnaire: { engagementSource: '', diff --git a/src/utility/Validation.js b/src/utility/Validation.js index b91dfa45..c1e7e437 100644 --- a/src/utility/Validation.js +++ b/src/utility/Validation.js @@ -10,6 +10,7 @@ const MUST_BE_TRUE = 'You must agree to the required term/condition.' export const MAX_RESUME_FILE_SIZE_MB = 2 export const MAX_WAIVER_FILE_SIZE_MB = 3 const LONG_ANSWER_WORD_LIMIT = 200 +const MED_ANSWER_WORD_LIMIT = 150 const SHORT_ANSWER_WORD_LIMIT = 50 export const validateURL = thing => { const pattern = new RegExp( @@ -205,20 +206,32 @@ const validators = { firstTimeHacker: noNeitherFunction, longAnswers1: answer => { return { - error: !validateStringNotEmpty(answer) || getWords(answer) > LONG_ANSWER_WORD_LIMIT, - message: answer.length > LONG_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, + error: !validateStringNotEmpty(answer) || getWords(answer) > MED_ANSWER_WORD_LIMIT, + message: answer.length > MED_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, } }, longAnswers2: answer => { + return { + error: !validateStringNotEmpty(answer) || getWords(answer) > MED_ANSWER_WORD_LIMIT, + message: answer.length > MED_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, + } + }, + longAnswers3: answer => { return { error: !validateStringNotEmpty(answer) || getWords(answer) > LONG_ANSWER_WORD_LIMIT, message: answer.length > LONG_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, } }, - longAnswers3: answer => { + longAnswers4: answer => { + return { + error: getWords(answer) > MED_ANSWER_WORD_LIMIT, + message: answer.length > MED_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, + } + }, + longAnswers5: answer => { return { - error: !validateStringNotEmpty(answer) || getWords(answer) > SHORT_ANSWER_WORD_LIMIT, - message: answer.length > SHORT_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, + error: getWords(answer) > MED_ANSWER_WORD_LIMIT, + message: answer.length > MED_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, } }, }, From 17c64c3a3cb06996507e7cf77825809bf62a9692 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Thu, 8 Feb 2024 21:16:41 -0800 Subject: [PATCH 10/30] Update P3 Final Questions --- .../ApplicationForm/Questionnaire.js | 176 +++++++++++++++++- src/utility/Constants.js | 2 +- src/utility/Validation.js | 2 +- 3 files changed, 175 insertions(+), 5 deletions(-) diff --git a/src/components/ApplicationForm/Questionnaire.js b/src/components/ApplicationForm/Questionnaire.js index f7d1b1ac..6737bf81 100644 --- a/src/components/ApplicationForm/Questionnaire.js +++ b/src/components/ApplicationForm/Questionnaire.js @@ -3,7 +3,6 @@ import styled from 'styled-components' import { Dropdown, Select, TextInput } from '../../components/Input' import { ErrorMessage, QuestionHeading, ErrorSpan as Required } from '../../components/Typography' import { copyText } from '../../utility/Constants' -import { findElement } from '../../utility/utilities' import { CenteredH1 } from '../Typography' import { FormSpacing, SubHeading } from './' @@ -48,7 +47,8 @@ export default ({ errors, formInputs, onChange }) => { {errors?.engagementSource && {errors?.resume}} - { }) } isValid + /> */} + + + onChange({ + ...formInputs, + engagementSource: { + ...formInputs.engagementSource, + MLH: !formInputs.engagementSource.MLH, + }, + }) + } + /> + + onChange({ + ...formInputs, + engagementSource: { + ...formInputs.engagementSource, + facebook: !formInputs.engagementSource.facebook, + }, + }) + } + /> + + onChange({ + ...formInputs, + engagementSource: { + ...formInputs.engagementSource, + website: !formInputs.engagementSource.website, + }, + }) + } + /> + + onChange({ + ...formInputs, + engagementSource: { + ...formInputs.engagementSource, + nwPlusNewsletter: !formInputs.engagementSource.nwPlusNewsletter, + }, + }) + } + /> + + onChange({ + ...formInputs, + engagementSource: { + ...formInputs.engagementSource, + professorInClass: !formInputs.engagementSource.professorInClass, + }, + }) + } + /> + + onChange({ + ...formInputs, + eventsAttended: { + ...formInputs.eventsAttended, + nwHacks2024: !formInputs.eventsAttended.nwHacks2024, + }, + }) + } + /> onChange({ diff --git a/src/components/ApplicationForm/ReviewCards.js b/src/components/ApplicationForm/ReviewCards.js index 80e14be4..97879a9b 100644 --- a/src/components/ApplicationForm/ReviewCards.js +++ b/src/components/ApplicationForm/ReviewCards.js @@ -2,8 +2,13 @@ import React from 'react' import styled from 'styled-components' import { CONTRIBUTION_ROLE_OPTIONS, + CULTURAL_BG_OPTIONS, DIETARY_RESTRICTION_OPTIONS, + ENGAGEMENT_SOURCES, EVENTS_ATTENDED, + MAJOR_OPTIONS, + PRONOUN_OPTIONS, + RACE_OPTIONS, copyText, } from '../../utility/Constants' import { SocialMediaLinks } from '../ApplicationDashboard' @@ -87,6 +92,11 @@ const InfoGroup = ({ heading, data }) => ( ) +const getMajors = obj => Object.keys(obj).filter(key => obj[key]) +const getEngagementSources = obj => Object.keys(obj).filter(key => obj[key]) +const getPronouns = obj => Object.keys(obj).filter(key => obj[key]) +const getRaces = obj => Object.keys(obj).filter(key => obj[key]) +const getCulturalBackgrounds = obj => Object.keys(obj).filter(key => obj[key]) const getDietaryRestrictions = obj => Object.keys(obj).filter(key => obj[key]) const getEvents = obj => Object.keys(obj).filter(key => obj[key]) const getContribution = obj => Object.keys(obj).filter(key => obj[key]) @@ -97,6 +107,19 @@ export default ({ formInputs, handleEdit, onChange }) => { const gender = capitalizeFirstLetter(formInputs.basicInfo.gender) const countryOfResidence = capitalizeFirstLetter(formInputs.basicInfo.countryOfResidence) const educationLevel = capitalizeFirstLetter(formInputs.basicInfo.educationLevel) + const identifyAsUnderrepresented = capitalizeFirstLetter( + formInputs.basicInfo.identifyAsUnderrepresented + ) + const canadianStatus = capitalizeFirstLetter(formInputs.basicInfo.canadianStatus) + let indigenousIdentification = capitalizeFirstLetter( + formInputs.basicInfo.indigenousIdentification + ) + + if (indigenousIdentification === 'Yes') { + indigenousIdentification += formInputs.basicInfo.specifiedIndigenousIdentification + ? ': ' + formInputs.basicInfo.specifiedIndigenousIdentification + : ' Identified as Indigenous/First Nations' + } const dietaryRestrictions = getDietaryRestrictions(formInputs.basicInfo.dietaryRestriction).map( e => DIETARY_RESTRICTION_OPTIONS[e] @@ -116,13 +139,47 @@ export default ({ formInputs, handleEdit, onChange }) => { } } + const majors = getMajors(formInputs.basicInfo.major).map(e => MAJOR_OPTIONS[e]) + var majorValues = [] + + for (var j = 0; j < majors.length; j++) { + if (majors[j] === 'Other (Please Specify)') { + majorValues.push(formInputs.basicInfo?.otherMajor || 'Other Major') + } else { + majorValues.push(majors[j]) + } + if (j < majors.length - 1) { + majorValues.push(', ') + } + } + + const engagementSources = getEngagementSources(formInputs.questionnaire.engagementSource).map( + e => ENGAGEMENT_SOURCES[e] + ) + + var engagementSourcesValues = [] + + for (var k = 0; k < engagementSources.length; k++) { + if (engagementSources[k] === 'Other (Please Specify)') { + engagementSourcesValues.push( + formInputs.questionnaire?.otherEngagementSource || 'Other Engagement Source' + ) + } else { + engagementSourcesValues.push(engagementSources[k]) + } + + if (k < engagementSources.length - 1) { + engagementSourcesValues.push(', ') + } + } + const events = getEvents(formInputs.questionnaire.eventsAttended).map(e => EVENTS_ATTENDED[e]) var attendedValues = [] - for (var j = 0; j < events.length; j++) { + for (var l = 0; l < events.length; l++) { attendedValues.push(events[j]) - if (j < events.length - 1) { + if (l < events.length - 1) { attendedValues.push(', ') } } @@ -132,14 +189,66 @@ export default ({ formInputs, handleEdit, onChange }) => { ) var contributionValues = [] - for (var k = 0; k < contribution.length; k++) { - contributionValues.push(contribution[k]) + for (var m = 0; m < contribution.length; m++) { + contributionValues.push(contribution[m]) - if (k < contribution.length - 1) { + if (m < contribution.length - 1) { contributionValues.push(', ') } } + const pronouns = getPronouns(formInputs.basicInfo.pronouns).map(e => PRONOUN_OPTIONS[e]) + + var pronounValues = [] + + for (var n = 0; n < pronouns.length; n++) { + if (pronouns[n] === 'Other (Please Specify)') { + pronounValues.push(formInputs.basicInfo?.otherPronoun || 'Other Pronoun') + } else { + pronounValues.push(pronouns[n]) + } + + if (n < pronouns.length - 1) { + pronounValues.push(', ') + } + } + + const races = getRaces(formInputs.basicInfo.race).map(e => RACE_OPTIONS[e]) + + var racesValues = [] + + for (var o = 0; o < races.length; o++) { + if (races[o] === 'Other (Please Specify)') { + racesValues.push(formInputs.basicInfo?.otherRace || 'Other Race') + } else { + racesValues.push(races[o]) + } + + if (o < races.length - 1) { + racesValues.push(', ') + } + } + + const culturalBgs = getCulturalBackgrounds(formInputs.basicInfo.culturalBackground).map( + e => CULTURAL_BG_OPTIONS[e] + ) + + var culturalBgsValues = [] + + for (var p = 0; p < culturalBgs.length; p++) { + if (culturalBgs[p] === 'Other (Please Specify)') { + culturalBgsValues.push( + formInputs.basicInfo?.otherCulturalBackground || 'Other Cultural Background' + ) + } else { + culturalBgsValues.push(culturalBgs[p]) + } + + if (p < culturalBgs.length - 1) { + culturalBgsValues.push(', ') + } + } + return ( <> @@ -178,8 +287,6 @@ export default ({ formInputs, handleEdit, onChange }) => { .concat(formInputs.basicInfo.legalLastName) } /> - - { /> - + + + 0 ? pronouns : 'None'} /> + + 0 ? majorValues : 'None'} + /> + 0 ? racesValues : 'None'} /> + + 0 ? culturalBgsValues : 'None'} + /> + + @@ -231,17 +362,25 @@ export default ({ formInputs, handleEdit, onChange }) => { + + @@ -261,11 +400,7 @@ export default ({ formInputs, handleEdit, onChange }) => { { const pattern = new RegExp( '^(https?:\\/\\/)?' + // protocol From 525bc5877c8684b81ff9094cd52c12fae31c1d97 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Thu, 8 Feb 2024 23:52:45 -0800 Subject: [PATCH 12/30] Update Login.js page, temporarily fixed nwHacks icons --- src/components/MobileMenuBar.js | 2 +- src/components/Navbar.js | 9 ++++----- src/components/Sidebar.js | 13 ++++++++++--- src/containers/Landing/index.js | 34 ++++++++++++++++----------------- 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/components/MobileMenuBar.js b/src/components/MobileMenuBar.js index 864f9bdf..0f96acfc 100644 --- a/src/components/MobileMenuBar.js +++ b/src/components/MobileMenuBar.js @@ -1,7 +1,7 @@ import React from 'react' import styled from 'styled-components' -import logo from '../assets/logo.svg' import menu from '../assets/menu.svg' +import logo from '../assets/nwplus_icon.svg' const MobileMenuBarContainer = styled.div` display: none; diff --git a/src/components/Navbar.js b/src/components/Navbar.js index e3675815..19547d87 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -1,10 +1,9 @@ import React from 'react' -import styled from 'styled-components' -import { P } from './Typography' -import nwHacksIcon from '../assets/nwhacks2024logo.png' +import styled, { withTheme } from 'styled-components' import cmdfIcon from '../assets/cmdf_logo.png' +import nwplus_logo from '../assets/nwplus_icon.svg' import { Button } from './Input' -import { withTheme } from 'styled-components' +import { P } from './Typography' const NavContainer = styled.div` direction: rtl; @@ -75,7 +74,7 @@ const NavBar = ({ name, handleLogout, children, theme }) => { {theme.name === 'nwHacks' && ( {/* */} - + )} {theme.name === 'cmdf' && ( diff --git a/src/components/Sidebar.js b/src/components/Sidebar.js index 6a28e1b2..c70edc33 100644 --- a/src/components/Sidebar.js +++ b/src/components/Sidebar.js @@ -4,13 +4,13 @@ import { Link, useLocation } from 'wouter' import cmdf_logo from '../assets/cmdf_logo.png' import hc_logo from '../assets/hc_logo.svg' import logo from '../assets/logo.svg' -import nwhacks_logo from '../assets/logo2024.svg' +import nwplus_logo from '../assets/nwplus_icon.svg' import { useAuth } from '../utility/Auth' +import { APPLICATION_STATUS } from '../utility/Constants' import { getSponsors } from '../utility/firebase' import { hackerStatuses } from './ApplicationDashboard' import { Button } from './Input/index' import { A } from './Typography' -import { APPLICATION_STATUS } from '../utility/Constants' /* Old styles border-right: 1px solid ${p => p.theme.colors.border}; @@ -34,7 +34,7 @@ const chooseLogo = hackathon => { case 'cmdf': return cmdf_logo case 'nwHacks': - return nwhacks_logo + return nwplus_logo default: return logo } @@ -60,6 +60,13 @@ const Logo = styled.img.attrs(p => ({ width: 120px; margin: 86px 0 24px 48px; `} + + ${p => + p.theme.name === 'nwHacks' && + ` + margin-top: 20px; + margin-bottom: 20px; + `} ` const ItemsContainer = styled.div` diff --git a/src/containers/Landing/index.js b/src/containers/Landing/index.js index f28fd48a..b81757c3 100644 --- a/src/containers/Landing/index.js +++ b/src/containers/Landing/index.js @@ -2,11 +2,10 @@ import React from 'react' import styled from 'styled-components' import cmdf_logo from '../../assets/cmdf_logo.png' import hc_logo from '../../assets/hc_logo.svg' -import nwhacks_logo from '../../assets/nwhacks2024logo.png' +import nwplus_logo from '../../assets/nwplus_icon.svg' import Banner from '../../components/Banner' import { H1, P } from '../../components/Typography' import Footer from './Footer' -import nwHacksLoginBackground from '../../../src/assets/nwHacksLogin.svg' const LandingContainer = styled.div` position: absolute; @@ -80,7 +79,6 @@ const StyledBanner = styled(Banner)` text-align: center; z-index: 0; display: block; - margin: 0 auto; padding: 0; width: 100%; @@ -97,19 +95,19 @@ const StyledP = styled(P)` font-size: 1.5rem; ` -const NwHacksLoginBackgroundContainer = styled.img` - height: 100%; - width: 100vw; - object-fit: cover; - z-index: -1; - position: fixed; - left: 0; - top: 0; - ${p => p.theme.mediaQueries.xs} { - height: 100vh; - width: auto; - } -` +// const NwHacksLoginBackgroundContainer = styled.img` +// height: 100%; +// width: 100vw; +// object-fit: cover; +// z-index: -1; +// position: fixed; +// left: 0; +// top: 0; +// ${p => p.theme.mediaQueries.xs} { +// height: 100vh; +// width: auto; +// } +// ` // TODO: add sponsors if footer is shown export default ({ heading, description, showFooter, hackathon, children, background }) => { @@ -141,9 +139,9 @@ export default ({ heading, description, showFooter, hackathon, children, backgro case 'nwHacks': return ( - + {/* */} - +

{heading}

{description}

From b76b8f5ff07c01ba3ca814cf30ac34b4c9774910 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Fri, 9 Feb 2024 09:59:24 -0800 Subject: [PATCH 13/30] Minor fixes to questions + review card --- src/components/ApplicationForm/BasicInfo.js | 14 ++++++++--- src/components/ApplicationForm/ReviewCards.js | 25 ++++++++++++++----- src/components/ApplicationForm/Skills.js | 5 ++-- src/utility/Constants.js | 14 +++++++---- src/utility/Validation.js | 6 +++++ 5 files changed, 46 insertions(+), 18 deletions(-) diff --git a/src/components/ApplicationForm/BasicInfo.js b/src/components/ApplicationForm/BasicInfo.js index 5a1f2474..cfa8d536 100644 --- a/src/components/ApplicationForm/BasicInfo.js +++ b/src/components/ApplicationForm/BasicInfo.js @@ -644,6 +644,10 @@ export default ({ refs, errors, formInputs, onChange }) => ( Dietary restrictions +

+ Please answer to the best of your abilities so we are able to accommodate your needs! Note + that we may be unable to provide accommodations if you do not answer this accurately. +

{errors?.dietaryRestriction && {errors?.dietaryRestriction}} {formInputs && applyCustomSort( @@ -1038,12 +1042,12 @@ export default ({ refs, errors, formInputs, onChange }) => ( placeholder="Please Specify" size="small" noOutline - value={formInputs.canadianStatus} - errorMsg={errors?.canadianStatus} - invalid={!!errors?.canadianStatus} + value={formInputs.otherCanadianStatus} + errorMsg={errors?.otherCanadianStatus} + invalid={!!errors?.otherCanadianStatus} onChange={e => onChange({ - canadianStatus: e.target.value, + otherCanadianStatus: e.target.value, }) } /> @@ -1054,9 +1058,11 @@ export default ({ refs, errors, formInputs, onChange }) => ( question 19 Do you have any visible or invisible disabilities? onChange({ disability: val, diff --git a/src/components/ApplicationForm/ReviewCards.js b/src/components/ApplicationForm/ReviewCards.js index 97879a9b..a95beea6 100644 --- a/src/components/ApplicationForm/ReviewCards.js +++ b/src/components/ApplicationForm/ReviewCards.js @@ -110,7 +110,17 @@ export default ({ formInputs, handleEdit, onChange }) => { const identifyAsUnderrepresented = capitalizeFirstLetter( formInputs.basicInfo.identifyAsUnderrepresented ) - const canadianStatus = capitalizeFirstLetter(formInputs.basicInfo.canadianStatus) + + let canadianStatus = formInputs.basicInfo.canadianStatus + + if (canadianStatus === 'other') { + canadianStatus = formInputs.basicInfo.otherCanadianStatus + ? formInputs.basicInfo.specifiedIndigenousIdentification + : 'Other Canadian Status' + } else { + canadianStatus = capitalizeFirstLetter(formInputs.basicInfo.canadianStatus) + } + let indigenousIdentification = capitalizeFirstLetter( formInputs.basicInfo.indigenousIdentification ) @@ -127,9 +137,9 @@ export default ({ formInputs, handleEdit, onChange }) => { var dietaryRestrictionValues = [] for (var i = 0; i < dietaryRestrictions.length; i++) { - if (dietaryRestrictions[i] === 'Multiple restrictions/other') { + if (dietaryRestrictions[i] === 'Other (Please Specify)') { dietaryRestrictionValues.push( - formInputs.basicInfo?.otherDietaryRestriction || 'Multiple restrictions/other' + formInputs.basicInfo?.otherDietaryRestriction || 'Other Dietary Restriction' ) } else { dietaryRestrictionValues.push(dietaryRestrictions[i]) @@ -177,7 +187,7 @@ export default ({ formInputs, handleEdit, onChange }) => { var attendedValues = [] for (var l = 0; l < events.length; l++) { - attendedValues.push(events[j]) + attendedValues.push(events[l]) if (l < events.length - 1) { attendedValues.push(', ') @@ -202,7 +212,7 @@ export default ({ formInputs, handleEdit, onChange }) => { var pronounValues = [] for (var n = 0; n < pronouns.length; n++) { - if (pronouns[n] === 'Other (Please Specify)') { + if (pronouns[n] === 'Other') { pronounValues.push(formInputs.basicInfo?.otherPronoun || 'Other Pronoun') } else { pronounValues.push(pronouns[n]) @@ -308,7 +318,10 @@ export default ({ formInputs, handleEdit, onChange }) => { heading="Identify As Underrepresented Gender in Tech:" data={identifyAsUnderrepresented} /> - 0 ? pronouns : 'None'} /> + 0 ? pronounValues : 'None'} + /> { question 22 - Why do you want to attend cmd-f 2024? (max 150 words) + Why do you want to attend cmd-f 2024? (150 words max) { Is there anything you want to let us know to ensure that we can help you feel comfortable throughout the event? (optional) - { question 27 Help us get to know you better by providing as many links as you feel will support your - registration! + application! diff --git a/src/utility/Constants.js b/src/utility/Constants.js index 57611c0e..48b96ee7 100644 --- a/src/utility/Constants.js +++ b/src/utility/Constants.js @@ -185,12 +185,14 @@ export const PRONOUN_OPTIONS = Object.freeze({ export const DIETARY_RESTRICTION_OPTIONS = Object.freeze({ none: 'None', - celiacDisease: 'Celiac Disease', + dairy: 'Dairy', + glutenFree: 'Gluten Free', halal: 'Halal', kosher: 'Kosher', + nuts: 'Nuts', vegetarian: 'Vegetarian', vegan: 'Vegan', - other: 'Allergies/other', + other: 'Other (Please Specify)', }) export const CONTRIBUTION_ROLE_OPTIONS = Object.freeze({ @@ -272,11 +274,13 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ }, dietaryRestriction: { none: false, + dairy: false, + glutenFree: false, + halal: false, + kosher: false, + nuts: false, vegetarian: false, vegan: false, - celiacDisease: false, - kosher: false, - halal: false, other: false, }, identifyAsUnderrepresented: '', diff --git a/src/utility/Validation.js b/src/utility/Validation.js index b09ee507..500d89f6 100644 --- a/src/utility/Validation.js +++ b/src/utility/Validation.js @@ -204,6 +204,12 @@ const validators = { github: optionalURLFunction, linkedin: optionalURLFunction, firstTimeHacker: noNeitherFunction, + disability: answer => { + return { + error: getWords(answer) > LONG_ANSWER_WORD_LIMIT, + message: answer.length > LONG_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, + } + }, longAnswers1: answer => { return { error: !validateStringNotEmpty(answer) || getWords(answer) > MED_ANSWER_WORD_LIMIT, From 9fe58adb40941899d4f578f313579a54cbfaff8a Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Fri, 9 Feb 2024 10:01:01 -0800 Subject: [PATCH 14/30] Spelling --- src/components/ApplicationForm/ReviewCards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ApplicationForm/ReviewCards.js b/src/components/ApplicationForm/ReviewCards.js index a95beea6..f10b42a4 100644 --- a/src/components/ApplicationForm/ReviewCards.js +++ b/src/components/ApplicationForm/ReviewCards.js @@ -313,7 +313,7 @@ export default ({ formInputs, handleEdit, onChange }) => { data={formInputs.basicInfo.graduation === 0 ? '' : formInputs.basicInfo.graduation} /> - + Date: Fri, 9 Feb 2024 12:19:16 -0800 Subject: [PATCH 15/30] Add missing T&C, fixed small bugs --- public/index.html | 2 +- .../ApplicationForm/Questionnaire.js | 1 - src/components/ApplicationForm/ReviewCards.js | 163 ++++++++++-------- src/utility/Constants.js | 1 + src/utility/Validation.js | 1 + 5 files changed, 97 insertions(+), 71 deletions(-) diff --git a/public/index.html b/public/index.html index a93c3807..9f1a2e0b 100644 --- a/public/index.html +++ b/public/index.html @@ -34,7 +34,7 @@ crossorigin="anonymous" referrerpolicy="no-referrer" /> - nwHacks 2024 Portal + cmd-f 2024 Portal diff --git a/src/components/ApplicationForm/Questionnaire.js b/src/components/ApplicationForm/Questionnaire.js index 1aae0c00..0f4ef1fc 100644 --- a/src/components/ApplicationForm/Questionnaire.js +++ b/src/components/ApplicationForm/Questionnaire.js @@ -221,7 +221,6 @@ export default ({ errors, formInputs, onChange }) => { placeholder="Please Specify" size="small" noOutline - inline value={formInputs.otherEngagementSource} onChange={e => onChange({ diff --git a/src/components/ApplicationForm/ReviewCards.js b/src/components/ApplicationForm/ReviewCards.js index f10b42a4..e4792c97 100644 --- a/src/components/ApplicationForm/ReviewCards.js +++ b/src/components/ApplicationForm/ReviewCards.js @@ -433,151 +433,176 @@ export default ({ formInputs, handleEdit, onChange }) => {

- - 💾 + + 🤖 {' '} - We use your (anonymized!) data to help you get the best sponsors and continuously - improve nwHacks with each iteration. + cmd-f 2024 is an MLH partner event. The following 3 checkboxes are for this partnership.

-
- - onChange({ - nwPlusPrivacyPolicy: !formInputs.termsAndConditions.nwPlusPrivacyPolicy, + MLHCodeOfConduct: !formInputs.termsAndConditions.MLHCodeOfConduct, }) } required > - I agree to the{' '} - - nwPlus Privacy Policy + I have read and agree to the{' '} + + MLH Code of Conduct - + . onChange({ - shareWithnwPlus: !formInputs.termsAndConditions.shareWithnwPlus, + MLHPrivacyPolicy: !formInputs.termsAndConditions.MLHPrivacyPolicy, }) } - required > - I authorize nwPlus to use my anonymized data for data reporting. + I authorize nwPlus to share application/registration information with Major League + Hacking for event administration, ranking, MLH administration, in-line with the{' '} + + MLH Privacy Policy + + . I further agree to the terms of both the{' '} + + MLH Contest Terms and Conditions + {' '} + and the{' '} + + MLH Privacy Policy + {' '} + + onChange({ + MLHEmailSubscription: !formInputs.termsAndConditions.MLHEmailSubscription, + }) + } + > + + I authorize MLH to send me occasional emails about relevant events, career + opportunities, and community announcements. + +

- - 💼 + + 🌱 {' '} - Our hackathon aims to connect you with industry professionals, recruiters, and career - opportunities. In doing so, information about our hackers is needed in order for - attending companies to contact you. + Gender is deeply personal and can look different on each individual. We ask all + participants to trust that everyone attending belongs.

-
- onChange({ - shareWithSponsors: !formInputs.termsAndConditions.shareWithSponsors, + genderAcknowledgement: !formInputs.termsAndConditions.genderAcknowledgement, }) } > - I authorize nwPlus to provide my resume and supporting documents (Github, Linkedin, etc) - to event sponsors for recruitment purposes upon request. + + Gender is deeply personal and can look different on each individual. We ask all + participants to trust that everyone attending belongs. + +

- - 🤖 + + 💾 {' '} - nwHacks 2024 is an MLH partner event. The following 3 checkboxes are for this - partnership. + We use your (anonymized!) data to help you get the best sponsors and continuously + improve nwHacks with each iteration.

+
+ + onChange({ - MLHCodeOfConduct: !formInputs.termsAndConditions.MLHCodeOfConduct, + nwPlusPrivacyPolicy: !formInputs.termsAndConditions.nwPlusPrivacyPolicy, }) } required > - I have read and agree to the{' '} - - MLH Code of Conduct + I agree to the{' '} + + nwPlus Privacy Policy - . + onChange({ - MLHPrivacyPolicy: !formInputs.termsAndConditions.MLHPrivacyPolicy, + shareWithnwPlus: !formInputs.termsAndConditions.shareWithnwPlus, }) } + required > - I authorize nwPlus to share application/registration information with Major League - Hacking for event administration, ranking, MLH administration, in-line with the{' '} - - MLH Privacy Policy - - . I further agree to the terms of both the{' '} - - MLH Contest Terms and Conditions - {' '} - and the{' '} - - MLH Privacy Policy - {' '} + I authorize nwPlus to use my anonymized data for data reporting. + + + +

+ + 💼 + {' '} + Our hackathon aims to connect you with industry professionals, recruiters, and career + opportunities. In doing so, information about our hackers is needed in order for + attending companies to contact you. +

+
+ + onChange({ - MLHEmailSubscription: !formInputs.termsAndConditions.MLHEmailSubscription, + shareWithSponsors: !formInputs.termsAndConditions.shareWithSponsors, }) } > - - I authorize MLH to send me occasional emails about relevant events, career - opportunities, and community announcements. - + I authorize nwPlus to provide my resume and supporting documents (Github, Linkedin, etc) + to event sponsors for recruitment purposes upon request. diff --git a/src/utility/Constants.js b/src/utility/Constants.js index 48b96ee7..9b967ad6 100644 --- a/src/utility/Constants.js +++ b/src/utility/Constants.js @@ -351,6 +351,7 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ MLHCodeOfConduct: false, MLHPrivacyPolicy: false, MLHEmailSubscription: false, + genderAcknowledgement: false, shareWithnwPlus: false, nwPlusPrivacyPolicy: false, shareWithSponsors: false, diff --git a/src/utility/Validation.js b/src/utility/Validation.js index 500d89f6..4aecc874 100644 --- a/src/utility/Validation.js +++ b/src/utility/Validation.js @@ -249,6 +249,7 @@ const validators = { MLHCodeOfConduct: validateTrueFunction, MLHPrivacyPolicy: validateTrueFunction, // MLHEmailSubscription: validateTrueFunction, + genderAcknowledgement: validateTrueFunction, shareWithnwPlus: validateTrueFunction, nwPlusPrivacyPolicy: validateTrueFunction, }, From d8179f69dc57fd3a45b0d0d0730a8c59cbc564ef Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Fri, 9 Feb 2024 12:49:26 -0800 Subject: [PATCH 16/30] Capitalize Country placeholder text --- src/components/ApplicationForm/BasicInfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ApplicationForm/BasicInfo.js b/src/components/ApplicationForm/BasicInfo.js index cfa8d536..ba600806 100644 --- a/src/components/ApplicationForm/BasicInfo.js +++ b/src/components/ApplicationForm/BasicInfo.js @@ -624,7 +624,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( {errors?.countryOfResidence && {errors?.countryOfResidence}} From cf34a7b5ca5f22279e1dc997831247e012c80ebf Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:27:57 -0800 Subject: [PATCH 17/30] More fixes, added optional q14 --- src/components/ApplicationForm/BasicInfo.js | 35 +++++++--- .../ApplicationForm/Questionnaire.js | 4 +- src/components/ApplicationForm/ReviewCards.js | 16 +++-- src/components/ApplicationForm/Skills.js | 65 ++++++++++--------- src/containers/Application/Part1.js | 2 + src/containers/Application/Part2.js | 2 +- src/utility/Constants.js | 5 +- src/utility/Validation.js | 12 ---- 8 files changed, 81 insertions(+), 60 deletions(-) diff --git a/src/components/ApplicationForm/BasicInfo.js b/src/components/ApplicationForm/BasicInfo.js index ba600806..086582de 100644 --- a/src/components/ApplicationForm/BasicInfo.js +++ b/src/components/ApplicationForm/BasicInfo.js @@ -26,7 +26,7 @@ import { FormSpacing, SubHeading } from './' const genderOptions = [ { value: 'female', label: 'Woman' }, { value: 'male', label: 'Man' }, - { value: 'non-binary', label: 'Non-binary' }, + { value: 'non-binary', label: 'Non-binary/Genderqueer/Gender non-conforming' }, { value: 'other', label: 'Prefer to self-describe' }, { value: 'prefer not to answer', label: 'Prefer not to answer' }, ] @@ -39,7 +39,7 @@ const indigenousIdentificationOptions = [ const canadianStatusOptions = [ { value: 'international student', label: 'International Student' }, - { value: 'canadian student', label: 'Canadian Student' }, + { value: 'canadian/on PR student', label: 'Canadian/on PR Student' }, { value: 'other', label: 'Other (Please Describe)' }, ] @@ -80,6 +80,7 @@ const academicYearOptions = [ { value: '3rd year', label: '3rd year' }, { value: '4th year', label: '4th year' }, { value: '5th year+', label: '5th year+' }, + { value: 'New Grad', label: 'New Grad (<= 1 year)' }, { value: 'Graduate school', label: 'Graduate school' }, ] @@ -810,6 +811,24 @@ export default ({ refs, errors, formInputs, onChange }) => ( )}
+ + question 14 + Do you have trans experience? + onChange({ haveTransExperience: false })} + /> + + {/* question 14 @@ -839,7 +858,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( */} - question 14 + question 15 {formInputs.educationLevel === 'high school' ? 'What do you plan on studying?' @@ -879,7 +898,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( - question 15 + question 16 Which race(s) best describes you? {formInputs && applyCustomSort(Object.entries(formInputs?.race), Object.keys(RACE_OPTIONS)).map( @@ -915,7 +934,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( - question 16 + question 17 Do you identify as Indigenous/First Nations? ( - question 17 + question 18 What is your cultural background? {formInputs && applyCustomSort( @@ -1018,7 +1037,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( */} - question 18 + question 19 What is your Canadian status?

Note: this does not affect your application and is only collected for potential employers at @@ -1055,7 +1074,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( - question 19 + question 20 Do you have any visible or invisible disabilities? { - Question 23 + Question 29 How did you hear about {copyText.hackathonName}? @@ -233,7 +233,7 @@ export default ({ errors, formInputs, onChange }) => { - Question 24 + Question 30 Have you previously attended any nwPlus organized events? (select all that apply) diff --git a/src/components/ApplicationForm/ReviewCards.js b/src/components/ApplicationForm/ReviewCards.js index e4792c97..f28d4aea 100644 --- a/src/components/ApplicationForm/ReviewCards.js +++ b/src/components/ApplicationForm/ReviewCards.js @@ -297,6 +297,10 @@ export default ({ formInputs, handleEdit, onChange }) => { .concat(formInputs.basicInfo.legalLastName) } /> + { + { {/* TODO: Change hackathonsAttended to attendedHackathons and make sure the value is an accurate representation */} { } > - Gender is deeply personal and can look different on each individual. We ask all - participants to trust that everyone attending belongs. + I agree @@ -540,7 +544,7 @@ export default ({ formInputs, handleEdit, onChange }) => { 💾 {' '} We use your (anonymized!) data to help you get the best sponsors and continuously - improve nwHacks with each iteration. + improve cmd-f with each iteration.

@@ -610,7 +614,7 @@ export default ({ formInputs, handleEdit, onChange }) => { Social Media - Connect with the community of nwHacks on Medium, Twitter, and Facebook! Share your story + Connect with the community of nwPlus on Medium, Twitter, and Facebook! Share your story and excitement with us! diff --git a/src/components/ApplicationForm/Skills.js b/src/components/ApplicationForm/Skills.js index d13c9fb6..706e5297 100644 --- a/src/components/ApplicationForm/Skills.js +++ b/src/components/ApplicationForm/Skills.js @@ -1,12 +1,23 @@ import React from 'react' import styled from 'styled-components' import { CONTRIBUTION_ROLE_OPTIONS, copyText } from '../../utility/Constants' -import { applyCustomSort } from '../../utility/utilities' +import { applyCustomSort, findElement } from '../../utility/utilities' import { Select, TextArea, TextInput } from '../Input' +import Dropdown from '../Input/Dropdown' import ResumeUploadBtn from '../ResumeUploadBtn' import { CenteredH1, ErrorMessage, P, QuestionHeading, ErrorSpan as Required } from '../Typography' import { FormSpacing, SubHeading } from './' +const hackathonsAttendedOptions = [ + { value: '0', label: '0' }, + { value: '1', label: '1' }, + { value: '2', label: '2' }, + { value: '3', label: '3' }, + { value: '4', label: '4' }, + { value: '5', label: '5' }, + { value: '5+', label: '5+' }, +] + const QuestionForm = styled.form` display: flex; flex-direction: column; @@ -85,29 +96,31 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => {
- question 20 + question 21 - Is this your first hackathon? + How many hackathons have you previously attended? - {errors?.firstTimeHacker && {errors?.firstTimeHacker}} - onChange({ firstTimeHacker: false })} + {errors?.numHackathonsAttended && ( + {errors?.numHackathonsAttended} + )} + + onChange({ + numHackathonsAttended: e.value, + }) + } + isValid={!errors?.numHackathonsAttended} + customRef={refs['numHackathonsAttendedRef']} /> - question 21 + question 22 What is your intended role at {copyText.hackathonName}? @@ -150,7 +163,7 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => { - question 22 + question 23 Why do you want to attend cmd-f 2024? (150 words max) @@ -170,7 +183,7 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => { /> - question 23 + question 24 How would you make tech a more welcoming space for underrepresented demographics? (150 words max) @@ -191,7 +204,7 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => { /> - question 24 + question 25 Tell us about a project you’re really proud of and what you learnt from it. (200 words max) @@ -213,17 +226,14 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => { - question 25 + question 26 In the past, have there been reasons deterring you from attending hackathons or other tech events? (optional) onChange({ longAnswers4: val, @@ -234,17 +244,14 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => { - question 26 + question 27 Is there anything you want to let us know to ensure that we can help you feel comfortable throughout the event? (optional) onChange({ longAnswers5: val, @@ -256,7 +263,7 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => { - question 27 + question 28 Help us get to know you better by providing as many links as you feel will support your application! diff --git a/src/containers/Application/Part1.js b/src/containers/Application/Part1.js index e45e67b3..06ddc0ee 100644 --- a/src/containers/Application/Part1.js +++ b/src/containers/Application/Part1.js @@ -22,6 +22,7 @@ const questionsByOrder = [ 'identifyAsUnderrepresented', 'pronouns', 'gender', + 'haveTransExperience', 'major', 'race', 'indigenousIdentification', @@ -76,6 +77,7 @@ export default () => { academicYearRef: useRef(null), raceRef: useRef(null), // willBeAgeOfMajorityRef: useRef(null), + haveTransExperienceRef: useRef(null), hackathonsAttendedRef: useRef(null), contributionRoleRef: useRef(null), countryOfResidenceRef: useRef(null), diff --git a/src/containers/Application/Part2.js b/src/containers/Application/Part2.js index 47a6ba4e..7bbe29f2 100644 --- a/src/containers/Application/Part2.js +++ b/src/containers/Application/Part2.js @@ -85,7 +85,7 @@ export default () => { } const refs = { - firstTimeHackerRef: useRef(null), + numHackathonsAttendedRef: useRef(null), contributionRoleRef: useRef(null), resumeRef: useRef(null), githubRef: useRef(null), diff --git a/src/utility/Constants.js b/src/utility/Constants.js index 9b967ad6..2e286b44 100644 --- a/src/utility/Constants.js +++ b/src/utility/Constants.js @@ -174,11 +174,11 @@ export const CULTURAL_BG_OPTIONS = Object.freeze({ }) export const PRONOUN_OPTIONS = Object.freeze({ - hehim: 'he/him', sheher: 'she/her', theythem: 'they/them', hethey: 'he/they', shethey: 'she/they', + hehim: 'he/him', preferNot: 'Prefer not to answer', other: 'Other', }) @@ -241,6 +241,7 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ legalLastName: '', preferredName: '', gender: '', + haveTransExperience: null, pronouns: { sheher: false, hehim: false, @@ -314,7 +315,7 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({ disability: '', }, skills: { - firstTimeHacker: null, + numHackathonsAttended: '', contributionRole: { beginner: false, designer: false, diff --git a/src/utility/Validation.js b/src/utility/Validation.js index 4aecc874..af00e3db 100644 --- a/src/utility/Validation.js +++ b/src/utility/Validation.js @@ -228,18 +228,6 @@ const validators = { message: answer.length > LONG_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, } }, - longAnswers4: answer => { - return { - error: getWords(answer) > MED_ANSWER_WORD_LIMIT, - message: answer.length > MED_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, - } - }, - longAnswers5: answer => { - return { - error: getWords(answer) > MED_ANSWER_WORD_LIMIT, - message: answer.length > MED_ANSWER_WORD_LIMIT ? '' : NOT_EMPTY, - } - }, }, questionnaire: { engagementSource: noNoneFunction, From a642c9f627c0b31a218aa8c03d17789e41cd60c2 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:49:43 -0800 Subject: [PATCH 18/30] Bandaid-fix for review card prefer not to answer --- src/components/ApplicationForm/ReviewCards.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ApplicationForm/ReviewCards.js b/src/components/ApplicationForm/ReviewCards.js index f28d4aea..543110ef 100644 --- a/src/components/ApplicationForm/ReviewCards.js +++ b/src/components/ApplicationForm/ReviewCards.js @@ -107,9 +107,12 @@ export default ({ formInputs, handleEdit, onChange }) => { const gender = capitalizeFirstLetter(formInputs.basicInfo.gender) const countryOfResidence = capitalizeFirstLetter(formInputs.basicInfo.countryOfResidence) const educationLevel = capitalizeFirstLetter(formInputs.basicInfo.educationLevel) - const identifyAsUnderrepresented = capitalizeFirstLetter( + let identifyAsUnderrepresented = capitalizeFirstLetter( formInputs.basicInfo.identifyAsUnderrepresented ) + if (identifyAsUnderrepresented === 'PreferNotToAnswer') { + identifyAsUnderrepresented = 'Prefer not to answer' + } let canadianStatus = formInputs.basicInfo.canadianStatus From 64d44e3d8695c6cb1b8b955b4b73659bb0fa8647 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:57:06 -0800 Subject: [PATCH 19/30] Fix minor UI bugs --- src/components/ApplicationForm/BasicInfo.js | 1 + src/components/ApplicationForm/Skills.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ApplicationForm/BasicInfo.js b/src/components/ApplicationForm/BasicInfo.js index 086582de..48feba4b 100644 --- a/src/components/ApplicationForm/BasicInfo.js +++ b/src/components/ApplicationForm/BasicInfo.js @@ -27,6 +27,7 @@ const genderOptions = [ { value: 'female', label: 'Woman' }, { value: 'male', label: 'Man' }, { value: 'non-binary', label: 'Non-binary/Genderqueer/Gender non-conforming' }, + { value: 'two-spirit', label: 'Two Spirit' }, { value: 'other', label: 'Prefer to self-describe' }, { value: 'prefer not to answer', label: 'Prefer not to answer' }, ] diff --git a/src/components/ApplicationForm/Skills.js b/src/components/ApplicationForm/Skills.js index 706e5297..ab86aa5f 100644 --- a/src/components/ApplicationForm/Skills.js +++ b/src/components/ApplicationForm/Skills.js @@ -106,7 +106,7 @@ export default ({ refs, errors, formInputs, onChange, role, handleResume }) => { )} From fcd0581ff45930dd82aed04a1900a6212da23a46 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Fri, 9 Feb 2024 18:49:00 -0800 Subject: [PATCH 20/30] Potential white page error bandaid fix --- src/containers/Application/Dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/Application/Dashboard.js b/src/containers/Application/Dashboard.js index 762e01cf..78309ffa 100644 --- a/src/containers/Application/Dashboard.js +++ b/src/containers/Application/Dashboard.js @@ -42,7 +42,7 @@ const ApplicationDashboardContainer = () => { return unsubscribe }, [setRelevantDates]) - const { applicationStatus, responded, attending } = application.status + const { applicationStatus, responded, attending } = application?.status let hackerStatus if (applicationStatus === 'accepted') { From bb0b8f29c772c35033623c9f82ecde9349253a5e Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Fri, 9 Feb 2024 18:56:08 -0800 Subject: [PATCH 21/30] Another white page potential fix --- src/containers/Application/Dashboard.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/containers/Application/Dashboard.js b/src/containers/Application/Dashboard.js index 78309ffa..eddeb1ac 100644 --- a/src/containers/Application/Dashboard.js +++ b/src/containers/Application/Dashboard.js @@ -42,7 +42,16 @@ const ApplicationDashboardContainer = () => { return unsubscribe }, [setRelevantDates]) - const { applicationStatus, responded, attending } = application?.status + let applicationStatus + let responded + let attending + + if (application) { + applicationStatus = application.status.applicationStatus + responded = application.status.responded + attending = application.status.attending + } + // const { applicationStatus, responded, attending } = application?.status let hackerStatus if (applicationStatus === 'accepted') { From d8931ea6d79b6af9d5df2af71c3b502e78a34d54 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Fri, 9 Feb 2024 19:02:36 -0800 Subject: [PATCH 22/30] Revert back to original --- src/containers/Application/Dashboard.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/containers/Application/Dashboard.js b/src/containers/Application/Dashboard.js index eddeb1ac..762e01cf 100644 --- a/src/containers/Application/Dashboard.js +++ b/src/containers/Application/Dashboard.js @@ -42,16 +42,7 @@ const ApplicationDashboardContainer = () => { return unsubscribe }, [setRelevantDates]) - let applicationStatus - let responded - let attending - - if (application) { - applicationStatus = application.status.applicationStatus - responded = application.status.responded - attending = application.status.attending - } - // const { applicationStatus, responded, attending } = application?.status + const { applicationStatus, responded, attending } = application.status let hackerStatus if (applicationStatus === 'accepted') { From cd03fb65975fdb8e31717d511e9760667ada525f Mon Sep 17 00:00:00 2001 From: kozr Date: Sat, 10 Feb 2024 12:34:58 +0800 Subject: [PATCH 23/30] fix non-working edit button --- src/containers/Application/Review.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/containers/Application/Review.js b/src/containers/Application/Review.js index 52302734..d5a9df4c 100644 --- a/src/containers/Application/Review.js +++ b/src/containers/Application/Review.js @@ -24,7 +24,8 @@ export default () => { setLoading(false) } - const handleEdit = href => { + const handleEdit = async href => { + await save() setLocation(href) window.scrollTo(0, 0) } From ce2a5246f6f34a298104e9f43f5ac05389f15ab5 Mon Sep 17 00:00:00 2001 From: kozr Date: Sat, 10 Feb 2024 16:48:05 +0800 Subject: [PATCH 24/30] stop putting context everywhere, learn to use it omg --- src/App.js | 76 +++++++------------------ src/utility/HackerApplicationContext.js | 4 +- 2 files changed, 25 insertions(+), 55 deletions(-) diff --git a/src/App.js b/src/App.js index e7bc05f9..5c248e3c 100644 --- a/src/App.js +++ b/src/App.js @@ -82,36 +82,18 @@ const ApplicationInProgressRoute = ({ name, handleLogout, path, children, theme const { isAuthed, user, logout } = useAuth() return isAuthed ? ( - - - - {children} - - - + + {children} + ) : ( ) } -const ApplicationInProgressContentContainer = ({ children }) => { - const { - application: { - status: { applicationStatus }, - }, - } = useHackerApplication() - - return applicationStatus === APPLICATION_STATUS.inProgress ? ( - <>{children} - ) : ( - - ) -} - const NoAuthRoute = ({ path, children }) => { const { isAuthed, user } = useAuth() return ( @@ -143,15 +125,7 @@ const NavbarSaveOnLogout = ({ name, handleLogout }) => { const ApplicationFormContainer = ({ part }) => { const { isAuthed, user, logout } = useAuth() - const { - application, - // got rid of destructuring in case of null value (not logged in, visits a page on application - maybe it was bookmarked) - // { - // status: { - // applicationStatus - // }, - // }, - } = useHackerApplication() + const { application } = useHackerApplication() return isAuthed && application.status.applicationStatus === APPLICATION_STATUS.inProgress ? ( <> @@ -189,13 +163,7 @@ const ProjectViewContainer = ({ params }) => ( const ApplicationDashboardRoutingContainer = () => { const { isAuthed } = useAuth() - return isAuthed ? ( - - - - ) : ( - - ) + return isAuthed ? : } function App() { @@ -273,20 +241,20 @@ function App() { - - - - - - - - - {params => ( - - - - )} - + + + + + + + + + + + {params => } + + + diff --git a/src/utility/HackerApplicationContext.js b/src/utility/HackerApplicationContext.js index a42d58bf..2c2a1bec 100644 --- a/src/utility/HackerApplicationContext.js +++ b/src/utility/HackerApplicationContext.js @@ -160,7 +160,9 @@ export function HackerApplicationProvider({ children }) { * Applications are closed ? show message * Applications are open ? Show application */ - return applicationOpen === null || application === undefined ? ( + return applicationOpen === null || + application === undefined || + Object.keys(application).length === 0 ? ( ) : !applicationOpen && window.location.pathname !== '/application' ? ( From d49742a8c9f87dfdf9eac51e9ee84aa69f83649b Mon Sep 17 00:00:00 2001 From: kozr Date: Sat, 10 Feb 2024 16:56:59 +0800 Subject: [PATCH 25/30] remove spinner of death --- src/utility/HackerApplicationContext.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utility/HackerApplicationContext.js b/src/utility/HackerApplicationContext.js index 2c2a1bec..a42d58bf 100644 --- a/src/utility/HackerApplicationContext.js +++ b/src/utility/HackerApplicationContext.js @@ -160,9 +160,7 @@ export function HackerApplicationProvider({ children }) { * Applications are closed ? show message * Applications are open ? Show application */ - return applicationOpen === null || - application === undefined || - Object.keys(application).length === 0 ? ( + return applicationOpen === null || application === undefined ? ( ) : !applicationOpen && window.location.pathname !== '/application' ? ( From c3306c96059f3bc3ec6ab26cf22647c8659cd8db Mon Sep 17 00:00:00 2001 From: kozr Date: Sat, 10 Feb 2024 18:10:09 +0800 Subject: [PATCH 26/30] bandaid probably --- src/utility/HackerApplicationContext.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/HackerApplicationContext.js b/src/utility/HackerApplicationContext.js index a42d58bf..db8748e2 100644 --- a/src/utility/HackerApplicationContext.js +++ b/src/utility/HackerApplicationContext.js @@ -41,7 +41,7 @@ export const uploadWaiverToStorage = async (userId, file) => { export function HackerApplicationProvider({ children }) { const { user } = useAuth() - const [application, setApplication] = useState({}) + const [application, setApplication] = useState(HACKER_APPLICATION_TEMPLATE) const [, setUpdated] = useState(false) const [applicationOpen, setApplicationOpen] = useState(null) const applicationRef = useRef() From 290cb26b8f5339acd788bc6a59f507b661521f30 Mon Sep 17 00:00:00 2001 From: Melvin Teo <62491197+meleongg@users.noreply.github.com> Date: Sat, 10 Feb 2024 07:47:41 -0800 Subject: [PATCH 27/30] Update app confirmation date --- src/pages/Application/Confirmation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/Application/Confirmation.js b/src/pages/Application/Confirmation.js index 4ce7efcf..1bffb072 100644 --- a/src/pages/Application/Confirmation.js +++ b/src/pages/Application/Confirmation.js @@ -1,15 +1,15 @@ import React from 'react' -import Landing from '../../containers/Landing' +import { useLocation } from 'wouter' import { Button } from '../../components/Input' +import Landing from '../../containers/Landing' import { ButtonContainer } from '../Login' -import { useLocation } from 'wouter' export default () => { const [, setLocation] = useLocation() return ( From 61864ab42f1eb136aa524eddec4645fc0bb4e0b1 Mon Sep 17 00:00:00 2001 From: Yan Sidyakin Date: Sat, 10 Feb 2024 15:06:09 -0500 Subject: [PATCH 28/30] Wording changes --- src/components/ApplicationDashboard.js | 2 +- src/components/ApplicationForm/ReviewCards.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ApplicationDashboard.js b/src/components/ApplicationDashboard.js index 657afd64..2d3e92f7 100644 --- a/src/components/ApplicationDashboard.js +++ b/src/components/ApplicationDashboard.js @@ -202,7 +202,7 @@ export const hackerStatuses = (relevantDates, hackerName = null) => ({ sidebarText: 'In Review', cardText: 'Awaiting assessment', // blurb: `We will send out all acceptances by ${relevantDates?.sendAcceptancesBy}. In the meantime, get connected with our community of hackers on Instagram, Facebook, Medium, and Twitter to stay up to date with the latest news on sponsors, prizes and workshops!`, - blurb: `We will send out all acceptances by January 2024. In the meantime, get connected with our community of hackers on Instagram, Facebook, Medium, and Twitter to stay up to date with the latest news on sponsors, prizes and workshops!`, + blurb: `We will send out all acceptances by late Feb 2024. In the meantime, get connected with our community of hackers on Instagram, Facebook, Medium, and Twitter to stay up to date with the latest news on sponsors, prizes and workshops!`, }, waitlisted: { sidebarText: 'Waitlisted', diff --git a/src/components/ApplicationForm/ReviewCards.js b/src/components/ApplicationForm/ReviewCards.js index 543110ef..185d445b 100644 --- a/src/components/ApplicationForm/ReviewCards.js +++ b/src/components/ApplicationForm/ReviewCards.js @@ -522,7 +522,7 @@ export default ({ formInputs, handleEdit, onChange }) => { 🌱 {' '} Gender is deeply personal and can look different on each individual. We ask all - participants to trust that everyone attending belongs. + participants to trust that everyone attending belongs at cmd-f.

Date: Sat, 10 Feb 2024 15:11:25 -0500 Subject: [PATCH 29/30] Wording changes --- src/components/ApplicationForm/BasicInfo.js | 4 ++-- src/components/ApplicationForm/ReviewCards.js | 2 +- src/components/ApplicationForm/Skills.js | 2 +- src/pages/Application/Confirmation.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/ApplicationForm/BasicInfo.js b/src/components/ApplicationForm/BasicInfo.js index 48feba4b..ac3417a4 100644 --- a/src/components/ApplicationForm/BasicInfo.js +++ b/src/components/ApplicationForm/BasicInfo.js @@ -27,7 +27,7 @@ const genderOptions = [ { value: 'female', label: 'Woman' }, { value: 'male', label: 'Man' }, { value: 'non-binary', label: 'Non-binary/Genderqueer/Gender non-conforming' }, - { value: 'two-spirit', label: 'Two Spirit' }, + { value: 'two-spirit', label: 'Two-Spirit' }, { value: 'other', label: 'Prefer to self-describe' }, { value: 'prefer not to answer', label: 'Prefer not to answer' }, ] @@ -456,7 +456,7 @@ export default ({ refs, errors, formInputs, onChange }) => ( What is your current age?
-

We accept hackers currently in high school but require this for consent purposes.

+

We accept hackers currently in high school but require this information for consent purposes.

{errors?.ageByHackathon && {errors?.ageByHackathon}} { data={formInputs.skills.longAnswers2} /> { question 25 - Tell us about a project you’re really proud of and what you learnt from it. (200 words + Tell us about a project you’re really proud of and what you learned from it. (200 words max) diff --git a/src/pages/Application/Confirmation.js b/src/pages/Application/Confirmation.js index 1bffb072..8a370d1b 100644 --- a/src/pages/Application/Confirmation.js +++ b/src/pages/Application/Confirmation.js @@ -9,7 +9,7 @@ export default () => { return ( From fbf60c91e338d99e86291f3d4382bcf31662d7f0 Mon Sep 17 00:00:00 2001 From: Yan Sidyakin Date: Sat, 10 Feb 2024 15:15:17 -0500 Subject: [PATCH 30/30] Adjust submission deadline text --- src/components/ApplicationDashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ApplicationDashboard.js b/src/components/ApplicationDashboard.js index 2d3e92f7..d05d1877 100644 --- a/src/components/ApplicationDashboard.js +++ b/src/components/ApplicationDashboard.js @@ -300,7 +300,7 @@ export const hackerStatuses = (relevantDates, hackerName = null) => ({ sidebarText: 'Not Submitted', cardText: 'Not Submitted', // blurb: `Your application has not been submitted. Please complete your application and submit before the deadline on ${relevantDates?.applicationDeadline} in order to join us at ${copyText.hackathonName}!`, - blurb: `Your application has not been submitted. Please complete your application and submit before December in order to join us at ${copyText.hackathonName}!`, + blurb: `Your application has not been submitted. Please complete your application and submit before February 22, 2024 in order to join us at ${copyText.hackathonName}!`, }, })