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

Migrate to vite #375

Merged
merged 31 commits into from
Jan 21, 2024
Merged

Migrate to vite #375

merged 31 commits into from
Jan 21, 2024

Conversation

js0mmer
Copy link
Member

@js0mmer js0mmer commented Nov 1, 2023

Description

  • Migrated from create react app to vite
  • Set up dev server proxy for routing /api to the express dev server, removed http-proxy-middleware
  • Updated packages (typescript, react, react-dom, react-dom-router, nivo, react-redux)
  • Fixed index.tsx, routing, and bar/pie charts to be compatible with updated versions of react/react-dom, react-dom-router and nivo; respectively
  • Removed unused packages (html2canvas, misc. type packages)
  • Ran eslint fix (npm run lint -- --fix) to fix some eslint errors (unused vars and stuff)
  • Manually fixed remaining eslint errors

Next steps

  • Verify eslint rules and tsconfig options are what we want
    • look into adding jsx-a11y eslint plugin
  • Add eslint to backend (Add eslint to the backend #400)
  • Add prettier (Add prettier #370)
  • Investigate remaining warnings
    • Many warnings related to the useEffect hook and useCallback, make sure those aren't causing any bugs
    • Remove console logs. I added a rule that warns for console to help us avoid leaving them in
  • Consider switching from port 5000 to 8080 for the express dev server (5000 apparently conflicts with AirPlay on some macOS versions) (Change default port of express dev server #387)
  • Look into warning messages about bundle/chunk size
  • Look into adding a lint check to PRs

Steps to verify/test this change:

  • Verify changes work as expected on staging instance

Final Checks:

  • Verify successful deployment
  • Delete branch

(optional)

  • Write tests
  • Write documentation

Issues

Closes #362

@js0mmer js0mmer self-assigned this Nov 1, 2023
@js0mmer js0mmer marked this pull request as ready for review November 15, 2023 05:06
Copy link
Contributor

@SenghoungLim SenghoungLim left a comment

Choose a reason for hiding this comment

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

I tested the basic of the website instance, everything seems to work the same as the prod ones. I checked mainly on the review, sub review and review form since I am familiar with those codes. Good changes on the readability of the codes. I think it is good to go. Good job! (But Goddamn 73 files changes O.O)

ecxyzzy added a commit that referenced this pull request Dec 4, 2023
Copy link
Collaborator

@advayanand advayanand left a comment

Choose a reason for hiding this comment

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

Looks good, everything seems to work.

js0mmer added a commit that referenced this pull request Jan 21, 2024
* feat: initial migrate test

* feat: stable ground (no more ts errors)

* feat: everything works(?)

* fix: update footer

* feat: more cleanup

* fix: properly case GitHub

* fix: sort grade dist quarter dropdown, misc fixes

* fix: use async because it is almost 2024

* fix: address most comment changes

* fix: show class title in prereq tree nodes, correct links

* fix: less bad solution for prereq titles

* feat: fetch course/instructor data on demand

* fixed prereq box to only appear when there is text (#367)

* fix: grab review form fix from #375

Co-authored-by: Jacob Sommer <[email protected]>

* feat: use graphql for courses again, set endpoint to staging

* chore: migrate to latest api staging

* fix: make prereq tree node labels consistently spaced

* fix: reincorporate #391 changes

* feat: migrate to latest staging, hopefully fix perf issues

* Fix review form merging

* Restore original transformation fucntions

* Restore API url env vars

---------

Co-authored-by: Kyle Pan <[email protected]>
Co-authored-by: Jacob Sommer <[email protected]>
Co-authored-by: Jacob Sommer <[email protected]>
Copy link

Deployed staging instance to https://staging-375.peterportal.org

@js0mmer js0mmer merged commit 96cf321 into master Jan 21, 2024
2 checks passed
@js0mmer js0mmer deleted the vite branch January 21, 2024 07:27
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.

Migrate to vite
3 participants