openedx / openedx/frontend-app-learning
Remove always-true completion tracking props from course outline sidebar plugin slots
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 70
- Forks
- 335
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 35
Description
Background
DEPR: Remove ENABLE_COMPLETION_TRACKING_SWITCH Waffle Switch removed the completion.enable_completion_tracking waffle switch. Completion tracking is now unconditionally on, and the LMS endpoint that reported the switch to this MFE (GET /courses/{course_id}/courseware-navigation-sidebar/toggles/) is being removed.
The MFE-side plumbing for that toggle is gone — the getCoursewareOutlineSidebarToggles request, the coursewareOutlineSidebarSettings slice state, its selector, and useCourseOutlineSidebar's isEnabledCompletionTracking.
The remaining work
Two public plugin slot props still exist purely to carry that toggle, and both are now hardcoded to true:
| Slot | Prop |
|---|---|
CourseOutlineSidebarCompletionIconSlot |
enabled |
CourseOutlineSidebarUnitSlot |
isCompletionTrackingEnabled |
They were left in place deliberately: removing a documented prop from a plugin slot is a breaking change for third-party plugins, and that deserves its own impact assessment rather than riding along on a DEPR cleanup.
What removing them would touch
src/plugin-slots/CourseOutlineSidebarCompletionIconSlot/index.tsx+README.mdsrc/plugin-slots/CourseOutlineSidebarUnitSlot/index.tsx+README.mdsrc/courseware/course/sidebar/sidebars/course-outline/components/CompletionIcon.tsx— theCompletionIconProps.enabledfield and the!completed || !enabledcasesrc/courseware/course/sidebar/sidebars/course-outline/components/SidebarUnit.tsxandSidebarUnitContent.tsxsrc/courseware/course/sidebar/sidebars/course-outline/components/SidebarSection.jsxandSidebarSequence.jsx- the corresponding
.test.jsx/.test.tsxfiles
Open questions
- What is the actual impact? A plugin that destructures
enabledwould silently receiveundefined, so anyenabled && <...>branch would stop rendering rather than fail loudly. Is there a way to find out who overrides these slots? - What process do plugin-slot prop removals follow — a DEPR ticket, a deprecation period where the prop is still passed but documented as removed, a major version bump, or a forum announcement?
- Should
CompletionIconProps(exported fromCompletionIcon.tsxand re-used by the slot'sPropsinterface) be treated as public API too?
Acceptance criteria
- Impact and communication process decided and documented on this issue
- Both props removed, along with the now-dead
!enabledrendering branches - Both slot READMEs updated
- Plugin authors notified via whatever channel the process calls for
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the two plugin-slot READMEs and the listed CourseOutlineSidebar slot and component files, including their corresponding tests, to trace both props. Resolve the impact and communication process for this public API change, then remove both props and dead enabled branches, update documentation and tests, and document notification steps when done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100