MoTrPAC / motrpac-frontend

User interface and Frontend for MoTrPAC Bioinformatics Center
MIT License
3 stars 0 forks source link

Refactor, move from react-scripts to vite #333

Open mihirsamdarshi opened 2 months ago

mihirsamdarshi commented 2 months ago

This PR introduces a number of changes.

React no longer maintains create-react-app, and a number of the packages that the frontend were using have long been deprecated

Here are all the changes introduced by this PR:

react-scripts -> vite refactor

react-router v5 to v6 upgrade

Replace jest with vitest

Code Split CSS

Misc changes

Regressions

mihirsamdarshi commented 3 weeks ago

Hey @jimmyzhen this PR is ready for a review

mihirsamdarshi commented 2 weeks ago

I deployed this PR to our Kubernetes testing website. You can verify that there are no regressions on this website.

This PR significantly improves Lighthouse scores, and since Lighthouse is one aspect used by Google to determine search rankings, this should help with SEO as well.

Lighthouse Before Screenshot 2024-07-08 at 6 04 54 PM
Lighthouse With Refactor Screenshot 2024-07-08 at 6 04 56 PM

Additionally, notice the DOMContentLoaded time and amount of data transferred when throttling to 4G speeds. Mobile users on cellular networks will have better experiences.

Loading Time Before Screenshot 2024-07-08 at 6 12 22 PM
Loading Time With Refactor Screenshot 2024-07-08 at 6 12 24 PM