Redux cleanup and data folder refactor#792
Redux cleanup and data folder refactor#792jacobo-dominguez-wgu wants to merge 15 commits intoopenedx:masterfrom
Conversation
…ner-dashboard into react-query-migration
|
Thanks for the pull request, @jacobo-dominguez-wgu! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #792 +/- ##
==========================================
+ Coverage 97.54% 97.86% +0.32%
==========================================
Files 148 146 -2
Lines 1302 1406 +104
Branches 225 301 +76
==========================================
+ Hits 1270 1376 +106
+ Misses 31 30 -1
+ Partials 1 0 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
All the redux code and files were removed, including all redux and related packages.
The folder and files structure for react query hooks and context were refactored.
Also includes a small refactor on the api files.
Packages removed:
Context and react query folders after the refactor:
src/ └── data/ │ ├── constants/ # Application constants │ ├── context/ # React Context providers │ ├── index.tsx # Context exports │ ├── index.test.tsx # Context tests │ ├── BackedDataProvider.tsx # Backed data context │ ├── BackedData.test.tsx # Backed data tests │ ├── FiltersProvider.tsx # Filters state context │ ├── Filters.test.tsx # Filters tests │ ├── MasqueradeProvider.tsx # Masquerade context │ ├── Masquerade.test.tsx # Masquerade tests │ ├── SelectSessionProvider.tsx # Session selection context │ └── SelectSession.test.tsx # Session selection tests │ ├── hooks/ # React query hooks │ ├── index.ts # Hooks exports │ ├── queryHooks.ts # React Query hooks │ ├── queryHooks.test.tsx # Query hooks tests │ ├── mutationHooks.ts # React Query mutations │ ├── mutationHooks.test.tsx # Mutation hooks tests │ └── queryKeys.ts # React Query key definitions │ └── services/ # External service integrations │ ├── lms/ # Learning Management System │ ├── index.js # LMS service exports │ ├── api.ts # LMS API client │ ├── api.test.tsx # LMS API tests │ └── segment/ # Analytics/Segment integrationIt closes #770
Part of react query migration initiative: #768
MUST BE REVIEWED AND MERGED AFTER: #786
Migration Strategy
Phase 1: Update Dependencies (does not apply)Phase 2 (#786): Add React Query + Context alongside Redux
Phase 3 (This PR): Remove all Redux related code and tests and refactor data folder structure
How to test it
Make sure all existing features work as before:
Dashboard Loading: Verify courses load correctly on initial page load and the fallback screen when there are no courses.
Course Filtering: Test search, status filters, and sorting functionality.
Course Card and Actions: Test unenroll, social sharing, email settings, entitlement, banners shows correctly.
Masquerade Feature: Test admin masquerade functionality with valid/invalid users.
Select session modal: I could not test it using the UI, but unit test passes (Manual testing required here).