openedx / frontend-app-learner-dashboard

Learner Dashboard MFE
GNU Affero General Public License v3.0
6 stars 76 forks source link

[DEPR]: Optimizely support #387

Closed MaxFrank13 closed 1 month ago

MaxFrank13 commented 1 month ago

Proposal Date

2024-07-16

Target Ticket Acceptance Date

2024-07-26

Earliest Open edX Named Release Without This Functionality

Sumac - 2024-10

Rationale

Optimizely is a package used for running experiments. It is not a required dependency of the MFE and there is no out-of-the-box support for Optimizely in the Open edX frontend ecosystem. It is was originally added for a 2U-specific use case and does not appear to be used by any other consumers.

Removal

Components

Pull Request

386

Replacement

ProductRecommendations, WidgetFooter, ExperimentContext, optimizelyScript, and the Optimizely dependency will have no replacement.

The LoadedSidebar and NoCoursesSidebar components will be condensed into one WidgetSidebar component. This WidgetSidebar component will be set to render next to the CoursesPanel by default, whereas previously it appeared to be set underneath by default. However, it was actually being re-set to be next to the CoursesPanel by the WidgetFooter component (source). Additional context below.

Deprecation

No response

Migration

No response

Additional Info

@MaxFrank13

Context around WidgetSidebar/LoadedSidebar/NoCoursesSidebar

The position of the LoadedSidebar or NoCoursesSidebar is determined by the sidebarShowing state. If set to true, the sidebar will appear next to the CoursesPanel in the Dashboard. Otherwise, it will render underneath the CoursesPanel. Currently this value is only switched to true inside either the LoadedSidebar or NoCoursesSidebar components. The Sidebar component will check the ExperimentContext to see if isExperimentActive is set to true. The redundancy here arises when we realize that isExperimentActive will always be true, because of the hook call in WidgetFooter.

Since the deprecation requires removing the hook that "activates the experiment" and any references to the values in ExperimentContext, we can instead have the sidebar set to show next to the CoursesPanel by default (sidebarShowing set to true). This also supports future development for the sidebar.

Task List

MaxFrank13 commented 1 month ago

The PR has been approved and will be merged today. This seems safe given that there was no objection or discussion in the forum thread or this issue.