Repository navigation
feat(pathways): open course details in a modal - #182
navinkarkera wants to merge 43 commits into
Conversation
|
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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #182 +/- ##
==========================================
+ Coverage 99.56% 99.71% +0.15%
==========================================
Files 101 120 +19
Lines 682 1041 +359
Branches 165 297 +132
==========================================
+ Hits 679 1038 +359
Misses 2 2
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4a52df9 to
84aaba8
Compare
84aaba8 to
480fdf4
Compare
Only the LMS /static/images/ and /asset paths are resolved to the LMS base URL; data:, blob:, protocol-relative and other sources stay as authored. Drop the unused exports on the local body props and intro actions.
A query that is no longer pending but has no data, including a successful null payload, now renders the existing support alert instead of nothing. Loaded content is still shown when a background refetch fails.
The scrollspy can move the address to a section that is already active, and a tab click lets the anchor update the hash after the click render. Both left the sidebar's share destinations on the previous address. Track the address's section hash in state and derive the active section from it, so synchronizing '' -> '#about' re-renders even though the active tab does not change. Scrollspy still uses replaceState; a click performs the fragment navigation before the state update, so the anchor's default finds the address unchanged and the page keeps one history entry, fragment scrolling and modified-click behaviour. Rendering no longer mutates history, so routes with no pathway keep their address. Select credential cards by their visible course line and drop the unused credential-kind class names, which had no style rules.
The page reads the bundled sample record through React Query until a pathway endpoint exists, with explicit loading, error and missing-record states. The navigation hook now mounts with the loaded view so its observers attach, and the loaded view is keyed by record.
A failed pathway request is a support problem, not a bad URL, so the danger alert uses the shared error copy with the configured INFO_EMAIL. The sidebar shares through the shared current-page target constant, and a cached pathway switch resets each expanded list through the keyed loaded view.
No content change: the sample mock ends with a single newline.
The static pathway fixture course IDs are slugs the LMS cannot resolve in every environment, so key the bundled modal content off those IDs instead of the development environment; real course keys keep fetching, with their loading, error and cache behaviour. Drop the modal's own absolute URL construction and pass the routed URL to the shared share-link resolver, and use the Paragon heading line-height token.
The pathway fixture moved to src/__mocks__/pathway.ts, so the modal and its tests take the shared record instead of the removed sync module. The paused-query case now loads the page before going offline, so only the dialog's query starts paused.
fcb97a1 to
f6d41e8
Compare
ChrisChV
left a comment
There was a problem hiding this comment.
👍
- I tested this: I followed the testing instructions
- I read through the code and considered the security, stability and performance implications of the changes.
- I tested that the UI can be used with a keyboard only (tab order, keyboard controls).
- Includes tests for bugfixes and/or features added.
- Includes documentation
- Includes fixtures that create objects required for manual testing.
Branch:
navin/fal-4380/course-details-modal(f6d41e8)Base:
navin/fal-4380/pathway-detail(896aa27)Description:
Testing instructions (default preview):
/catalog/pathways/data-engineering-fundamentals, expand "SQL for Data Engineers" and click Learn more./catalog/courses/sql-for-data-engineers/about, not the pathway.Testing instructions (real API): replace one course ID in
src/__mocks__/pathway.tswith a real LMS course key and restart the dev server; the static slugs otherwise 404.