Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed export to csv, properly parses data with special characters #1027

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

allennatang
Copy link
Contributor

Tickets:

Fixes issue Fix Hacker export feature - Change .tsv to .csv #1000
Fixes pull request Fix/tsv csv #1026

List of changes:

  • Checks if the field is a free-form response (hacker application short answer question 1, 2 and short answer comments)
  • Format free-form responses to be properly parsed as comma-separated value (CSV)
    • If the value contains any quotes, newlines, tabs, or commas, wrap it in double quotes
  • Uses a byte-order mark (BOM) to make sure the file is encoded as UTF-8
    • Without this, quotation marks were being transformed into strange characters. Unsure why, maybe has to do with the library we use to download the file
    • After searching online, this solution seems to not be the best, but works when tested

Type of change:

  • Bug fix (non-breaking change which fixes an issue)

How to test:

  • Tested with local database using test data that includes commas, quotes, newlines, and tabs

PR Checklist:

  • Merged develop branch (before testing)
  • Linted my code locally
  • Listed change(s) in the Changelog
  • Tested all links in project relevant browsers
  • Tested all links on different screen sizes
  • Referenced all useful info (issues, tasks, etc)

Screenshots:

This is what the exported data looks (my default csv reader is Excel):
excel screenshot

MikaVohl and others added 14 commits October 30, 2024 19:05
…dded phone number field to account creation. (#1005)

Co-authored-by: Joshua Zhou <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>

* Added Jamie's changes for MLH checkbox, fixed merge conflicts.

* fixed dumb rebase error

---------

Co-authored-by: Tavi Pollard <[email protected]>
Co-authored-by: allennatang <[email protected]>
Co-authored-by: Tavi Pollard <[email protected]>
…#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Added Jamie's changes for MLH checkbox, fixed merge conflicts.

* fixed dumb rebase error

---------

Co-authored-by: Tavi Pollard <[email protected]>
Co-authored-by: allennatang <[email protected]>
Co-authored-by: Tavi Pollard <[email protected]>

* change-mchacks12

---------

Co-authored-by: Mika Vohl <[email protected]>
Co-authored-by: Joshua Zhou <[email protected]>
Co-authored-by: Joshua Zhou <[email protected]>
Co-authored-by: Tavi Pollard <[email protected]>
Co-authored-by: allennatang <[email protected]>
Co-authored-by: Tavi Pollard <[email protected]>
* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Added Jamie's changes for MLH checkbox, fixed merge conflicts.

* fixed dumb rebase error

---------

Co-authored-by: Tavi Pollard <[email protected]>
Co-authored-by: allennatang <[email protected]>
Co-authored-by: Tavi Pollard <[email protected]>

* change-mchacks12

---------

Co-authored-by: Mika Vohl <[email protected]>
Co-authored-by: Joshua Zhou <[email protected]>
Co-authored-by: Joshua Zhou <[email protected]>
Co-authored-by: Tavi Pollard <[email protected]>
Co-authored-by: allennatang <[email protected]>
Co-authored-by: Tavi Pollard <[email protected]>

---------

Co-authored-by: Tavi Pollard <[email protected]>
Co-authored-by: allennatang <[email protected]>
Co-authored-by: Mika Vohl <[email protected]>
Co-authored-by: Joshua Zhou <[email protected]>
Co-authored-by: Joshua Zhou <[email protected]>
Co-authored-by: Tavi Pollard <[email protected]>
…ist anymore, and adding new fields to match current account/application form.
Copy link

vercel bot commented Jan 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 6:01am

@allennatang allennatang requested a review from tektaxi January 4, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants