From 6a1647298bce39c47a0b5211a181c0a75965cd9b Mon Sep 17 00:00:00 2001 From: Tavi Pollard <45189395+tektaxi@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:03:41 -0500 Subject: [PATCH] dev to main - switch csv to tsv to avoid user input errors (#1025) * Remove Netlify link from README * Removed Facebook eventPrompt; Fixed typo in application submission; Added phone number field to account creation. (#1005) Co-authored-by: Joshua Zhou * Fix/fixed phone number input (#1006) * Removed Facebook eventPrompt; Fixed typo in application submission; Added phone number field to account creation. * Initialize phone number as inputted value in sign up form so it doesn't default to 11111111111 --------- Co-authored-by: Joshua Zhou * MLH Form Changes (#1016) * Updated level of study options to match MLH requirements * #1000 - Update export from .tsv to .csv * Changed hacker account form 'birthdate' field to 'age' #1003 * Added country of residence field to Other/Personal Details section of hacker application #1009 * Added country of residence field to the hacker application. * add back CEGEP level of study. --------- Co-authored-by: allennatang * Add 3rd checkbox to Terms and Conditions (#1012) * Add 3rd checkbox to Terms and Conditions #1010 * MLH Form Changes (#1016) * Updated level of study options to match MLH requirements * #1000 - Update export from .tsv to .csv * Changed hacker account form 'birthdate' field to 'age' #1003 * Added country of residence field to Other/Personal Details section of hacker application #1009 * Added country of residence field to the hacker application. * add back CEGEP level of study. --------- Co-authored-by: allennatang * Added Jamie's changes for MLH checkbox, fixed merge conflicts. * fixed dumb rebase error --------- Co-authored-by: Tavi Pollard <45189395+tektaxi@users.noreply.github.com> Co-authored-by: allennatang Co-authored-by: Tavi Pollard * Clear the fields and add success message after sending account invite (#1008) * change-mchacks12 * change-mchacks12 * Remove Netlify link from README * Removed Facebook eventPrompt; Fixed typo in application submission; Added phone number field to account creation. (#1005) Co-authored-by: Joshua Zhou * Fix/fixed phone number input (#1006) * Removed Facebook eventPrompt; Fixed typo in application submission; Added phone number field to account creation. * Initialize phone number as inputted value in sign up form so it doesn't default to 11111111111 --------- Co-authored-by: Joshua Zhou * add success message and reset fields after an invite is successfully sent * MLH Form Changes (#1016) * Updated level of study options to match MLH requirements * #1000 - Update export from .tsv to .csv * Changed hacker account form 'birthdate' field to 'age' #1003 * Added country of residence field to Other/Personal Details section of hacker application #1009 * Added country of residence field to the hacker application. * add back CEGEP level of study. --------- Co-authored-by: allennatang * Add 3rd checkbox to Terms and Conditions (#1012) * Add 3rd checkbox to Terms and Conditions #1010 * MLH Form Changes (#1016) * Updated level of study options to match MLH requirements * #1000 - Update export from .tsv to .csv * Changed hacker account form 'birthdate' field to 'age' #1003 * Added country of residence field to Other/Personal Details section of hacker application #1009 * Added country of residence field to the hacker application. * add back CEGEP level of study. --------- Co-authored-by: allennatang * Added Jamie's changes for MLH checkbox, fixed merge conflicts. * fixed dumb rebase error --------- Co-authored-by: Tavi Pollard <45189395+tektaxi@users.noreply.github.com> Co-authored-by: allennatang Co-authored-by: Tavi Pollard * change-mchacks12 --------- Co-authored-by: Mika Vohl <103958325+MikaVohl@users.noreply.github.com> Co-authored-by: Joshua Zhou Co-authored-by: Joshua Zhou Co-authored-by: Tavi Pollard <45189395+tektaxi@users.noreply.github.com> Co-authored-by: allennatang Co-authored-by: Tavi Pollard * Fix/update grad years (#1015) * Add 3rd checkbox to Terms and Conditions #1010 * Update Grad Years in Filter * MLH Form Changes (#1016) * Updated level of study options to match MLH requirements * #1000 - Update export from .tsv to .csv * Changed hacker account form 'birthdate' field to 'age' #1003 * Added country of residence field to Other/Personal Details section of hacker application #1009 * Added country of residence field to the hacker application. * add back CEGEP level of study. --------- Co-authored-by: allennatang * Clear the fields and add success message after sending account invite (#1008) * change-mchacks12 * change-mchacks12 * Remove Netlify link from README * Removed Facebook eventPrompt; Fixed typo in application submission; Added phone number field to account creation. (#1005) Co-authored-by: Joshua Zhou * Fix/fixed phone number input (#1006) * Removed Facebook eventPrompt; Fixed typo in application submission; Added phone number field to account creation. * Initialize phone number as inputted value in sign up form so it doesn't default to 11111111111 --------- Co-authored-by: Joshua Zhou * add success message and reset fields after an invite is successfully sent * MLH Form Changes (#1016) * Updated level of study options to match MLH requirements * #1000 - Update export from .tsv to .csv * Changed hacker account form 'birthdate' field to 'age' #1003 * Added country of residence field to Other/Personal Details section of hacker application #1009 * Added country of residence field to the hacker application. * add back CEGEP level of study. --------- Co-authored-by: allennatang * Add 3rd checkbox to Terms and Conditions (#1012) * Add 3rd checkbox to Terms and Conditions #1010 * MLH Form Changes (#1016) * Updated level of study options to match MLH requirements * #1000 - Update export from .tsv to .csv * Changed hacker account form 'birthdate' field to 'age' #1003 * Added country of residence field to Other/Personal Details section of hacker application #1009 * Added country of residence field to the hacker application. * add back CEGEP level of study. --------- Co-authored-by: allennatang * Added Jamie's changes for MLH checkbox, fixed merge conflicts. * fixed dumb rebase error --------- Co-authored-by: Tavi Pollard <45189395+tektaxi@users.noreply.github.com> Co-authored-by: allennatang Co-authored-by: Tavi Pollard * change-mchacks12 --------- Co-authored-by: Mika Vohl <103958325+MikaVohl@users.noreply.github.com> Co-authored-by: Joshua Zhou Co-authored-by: Joshua Zhou Co-authored-by: Tavi Pollard <45189395+tektaxi@users.noreply.github.com> Co-authored-by: allennatang Co-authored-by: Tavi Pollard --------- Co-authored-by: Tavi Pollard <45189395+tektaxi@users.noreply.github.com> Co-authored-by: allennatang Co-authored-by: Mika Vohl <103958325+MikaVohl@users.noreply.github.com> Co-authored-by: Joshua Zhou Co-authored-by: Joshua Zhou Co-authored-by: Tavi Pollard * Accomodate intl phone numbers in account creation * Changed conditional rendering for editing phone number in ManageAccountForm.tsx * Updated hacker export by removing/commenting out fields that don't exist anymore, and adding new fields to match current account/application form. * switch csv export to tsv to avoid input errors --------- Co-authored-by: Mika Vohl <103958325+MikaVohl@users.noreply.github.com> Co-authored-by: Joshua Zhou Co-authored-by: Joshua Zhou Co-authored-by: allennatang Co-authored-by: Jamie Xiao <141690843+JamieXiao@users.noreply.github.com> --- src/features/Search/Search.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/Search/Search.tsx b/src/features/Search/Search.tsx index 0e0b1aa4..9794d66f 100644 --- a/src/features/Search/Search.tsx +++ b/src/features/Search/Search.tsx @@ -280,7 +280,7 @@ class SearchContainer extends React.Component<{}, ISearchState> { headers.forEach((header) => { tempHeaders.push(header.label); }); - const csvData: string[] = [tempHeaders.join(',')]; + const csvData: string[] = [tempHeaders.join('\t')]; // actually in tsv format this.filter().forEach((result) => { if (result.selected) { const row: string[] = []; @@ -294,10 +294,10 @@ class SearchContainer extends React.Component<{}, ISearchState> { } row.push(value); }); - csvData.push(row.join(',')); + csvData.push(row.join('\t')); } }); - fileDownload(csvData.join('\n'), 'hackerData.csv', 'text/csv'); + fileDownload(csvData.join('\n'), 'hackerData.tsv', 'text/tsv'); } private async triggerSearch(): Promise {