Skip to content

fix: initialized notification dot state set to inactive - #15

Merged
choeying-10 merged 1 commit into
wbc-ulmo1-stagefrom
fix/notification-dot-inactive-default
Jun 9, 2026
Merged

fix: initialized notification dot state set to inactive#15
choeying-10 merged 1 commit into
wbc-ulmo1-stagefrom
fix/notification-dot-inactive-default

Conversation

@choeying-10

Copy link
Copy Markdown

Summary

  • Set default notificationStatus.<courseId> initialization to inactive in both sidebar trigger implementations.
  • Add provider fallback to inactive when local storage status is missing.
  • Baseline upgradeNotificationLastSeen on first load without forcing notificationStatus to active.
  • Keep existing re-activation behavior when upgrade notification state actually changes.

Why

Learners were seeing a red dot even when no meaningful notification content was available. This change reduces misleading red-dot states while preserving existing transition-driven activation behavior.

Files changed

  • src/courseware/course/sidebar/sidebars/notifications/NotificationTrigger.jsx
  • src/courseware/course/new-sidebar/sidebars/discussions-notifications/DiscussionsNotificationsTrigger.tsx
  • src/courseware/course/sidebar/SidebarContextProvider.jsx
  • src/courseware/course/new-sidebar/SidebarContextProvider.tsx
  • src/courseware/course/sidebar/sidebars/notifications/NotificationTrigger.test.jsx

@choeying-10
choeying-10 requested a review from 10kalden June 5, 2026 11:23
@choeying-10 choeying-10 self-assigned this Jun 5, 2026
@choeying-10

Copy link
Copy Markdown
Author

Notification Tray Findings (Learning MFE)

Current rendering logic in NotificationTray is gated by verifiedMode:

verifiedMode === true -> renders NotificationTraySlot
verifiedMode === false -> renders fallback message:
"You have no new notifications at this time."

<div>{verifiedMode
  ? (
    <NotificationTraySlot
      courseId={courseId}
      notificationCurrentState={upgradeNotificationCurrentState}
      setNotificationCurrentState={setUpgradeNotificationCurrentState}
    />
  ) : (
    <p className="p-3 small">{intl.formatMessage(messages.noNotificationsMessage)}</p>
  )}
</div>

Important detail:

NotificationTraySlot is only a plugin-slot container. Actual notification UI/content must come from runtime plugin registration/wiring.

Runtime Configuration Observation

In Tutor runtime config (tutor/env/plugins/mfe/build/mfe/env.config.jsx), the Learning block is empty (same in both local and staging):

if (process.env.APP_ID == 'learning') {
}

This means there is no explicit custom widget registration for Learning notification tray slots via this config.

Observed Behavior

In verified-mode courses: tray opens, but no notification items are rendered (empty panel).
In non-verified courses: fallback message is shown as expected.

@choeying-10
choeying-10 requested review from 10kalden and yogeshbhagatcode and removed request for 10kalden June 8, 2026 09:46
@choeying-10
choeying-10 merged commit abbbbbd into wbc-ulmo1-stage Jun 9, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants