-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update to React 18, convert all remaining .js files to typescript #82
base: main
Are you sure you want to change the base?
Conversation
…st is probably broken but this will be a much more functional starting point for fixing things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR updates the codebase to TypeScript and upgrades React to version 18 while modernizing component implementations. Key changes include the full conversion of remaining JavaScript files to TypeScript, migration of class components to functional components using React Hooks, and updates to various UI components for consistency with the new standards.
Reviewed Changes
File | Description |
---|---|
client/src/Home.tsx | New TypeScript Home component using React Router redirects. |
client/src/MicrosoftAuthService.ts | Converted to TypeScript with updated MSAL integration. |
client/src/actions/staff/gridDataHooks.ts | Rewritten as a TypeScript hook for managing staff grid data. |
client/src/components/account/UserAccount.tsx | Converted to TypeScript and updated to modern functional component style. |
client/src/components/player/fragments/ChallengeSubmissionFragment.tsx | Converted to TypeScript with functional component implementation. |
client/src/components/errors/Forbidden.tsx | New TypeScript error page for forbidden access. |
client/src/components/player/PlayerActiveCall.tsx | Converted to TypeScript with React Hooks and updated prop types. |
client/src/components/admin/AdminEvents.tsx | Updated to TypeScript with minor styling and JSX improvements. |
client/src/components/admin/AdminEventSummary.tsx | Converted to TypeScript and improved component readability. |
client/src/components/player/PlayerPlot.tsx | Converted to TypeScript with updated formatting and component restructuring. |
client/src/components/admin/dialogs/EventInstanceForm.tsx | Converted to TypeScript and updated event instance form behavior. |
client/src/components/player/CallManager.tsx | Converted to TypeScript with updated Hooks usage and callback functions. |
Copilot reviewed 91 out of 91 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
client/src/components/player/PlayerActiveCall.tsx:26
- It appears that the condition for updating team notes mistakenly calls setPublicNotes instead of setTeamNotes. Consider changing it to setTeamNotes(currentCall.teamNotes) to correctly update the team notes state.
if (teamNotes && teamNotes !== currentCall.teamNotes) { setPublicNotes(currentCall.teamNotes); }
This is primarily a large overhaul to ensure all files are in typescript. In addition to that, I've updated React to 18. I've done some cursory testing across the bigger pages I've changed and things generally seem to work, however some controls, especially some of the complexity we have for managing answers, potentially could have regressions. However I think the risk of regressing those now so that we can modernize everything is worth it and we can get those fixed before RC.
Fixes #53 and #73