feat(explore): prepare catalog for pathways and category filters - #149
navinkarkera wants to merge 20 commits into
Conversation
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.
|
Thanks for the pull request, @navinkarkera! 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 #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. 🚀 New features to boost your workflow:
|
ChrisChV
left a comment
There was a problem hiding this comment.
@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
PathwayCardrendered?
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.
|
@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). |
|
@navinkarkera Looks good! The ADR's decision seems fine to me 👍 |
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
courseDataResultsLengthalias, so existing plugins keep working.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:
category: the endpoint returns a category aggregation under the keycategory, with terms usable as filter options.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:
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:
AI disclosure: Use GPT 5.6 Sol to help with development as well as drafting detailed pull request description.