-
Notifications
You must be signed in to change notification settings - Fork 321
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
Redux Toolkit Migration #1113
Redux Toolkit Migration #1113
Conversation
--Selects working with refactored & memo'd Chart DataSelectors
- More RTK Queries.
-RouteComponent - Login mutations, and useNavigateHook();
- Admin pages Meter, Group, Unit useSelectorChanges.
- Containers converted to components and utilize RTK Query
- Selectors live in CreateSlice's selector's property
-- Redux 5.0.3 Beta version bump -- Selectors Refactor -- Custom Cache Behavior for network efficiency
-- remove logs.
radar and 3D files removed since radar always used line and 3D seems similar. Thus, that state definations are also gone.
The selectUnitNmae used the wrong unit id.
I want to express my deep thanks to @ChrisMart21 for initiating and completing the migration of OED to the Redux Toolkit and Query system. This not only gets OED up to the latest Redux usage but adds a number of new features such as history of graphics. This is a substantial step in OED keeping current with technology and reducing our technical debt. Many thanks. |
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.
Thanks to @ChrisMart21 for another substantial contribution. All the comments have been addressed and testing finds the code works as expected. It is ready to merge.
Description
This pull request primarily focuses on updating the project to modern Redux patterns by migrating to the recommended 'Redux-Toolkit' while addressing several other minor issues along the way.
Fixes:
Partially addresses
update React/Redux usage #726 / React hooks for line, bar, compare & map graphics pages #888
Alerts need to be switched #1093
Type of change
Checklist
Limitations
This pull request introduces numerous changes across the front end that are yet to be thoroughly tested. While not entirely feature-complete, it represents a significant step towards migrating to RTK. A thorough evaluation is necessary to ensure these changes have not impaired the functionality of the app.
This PR has a version bump to react-router-v6. This change introduces several newer hooks that pair well with the ongoing migration towards functional components. This did however introduce some backwards compatibility issues with the current implementation of the unsaved warning. This component has to be reworked for compatibility with react-router-v6, but also Redux RTK.
There was issues/difficulty migrating the entirety of 'Maps'. Maps currently is still using legacy redux and either needs to be reworked, or migrated properly by someone more knowledgeable on this section of the code base.
Redux-Toolkit introduces some new devmode checks which conflict with some of the legacy Redux code. For example, the 'serializableCheck' has to currently be suppressed due to the use of TimeInverval in Redux State. TimeInterval is a class which is non-serialiazable which needs to be addressed. Additionally 'immutableCheck' is also currently has conflicts with the maps implementation. For the time being, these checks are disabled to prevent the app from malfunctioning, however the goal is to address these issues, and have all dev mode checks enabled.