feat: Add course completion slot for Progress Tab#1943
Conversation
|
Thanks for the pull request, @xitij2000! 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. DetailsWhere 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 #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. 🚀 New features to boost your workflow:
|
|
@brian-smith-tcril Re: you message on Slack. Here is one of the PRs. |
brian-smith-tcril
left a comment
There was a problem hiding this comment.
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 />} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| verifiedMode={verifiedMode} | ||
| /> | ||
| <main className="d-flex flex-column flex-grow-1"> | ||
| <main className={`d-flex flex-column flex-grow-1 ${activeTabSlug}-tab-page`}> |
There was a problem hiding this comment.
This feels like an unrelated change.
There was a problem hiding this comment.
Yes, I can move it to a different PR, but the intention is to allow each tab page to be styled differently.
24dbacc to
fa40f0b
Compare
|
|
||
| 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). |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
fa40f0b to
67c1d41
Compare
|
@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. |
Introduces
ProgressTabCourseCompletionSlotto 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