Skip to content

feat(explore): prepare catalog for pathways and category filters - #149

Draft
navinkarkera wants to merge 20 commits into
openedx:masterfrom
open-craft:navin/fal-4374/public-explore-update
Draft

navinkarkera wants to merge 20 commits into
openedx:masterfrom
open-craft:navin/fal-4374/public-explore-update

Conversation

@navinkarkera

@navinkarkera navinkarkera commented Aug 11, 2026 •

Copy link
Copy Markdown

Related to: #153

Overview

This PR generalizes the catalog's course-specific naming to prepare the UI for mixed course and pathway results, and introduces a Categories filter driven by backend category aggregation. It also updates mock data with dummy category terms for temporary UI testing, and keeps plugin compatibility via a deprecated alias.

Changes

  • Generalized naming: course-specific catalog naming (intro slot, result count prop) now supports mixed course and pathway results.
  • Categories filter: renders a filter from the backend category aggregation, covering courses and custom pathway types such as bootcamps and tutorials.
  • Plugin compatibility: the intro slot keeps a stable ID and the result count prop retains a deprecated courseDataResultsLength alias, so existing plugins keep working.
  • Mock data: extended with dummy category terms for temporary UI testing.

Categories filter semantics

The filter lists all category terms returned by the backend aggregation for the current result set. Selecting a term filters the catalog to items carrying that category, regardless of whether the item is a course or a pathway.

Backend assumptions

This frontend change assumes the backend provides:

  • Mixed results: the search/listing endpoint can return courses and pathways together in one result set.
  • Aggregation named category: the endpoint returns a category aggregation under the key category, with terms usable as filter options.
  • Course category: courses expose a category field that participates in the aggregation.
  • Custom pathway type terms: pathway types such as bootcamps and tutorials are author-defined and appear as ordinary category terms.
  • Generic filter request: the existing generic filter request mechanism is reused; no new endpoint is required.
  • Required pathway fields: pathway results include the fields the catalog UI renders (title, description, image, category).

Testing without backend

Review only last 3 commit, other commits are part of another on-going PR

The backend dependency can be simulated by applying the mock dev-mock-course-list-search.patch:

git apply dev-mock-course-list-search.patch

This redirects development API calls to the existing mock response, which contains dummy course, bootcamp, and tutorial category options. It can verify that the Categories filter renders and accepts selections, but the static mock does not filter its results. The mock also contains no actual pathway result. To return to real backend data:

git apply -R dev-mock-course-list-search.patch

AI disclosure: Use GPT 5.6 Sol to help with development as well as drafting detailed pull request description.

Generalize course-specific catalog naming for mixed course and pathway
results. Render a Categories filter from the backend category aggregation,
supporting courses and custom pathway types such as bootcamps and tutorials.

Rename the intro slot and result count prop while retaining the deprecated
courseDataResultsLength alias for plugin compatibility. Extend mock data with
dummy category terms for temporary UI testing.
@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 Aug 11, 2026
@openedx-webhooks

openedx-webhooks commented Aug 11, 2026 •

Copy link
Copy Markdown

Thanks for the pull request, @navinkarkera!

This repository is currently maintained by @openedx/committers-frontend.

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

codecov Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.35484% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.91%. Comparing base (b8aa4dd) to head (149542a).

Files with missing lines Patch % Lines
src/home/components/courses-list/CoursesList.tsx 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
+ Coverage   98.89%   98.91%   +0.02%     
==========================================
  Files         106      110       +4     
  Lines        1083     1197     +114     
  Branches      185      232      +47     
==========================================
+ Hits         1071     1184     +113     
- Misses         12       13       +1     

☔ View full report in Codecov by Harness.
📢 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.

@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Aug 11, 2026

@ChrisChV ChrisChV left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@navinkarkera The code looks good, but I have a question.

The mock also contains no actual pathway result
  • Which field will be used to distinguish between a "course" and a "pathway" in the results? That isn't very clear in the Backend assumptions.
  • And isn't it possible to implement that swap, to see the PathwayCard rendered?

Comment thread src/catalog/hooks/useCourseData.ts Outdated
Comment thread src/catalog/hooks/useCourseData.ts Outdated
Type the mock response as CourseListSearchResponse and make the response
generic over CourseData.
Introduce a generic search response envelope and a discriminated mixed result type so the catalog can render courses and pathways from one ranked, paginated response. Rename useCourseListSearch to useCatalogListSearch and update consumers (CatalogPage, CoursesList, data-table card slot) to branch on result type and render pathway cards. Add ADR-0003 documenting the generic catalog search endpoint decision.
@navinkarkera

Copy link
Copy Markdown
Author

@ChrisChV I made some significant changes to the code and added a ADR to document the our backend expectation to make it easier while developing it. Please review this again, specifically the ADR. (Last 7 commits).

@ChrisChV

Copy link
Copy Markdown

@navinkarkera Looks good! The ADR's decision seems fine to me 👍

@navinkarkera
navinkarkera marked this pull request as ready for review August 14, 2026 04:45
@navinkarkera
navinkarkera marked this pull request as draft August 14, 2026 04:45
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: Waiting on Author

Development

Successfully merging this pull request may close these issues.

4 participants