-
Notifications
You must be signed in to change notification settings - Fork 6
Migrate settings to Tanstack Query #1040
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
Conversation
lhvy
left a comment
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.
This is a solid start for moving us towards React Query. 🎉
|
Let's make this PR just for the settings migration. I'd like to see this roll out sooner rather than later to save an onslaught of merge conflicts. I also want to loop more people into this process - will be easier as multiple branches and PRs. |
64d6c3c to
0d4f557
Compare
…re-rendering of whole App component
…rsion and dependecies issue
257ae92 to
7a2ada4
Compare
lhvy
left a comment
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.
Looks really good to me. Need to discuss and test further over call, plus wait for second review before merging.
mark-trann
left a comment
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.
* Install TankStack library with corresponding devtool, integrate into App.tsx * Integrate react query in to setting page * Connect settings.useSquareEdge,useDarkMode,preferredTheme with FE components * Remove use of QueryContext to direct suspense query calling to avoid re-rendering of whole App component * Update all settings to use React Query * Fix FE build error by removing removed AppContext states on components * Remove redudant comments * Add Error Boundary for handling unintented error, resolve packages version and dependecies issue * Remove unwanted comments and resolve naming issues * Resolve setting item destructing before used, and other dependecies issues * Migrate JS fetch to Axios * Remove unwanted library import * Update ErrorBoundary to handle any unknown errors * Resolve build error * Rebase from server-rewrite * Rebase from server-rewrite, with autofix eslint * Refactor Settings component to fit the feat of profile picture * Remove unneccssary commnets * Resolved dropcard shadow logic with react query * Resolve CI build error and lint warnings from drag.ts * Resolve review errors from lucas * Resolve use-prefix issue for settings parameter with minor changes * Resolve review comments from mark * Update the prisma schema for user settings * Update the prisma schema for user settings * Resolve naming error
* Install TankStack library with corresponding devtool, integrate into App.tsx * Integrate react query in to setting page * Connect settings.useSquareEdge,useDarkMode,preferredTheme with FE components * Remove use of QueryContext to direct suspense query calling to avoid re-rendering of whole App component * Update all settings to use React Query * Fix FE build error by removing removed AppContext states on components * Remove redudant comments * Add Error Boundary for handling unintented error, resolve packages version and dependecies issue * Remove unwanted comments and resolve naming issues * Resolve setting item destructing before used, and other dependecies issues * Migrate JS fetch to Axios * Remove unwanted library import * Update ErrorBoundary to handle any unknown errors * Resolve build error * Rebase from server-rewrite * Rebase from server-rewrite, with autofix eslint * Refactor Settings component to fit the feat of profile picture * Remove unneccssary commnets * Resolved dropcard shadow logic with react query * Resolve CI build error and lint warnings from drag.ts * Resolve review errors from lucas * Resolve use-prefix issue for settings parameter with minor changes * Resolve review comments from mark * Update the prisma schema for user settings * Update the prisma schema for user settings * Resolve naming error

Description 🧾
Installed FE library TanStack Query and TanStack Query Dev Tools
Constructed FE API directory structure with
/route,/query,mutationfor each/userand/timetableDecided to use
axioslibrary for route calling, for more structural status handling.Migrated use of AppContext for setting toggles to React Query
Implemented an
ErrorBoundaryto catch any status error or unknown computation errors.In progress:
axiosinstead of JS in-builtfetch(Chosen to useaxiosfor more structural Status Handling).AppContext. Since every time any context value updated, whole App will be re-rendered.Testing
Testing for Settings: Access the TanStack Query Dev Tool, when toggling the settings options, there are updates of
[settings]query key, with corresponding FE changes.Checklist
feature: for application feature improvement or new featuresbug: fixing something that previously wasn't workingdev: development-side related changesdocker: updates to the Docker codesetup: changes to the setup/infrastructure of the codebasetest: updates to internal testing