openedx / openedx/frontend-app-learning

Remove always-true completion tracking props from course outline sidebar plugin slots

Open
#1,996 0 comments 0 reactions 0 assignees View on GitHub

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.md
  • src/plugin-slots/CourseOutlineSidebarUnitSlot/index.tsx + README.md
  • src/courseware/course/sidebar/sidebars/course-outline/components/CompletionIcon.tsx — the CompletionIconProps.enabled field and the !completed || !enabled case
  • src/courseware/course/sidebar/sidebars/course-outline/components/SidebarUnit.tsx and SidebarUnitContent.tsx
  • src/courseware/course/sidebar/sidebars/course-outline/components/SidebarSection.jsx and SidebarSequence.jsx
  • the corresponding .test.jsx / .test.tsx files
Open questions
  1. What is the actual impact? A plugin that destructures enabled would silently receive undefined, so any enabled && <...> branch would stop rendering rather than fail loudly. Is there a way to find out who overrides these slots?
  2. 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?
  3. Should CompletionIconProps (exported from CompletionIcon.tsx and re-used by the slot's Props interface) 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 !enabled rendering branches
  • Both slot READMEs updated
  • Plugin authors notified via whatever channel the process calls for

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.