openedx / openedx/frontend-app-learning

[DEPR]: deprecation of notifications panel's plugin slots, pluginProps and Id

Open
#1,902 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

depr
Dominant language
JavaScript
Stars
70
Forks
335
Avg merge
1d 17h
Merged PRs (30d)
35

Description

Per OEP-21, this ticket proposes the removal of the deprecated identifiers introduced by the rename of the Notifications sidebar widget to the Upgrade widget (PR #1899 / ADR 0010).

RFC Start Date

2026-04-17

Target Plan Accepted Date

2026-05-01

Target Transition Unblocked Date

Estimated Q3 2026, once operators have had time to update env.config.jsx configs, plugin slot IDs, and pluginProps references.


Rational

PR #1899 and PR #1885, the sidebar "Notifications" widget to "Upgrade" and introduced backward-compatibility shims so existing plugin configs and operator overrides would continue to work without changes. Those shims are now deprecated:

  • The old plugin slot IDs (notification_tray, notifications_discussions_sidebar, notifications_discussions_sidebar_trigger) were misnomers that implied general notification functionality. They are aliased to the correct new IDs but should not persist indefinitely.
  • The old pluginProps keys (notificationCurrentState, setNotificationCurrentState) duplicate the renamed props and create a maintenance burden.
  • WIDGETS.NOTIFICATIONS (whose value was changed from 'NOTIFICATIONS' to 'UPGRADE' as a shim) is an undocumented constant that external code should not depend on; the widget owns its own ID.
  • upgradeWidgetConfig being in DEFAULT_WIDGETS is a temporary accommodation; commercial widgets should not be opt-out by default in an open-source MFE.

Keeping these shims indefinitely means future renames or extractions cannot clean up without archaeology.


Removal

The following items are deprecated and will be removed:

Deprecated Location
Plugin slot ID org.openedx.frontend.learning.notification_tray.v1 and short alias notification_tray_slot src/widgets/upgrade/src/UpgradePanel.jsx - idAliases
Plugin slot ID org.openedx.frontend.learning.notifications_discussions_sidebar.v1 and short alias notifications_discussions_sidebar_slot src/plugin-slots/RightSidebarSlot/index.tsx - idAliases
Plugin slot ID org.openedx.frontend.learning.notifications_discussions_sidebar_trigger.v1 and short alias notifications_discussions_sidebar_trigger_slot src/plugin-slots/RightSidebarTriggerSlot/index.tsx - idAliases
pluginProps keys notificationCurrentState and setNotificationCurrentState on the upgrade panel slot src/widgets/upgrade/src/UpgradePanel.jsx - pluginProps
WIDGETS.NOTIFICATIONS constant (value 'UPGRADE') src/constants.ts
upgradeWidgetConfig in DEFAULT_WIDGETS (default-on behavior) src/courseware/course/sidebar/defaultWidgets.js

Full inventory with replacement mappings: ADR 0010: Migration & Backward Compatibility


Replacement
Deprecated Replacement
Slot notification_tray.v1 / notification_tray_slot org.openedx.frontend.learning.upgrade_panel.v1
Slot notifications_discussions_sidebar.v1 / notifications_discussions_sidebar_slot org.openedx.frontend.learning.right_sidebar.v1 / right_sidebar_slot
Slot notifications_discussions_sidebar_trigger.v1 / notifications_discussions_sidebar_trigger_slot org.openedx.frontend.learning.right_sidebar_trigger.v1 / right_sidebar_trigger_slot
pluginProps.notificationCurrentState pluginProps.upgradeCurrentState
pluginProps.setNotificationCurrentState pluginProps.setUpgradeCurrentState
WIDGETS.NOTIFICATIONS ID exported from src/widgets/upgrade/src
upgradeWidgetConfig in DEFAULT_WIDGETS Operators must add upgradeWidgetConfig explicitly to SIDEBAR_WIDGETS in env.config.jsx

Deprecation

All shim sites are already annotated with // @deprecated — aliased for backward compat; remove after one deprecation cycle (ADR 0010) comments. WIDGETS.NOTIFICATIONS in src/constants.ts carries a @deprecated JSDoc block. Running grep -R '@deprecated' in the repo enumerates all five code sites without requiring ADR archaeology.


Additional Info
  • Migration guide and complete renamed-identifier inventory: ADR 0010
  • Backward-compat shims were introduced in PR #1899.
  • localStorage keys were also renamed but are not shimmed (no server-side migration possible). Learner browsers will reset the "have I seen this" indicator on first load after upgrading. This is cosmetic only.
  • No database migrations required.

Transition Unblocked Tasks
  • Announce this DEPR ticket on discuss.openedx.org and link it here
  • Add to the Open edX DEPR project board
  • Confirm no Tutor plugins or known downstream repos still reference the deprecated slot IDs (search notification_tray and notifications_discussions_sidebar across the openedx GitHub org)
  • Confirm no downstream repos reference WIDGETS.NOTIFICATIONS or the old pluginProps keys
  • Document the Upgrade panel's env.config.jsx opt-in in the official operator docs before removing the default

Feature Removal Tasks
  • Remove deprecated idAliases entries from src/widgets/upgrade/src/UpgradePanel.jsx
  • Remove deprecated idAliases entries from src/plugin-slots/RightSidebarSlot/index.tsx
  • Remove deprecated idAliases entries from src/plugin-slots/RightSidebarTriggerSlot/index.tsx
  • Remove notificationCurrentState / setNotificationCurrentState from pluginProps in UpgradePanel.jsx
  • Remove WIDGETS.NOTIFICATIONS from src/constants.ts
  • Remove upgradeWidgetConfig from DEFAULT_WIDGETS in src/courseware/course/sidebar/defaultWidgets.js
  • Update src/plugin-slots/README.md to remove the strikethrough entry for notification_tray.v1
  • Update ADR 0010 to record the actual removal release

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 with grep -R '@deprecated' and inspect the listed shim sites: UpgradePanel.jsx, the two sidebar slot files, constants.ts, defaultWidgets.js, and the plugin-slots README. Check ADR 0010 and downstream references before removing the aliases, deprecated props, constant, and default widget; done means the migration inventory, README, and ADR reflect the removals and operator opt-in.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.