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 CRA client to vite + react #126

Merged

Conversation

brysonbw
Copy link
Contributor

@brysonbw brysonbw commented Jan 17, 2025

Changes

Refactoring and checking for improvements to the logic within the source wasn't the focus - updating libs and migrating to Vite + Rite

Triage of issues intended to be resolved

1. Migrate from CRA to Vite + React

CRA was deprecated in early 2023. Likewise, Vite or Next.JS are now recommended to use when creating react/client(s)

2. Updating Library/Packages To Latest

I believe I've retained most packages that were used in the previous client package.json and updated to latest

Material UI V6 Upgrade
The migration here wasn't too bad. Followed the docs and most of the style components and core API's haven't changed

Only had to remove and convert deprecated @mui/styles imports to @mui/systems

3. Resolve Issue #122

Additions

  • Import aliases
  • Config Eslint + Prettier for project and added scripts
  • Refactor tests folder structure
  • Apply strict NPM and Node versioning

@brysonbw brysonbw changed the title migrate CRA client to vite+ react migrate CRA client to vite + react Jan 17, 2025
Copy link
Collaborator

@duyminh1998 duyminh1998 left a comment

Choose a reason for hiding this comment

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

Some questions about the underscores might be OBE because I reread your PR summary. We might still leave them to track how to resolve the linting issues.

client/prettier.config.js Outdated Show resolved Hide resolved
client/src/App.tsx Outdated Show resolved Hide resolved
client/src/game/Game.ts Outdated Show resolved Hide resolved
client/src/game/Game.ts Outdated Show resolved Hide resolved
client/src/game/mission/PatrolMission.ts Outdated Show resolved Hide resolved
client/src/gui/map/ScenarioMap.tsx Outdated Show resolved Hide resolved
client/src/gui/map/ScenarioMap.tsx Outdated Show resolved Hide resolved
client/src/tests/utils.test.ts Outdated Show resolved Hide resolved
client/src/utils/date-time-functions.ts Outdated Show resolved Hide resolved
@brysonbw brysonbw force-pushed the vite-react-client-migration branch from a7a02d9 to b0136d8 Compare January 18, 2025 23:11
@brysonbw
Copy link
Contributor Author

@duyminh1998 Applied changes and refactoring for tests. If you could pull and test it out that'll be smooth

@brysonbw brysonbw requested a review from duyminh1998 January 18, 2025 23:15
@duyminh1998 duyminh1998 mentioned this pull request Jan 19, 2025
Copy link
Collaborator

@duyminh1998 duyminh1998 left a comment

Choose a reason for hiding this comment

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

Minor changes. Pretty much ready to merge.

client/README.md Outdated Show resolved Hide resolved
client/src/game/Game.ts Outdated Show resolved Hide resolved
@brysonbw brysonbw force-pushed the vite-react-client-migration branch from b0136d8 to 1beb7fa Compare January 19, 2025 16:04
@duyminh1998 duyminh1998 merged commit b653aa4 into Panopticon-AI-team:main Jan 19, 2025
@brysonbw brysonbw deleted the vite-react-client-migration branch January 20, 2025 13:26
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.

2 participants