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 from CRA to Vite #1379 #1380

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

Conversation

joelvdavies
Copy link
Contributor

@joelvdavies joelvdavies commented Mar 12, 2024

Description

Replaces CRA with Vite. Used the default settings that create-vite would have generated in the tsconfig. The only real change caused by that is a requirement of underscores on some unused variable & I removed the props on the footer as they weren't either (noUnusedParameters).

Notes

Warning

The index.html has moved out of the public folder into the root, so docker-ims needs to be updated on gitlab as the title can no longer be replaced as it used to be, and instead will be in /dist after being built. Likely also effects any ansible config.

Testing instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check Actions build
  • Review changes to test coverage
  • Test against other front ends

Agile board tracking

Closes #1379

@joelvdavies joelvdavies added enhancement New feature or request dependencies Pull requests that update a dependency file labels Mar 12, 2024
@joelvdavies joelvdavies self-assigned this Mar 14, 2024
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 94.82759% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 86.42%. Comparing base (b51eecf) to head (bf9dce6).

Files Patch % Lines
src/i18n.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           react-18-#1205    #1380       +/-   ##
===================================================
- Coverage           96.76%   86.42%   -10.35%     
===================================================
  Files                  48       56        +8     
  Lines                1763     8561     +6798     
  Branches              497      893      +396     
===================================================
+ Hits                 1706     7399     +5693     
- Misses                 53     1155     +1102     
- Partials                4        7        +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joelvdavies joelvdavies force-pushed the migrate-to-vite-#1379 branch from 9882f3b to 47c20d0 Compare March 15, 2024 11:29
@joelvdavies joelvdavies force-pushed the migrate-to-vite-#1379 branch from 47c20d0 to 7cebf93 Compare March 15, 2024 11:37
@joelvdavies joelvdavies force-pushed the migrate-to-vite-#1379 branch from 7747b8b to 505728c Compare March 21, 2024 10:32
@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 94.23077% with 3 lines in your changes missing coverage. Please review.

Project coverage is 97.66%. Comparing base (cbfa974) to head (26fab0f).

Files with missing lines Patch % Lines
src/i18n.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1380      +/-   ##
===========================================
+ Coverage    97.11%   97.66%   +0.55%     
===========================================
  Files           49       54       +5     
  Lines         1802     5784    +3982     
  Branches       503      906     +403     
===========================================
+ Hits          1750     5649    +3899     
- Misses          48      133      +85     
+ Partials         4        2       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joelvdavies joelvdavies force-pushed the migrate-to-vite-#1379 branch from 5b0f17d to 384f97b Compare August 16, 2024 14:14
@joelvdavies joelvdavies changed the base branch from react-18-#1205 to develop November 27, 2024 11:02
@joelvdavies joelvdavies force-pushed the migrate-to-vite-#1379 branch from f8125f2 to 09cb6b7 Compare November 27, 2024 11:17
@joelvdavies joelvdavies marked this pull request as ready for review November 27, 2024 11:23
vite.config.ts Outdated Show resolved Hide resolved
Copy link
Member

@louise-davies louise-davies left a comment

Choose a reason for hiding this comment

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

Seems to be working ok, need to test with e.g. OG properly but I'll wait until my previous comments are addressed for a final review

Copy link
Member

@louise-davies louise-davies left a comment

Choose a reason for hiding this comment

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

LGTM and it's working well with OG. However, I don't want to merge this yet before we're ready to make the necessary deployment changes (e.g. scigateway-ansible).

I can probably make a branch for the changes for scigateway-ansible to support this work and merge it in once we are ready to switch to v3.x.x in production.

I've created an issue in scigateway-ansible: ral-facilities/scigateway-ansible#10

Copy link
Contributor

@joshuadkitenge joshuadkitenge left a comment

Choose a reason for hiding this comment

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

LGTM, tested with IMS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate CRA to Vite
4 participants