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

feat: upgrade to react 18 and chakra v2 #7292

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Apr 29, 2024

This PR upgrades React from React 17 to React 18, as well as ChakraUI v1 to v2. This is necessary due to ChakraUI V2 only being compatible with React 18.

In addition, a bunch of packages are upgraded too to allow for compatibility with React 18.

list of changed deps required to make the app work lol:

  • "@chakra-ui/react": "^1.8.6" -> ^2.8.2
  • "@floating-ui/react-dom-interactions": "^0.9.3" (renamed) -> "@floating-ui/react": "^0.26.13"
  • "react-beautiful-dnd": "^13.1.0" (dead) -> "@hello-pangea/dnd": "^16.6.0" (fork)
  • "focus-visible": "^5.2.0" -> removed, unnecessary
  • "framer-motion": "^5.4.5" -> ^11.1.7
  • "react": "^17.0.2" -> ^18.3.0 (cutting edge ok)
  • "react-dom": "^17.0.2" -> ^18.3.0
  • "react-joyride": "^2.4.0" -> ^2.8.1
  • "react-markdown": "^8.0.3" -> ^9.0.1
  • "remark-breaks": "^3.0.2" -> ^4.0.0 (required for compat with rmd 9)
  • "remark-gfm": "^3.0.1" -> ^4.0.0 (required for compat with rmd 9)
  • "type-fest": "^2.8.0" -> ^4.17.0 (synced across repo)
  • "@testing-library/dom": "^8.11.1" -> removed, unnecessary
  • "@testing-library/react": "^12.1.2" -> ^15.0.5 (required or tests will break)
  • "@testing-library/user-event": "^14.4.3" -> ^14.5.2

refrained from upgrading some packages that are not super required, will do it in later PRs.
This includes:
@tanstack/react-query
react-hook-form, etc

Copy link
Contributor Author

karrui commented Apr 29, 2024

@karrui karrui force-pushed the 04-26-feat_upgrade_react_and_chakra-ui_react_v17_-_react_v18_chakra_v1_-_chakra_v2 branch from 46b2d11 to 3351110 Compare April 29, 2024 10:59
@karrui
Copy link
Contributor Author

karrui commented Apr 29, 2024

almost there, all the regressions are hopefully caught by frontend tests. thanks @opengovsg/formsg-engineers for the upkeep of tests! it's coming in super handy now :)

@karrui karrui marked this pull request as ready for review April 29, 2024 12:03
@timotheeg
Copy link
Contributor

Daaaaaang, great upgrades FTW @karrui 💪 !!

What noticeable improvements from the upgrade can the team expect, and should be monitored?

@karrui karrui force-pushed the 04-26-feat_upgrade_react_and_chakra-ui_react_v17_-_react_v18_chakra_v1_-_chakra_v2 branch 2 times, most recently from ecbc1d6 to 72d78b4 Compare April 30, 2024 07:21
@karrui
Copy link
Contributor Author

karrui commented Apr 30, 2024

Daaaaaang, great upgrades FTW @karrui 💪 !!

What noticeable improvements from the upgrade can the team expect, and should be monitored?

I think improvements are not noticeable to the public haha. This one just foundation to allow FormSG to use OGPDS (and not have upgrade path to react 19 get blocked when that comes out this year)

Developer experience wise, should be must faster to start up. Tests also run faster.

@karrui karrui force-pushed the 04-23-feat_add_initial_vite_config_and_new_eslint_rules branch from 2c7a9e4 to 9177241 Compare May 2, 2024 04:34
@karrui karrui force-pushed the 04-26-feat_upgrade_react_and_chakra-ui_react_v17_-_react_v18_chakra_v1_-_chakra_v2 branch from 72d78b4 to 8e5511e Compare May 2, 2024 04:35
@karrui karrui mentioned this pull request May 3, 2024
2 tasks
@KenLSM KenLSM force-pushed the 04-23-feat_add_initial_vite_config_and_new_eslint_rules branch from 2856457 to f2a558a Compare June 11, 2024 14:45
karrui added 25 commits June 11, 2024 22:57
really need to go to OGPDS soon lol
instead of following button's height
@KenLSM KenLSM force-pushed the 04-26-feat_upgrade_react_and_chakra-ui_react_v17_-_react_v18_chakra_v1_-_chakra_v2 branch from f663c06 to 6d16f3c Compare June 11, 2024 14:58
@KenLSM KenLSM merged commit 2db7cf4 into 04-23-feat_add_initial_vite_config_and_new_eslint_rules Jul 30, 2024
18 of 19 checks passed
@KenLSM KenLSM deleted the 04-26-feat_upgrade_react_and_chakra-ui_react_v17_-_react_v18_chakra_v1_-_chakra_v2 branch July 30, 2024 03:33
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.

None yet

3 participants