Skip to content

refactor(course-about): extract embeddable course content - #180

Draft
navinkarkera wants to merge 25 commits into
openedx:masterfrom
open-craft:navin/fal-4380/embeddable-course-about
Draft

navinkarkera wants to merge 25 commits into
openedx:masterfrom
open-craft:navin/fal-4380/embeddable-course-about

Conversation

@navinkarkera

@navinkarkera navinkarkera commented Nov 2, 2026 •

Copy link
Copy Markdown

Branch: navin/fal-4380/embeddable-course-about (936b6db)

Base: navin/fal-4380/shared-sharing (28154ee)

This is a stacked PR. Review this diff against the sharing PR (#179), not master.
Final PR: feat(pathways): open course details in a modal.

Description:

  • Content moves into a reusable body with optional hidden actions and custom share URL; the standalone page behaves as before.
  • Resolve course and overview image URLs consistently, and show a placeholder if the course image is missing or fails.
  • Sidebar hides start and end rows when dates are absent; a pending query shows a spinner, a failed or empty first load shows the support alert, and a failed refresh keeps the loaded course.

Testing instructions:

  • Open the Course About page on desktop and narrow viewports.
  • Enroll or View course appears as appropriate; staff still see the Studio link.
  • Override a Course About response so start and advertised_start are both null, start_date_is_still_default is false and end is null: no Classes start or Classes end rows appear.
  • Set media.course_image.uri to an empty string, then to a broken URL: the course image shows the placeholder. Relative overview images use the LMS base URL; absolute ones are unchanged.
  • Block /api/courseware/course/... for an uncached course and reload: support alert replaces the body.
  • Return an empty course record for an uncached course: the same support alert replaces the body.

AI Disclosure: Co-authored by GPT 6.1 Sol

@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 Nov 2, 2026
@openedx-webhooks

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 Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.62%. Comparing base (586f5f6) to head (936b6db).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
+ Coverage   99.56%   99.62%   +0.06%     
==========================================
  Files         101      107       +6     
  Lines         682      794     +112     
  Branches      165      222      +57     
==========================================
+ Hits          679      791     +112     
  Misses          2        2              
  Partials        1        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.

@navinkarkera
navinkarkera force-pushed the navin/fal-4380/embeddable-course-about branch from 209d155 to fd39df8 Compare November 3, 2026 07:00
@navinkarkera
navinkarkera force-pushed the navin/fal-4380/embeddable-course-about branch from 2be5261 to 78865bf Compare November 3, 2026 12:26
@rpenido rpenido moved this to In Progress in Learning Pathways Nov 3, 2026
The builder now returns only the rendered links; no host read the resolved href, so the field and its rationale are gone and the barrel no longer re-exports the result type.

Adds a SidebarSocial render/rerender test that fails if the destinations are cached instead of rebuilt from the live location.
@navinkarkera
navinkarkera force-pushed the navin/fal-4380/embeddable-course-about branch from 78865bf to 2298bdc Compare November 3, 2026 18:46
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Nov 4, 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.

Looks good 👍

  • 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

Comment thread src/course-about/CourseAboutPage.tsx Outdated
Comment on lines +42 to +44
if (!courseAboutData) {
return null;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This would return an empty page with no feedback. I think we should at least display an alert or an error message.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The page now shows an error when no course data is returned. A failed refresh still keeps the loaded content.

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.
@navinkarkera
navinkarkera force-pushed the navin/fal-4380/embeddable-course-about branch from 6d10efa to 936b6db Compare November 5, 2026 06:28
@navinkarkera navinkarkera moved this from In Progress to Upstream review in Learning Pathways Nov 12, 2026
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
Status: Upstream review

Development

Successfully merging this pull request may close these issues.

4 participants