Skip to content

Redux cleanup and data folder refactor#792

Draft
jacobo-dominguez-wgu wants to merge 15 commits intoopenedx:masterfrom
WGU-Open-edX:redux-cleanup
Draft

Redux cleanup and data folder refactor#792
jacobo-dominguez-wgu wants to merge 15 commits intoopenedx:masterfrom
WGU-Open-edX:redux-cleanup

Conversation

@jacobo-dominguez-wgu
Copy link

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:

dependencies: {
    "@redux-devtools/extension": "3.3.0",
    "@reduxjs/toolkit": "^2.0.0",
    "react-redux": "^7.2.4",
    "redux": "4.2.1",
    "redux-logger": "3.0.6",
    "redux-thunk": "2.4.2",
    "reselect": "^4.0.0",
},
devDependencies: {
    "redux-mock-store": "^1.5.4"
}

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 integration

It 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).

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Feb 6, 2026
@openedx-webhooks
Copy link

Thanks for the pull request, @jacobo-dominguez-wgu!

This repository is currently maintained by @2U-aperture.

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If 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 PR

Your 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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 97.99666% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.86%. Comparing base (cfc8297) to head (e14a0f7).

Files with missing lines Patch % Lines
...components/CourseCardBanners/CertificateBanner.jsx 81.25% 3 Missing ⚠️
...Card/components/CourseCardBanners/CourseBanner.jsx 71.42% 2 Missing ⚠️
...ents/CourseCardBanners/CreditBanner/views/hooks.js 75.00% 2 Missing ⚠️
...components/CourseCardBanners/CreditBanner/hooks.js 90.00% 1 Missing ⚠️
...s/CourseCard/components/CourseCardDetails/hooks.js 88.88% 1 Missing ⚠️
...ners/CourseCard/components/CourseCardMenu/hooks.js 94.11% 1 Missing ⚠️
src/data/hooks/queryHooks.ts 93.75% 1 Missing ⚠️
src/data/hooks/queryKeys.ts 90.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: No status
Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

[react-query] Phase 3: Cleanup

2 participants