Skip to content

feat: Add course completion slot for Progress Tab#1943

Open
xitij2000 wants to merge 1 commit into
openedx:masterfrom
open-craft:kshitij/progress-tab-slot
Open

feat: Add course completion slot for Progress Tab#1943
xitij2000 wants to merge 1 commit into
openedx:masterfrom
open-craft:kshitij/progress-tab-slot

Conversation

@xitij2000

Copy link
Copy Markdown
Contributor

Introduces ProgressTabCourseCompletionSlot to allow customization of the course completion chart in the Progress Tab. Updates related components to use this new slot.

private-ref: https://tasks.opencraft.com/browse/BB-10783

@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 Jul 17, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @xitij2000!

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

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.

Details
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 Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.49%. Comparing base (8eb7cca) to head (67c1d41).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1943      +/-   ##
==========================================
+ Coverage   91.46%   91.49%   +0.03%     
==========================================
  Files         351      354       +3     
  Lines        5820     5844      +24     
  Branches     1390     1393       +3     
==========================================
+ Hits         5323     5347      +24     
  Misses        478      478              
  Partials       19       19              

☔ 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.

@xitij2000

Copy link
Copy Markdown
Contributor Author

@brian-smith-tcril Re: you message on Slack. Here is one of the PRs.

@brian-smith-tcril brian-smith-tcril left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall this looks like a good slot to add! I left one comment with an open question, and another with a "should this be part of this PR?" note.

<PluginSlot
id="org.openedx.frontend.learning.progress_tab_course_completion.v1"
>
{!disableProgressGraph && <CourseCompletion />}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Open question: do we want the slot to render when disableProgressGraph is true?

If yes: disableProgressGraph should be a slot prop.
If no (the way I'm leaning): the slot doesn't care about disableProgressGraph and whatever component operators put in there can assume it's supposed to render when it's rendering.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I feel that the slot should render even if the disableProgressGraph is true since the slot area could be used to render something else. I'll make it a prop instead.

Comment thread src/tab-page/LoadedTabPage.tsx Outdated
verifiedMode={verifiedMode}
/>
<main className="d-flex flex-column flex-grow-1">
<main className={`d-flex flex-column flex-grow-1 ${activeTabSlug}-tab-page`}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This feels like an unrelated change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I can move it to a different PR, but the intention is to allow each tab page to be styled differently.

@xitij2000
xitij2000 force-pushed the kshitij/progress-tab-slot branch 2 times, most recently from 24dbacc to fa40f0b Compare July 23, 2026 10:57

This slot is used to replace or modify the Course Completion chart view in the Progress Tab. The course completion section displays a donut chart showing the learner's progress through the course content.

Note: The slot respects the `disableProgressGraph` setting from the progress model — if `disableProgressGraph` is true, the default `CourseCompletion` component will not be rendered (but plugins can still render custom content).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be updated now that there's a plugin prop. It'd also be good to add a simple example plugin that uses the prop in the slot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Certainly, will update asap.

Introduces `ProgressTabCourseCompletionSlot` to allow customization of the course completion chart in the Progress Tab. Updates related components to use this new slot.
@xitij2000
xitij2000 force-pushed the kshitij/progress-tab-slot branch from fa40f0b to 67c1d41 Compare July 23, 2026 17:25
@xitij2000

Copy link
Copy Markdown
Contributor Author

@brian-smith-tcril I updated the PR. I changed the flag to indicate whether the graph is enabled rather than disabled since that seemed more consistent to me.

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: Needs Triage

Development

Successfully merging this pull request may close these issues.

3 participants