[DEPR]: Legacy Authoring MFE

Open
#3,377 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
react, typescript
Domain
frontend, release

Research direction

Read the task list and the linked #3038 frontend-base conversion and #2540 React Query work to understand the planned transition. The conversion has not started, and its dropped features and new slot IDs are still undecided; the issue describes a multi-stage deprecation and later removal of the legacy-mfe branch. This is planning work rather than a self-contained first contribution.

Written by the indexing model from the issue text.

Description

depr
RFC Start Date

N/A -- Already Accepted

Target Plan Accepted Date

N/A -- Already Accepted

Target Transition Unblocked Date

When the conversion lands in master, a week after it's announced as ready on this ticket.

Earliest Breaking Changes Unblocked Date

After Willow is released. The breaking change is the removal of the legacy-mfe branch, in Xylon.

Rationale

Authoring is going to be converted to a frontend-base app, as tracked in #3038, and what's left of its Redux code is moving to React Query, as tracked in #2540. The conversion will likely take on some of the cleanup in #2687 as well. This ticket is part of openedx/public-engineering#580, which explains the schedule, why this is a Fast Track DEPR, and everything the conversions have in common.

Description

TLDR: the legacy Authoring MFE is deprecated in Willow and will be removed in Xylon. Until then it will live on in a legacy-mfe branch, and whatever works there keeps working there.

The frontend-base conversion hasn't started. What follows is only what's firm today. The full list of what the conversion drops will be posted here when the conversion PR is announced as ready, a week before it lands.

As elsewhere, "deprecated" means removed from master, not from legacy-mfe. That branch will be cut from the last pre-conversion master, and whatever works there keeps working there until it's removed in Xylon.

For what's common to all converted apps (.env files, env.config.jsx, the header and footer, shared configuration), see openedx/public-engineering#580.

Redux

The Redux stores go, replaced by React Query. This is already under way in master (#2540), with nine reducers left in the main store. The editors have a store of their own, which goes too (#2088).

What that means in practice: anything rendered inside the app, slot widgets included, sits under the Redux provider and can call useSelector or useDispatch against it today. That stops working. So do useModel and useModels from the model store, which several of the bundled course app plugins use (proctoring, for one). If you wrote a course app plugin by copying one of those, it very likely uses them as well.

One thing to keep in mind: since this work lands in master as it goes, whatever is already gone when legacy-mfe is cut won't be in legacy-mfe either.

Plugin slots

Every slot gets a new ID, and the new IDs haven't been chosen yet. These are the legacy ones defined in this repository. They all start with org.openedx.frontend.authoring..

Old ID New ID
additional_course_content_plugin.v1 To be announced
additional_course_plugin.v1 To be announced
video_transcript_additional_translations_component.v1 To be announced
course_outline_sidebar.v1 To be announced
course_outline_header_actions.v1 To be announced
course_outline_page_alerts.v1 To be announced
course_outline_subsection_card_extra_actions.v1 To be announced
course_outline_unit_card_extra_actions.v1 To be announced
course_unit_sidebar.v1 To be announced
course_unit_sidebar.v2 To be announced
course_unit_header_actions.v1 To be announced
files_upload_page_table.v1 To be announced
videos_upload_page_table.v1 To be announced
edit_file_alerts.v1 To be announced
edit_video_alerts.v1 To be announced
image_additional_settings.v1 To be announced
image_settings_modal.v1 To be announced
page_banner.v1 To be announced

The short aliases that ten of these have (page_banner_slot, additional_course_plugin and so on) won't be carried over. This table will be filled in when the conversion PR is announced as ready.

Accessibility page

The /accessibility page stays. Its feedback form is dropped: it posts to Studio's Zendesk proxy, at /zendesk_proxy/v0, and Zendesk is one of the third-party services the converted apps no longer support.

Routes loaded by legacy Studio

Four routes exist to be loaded in iframes by legacy Studio pages: /component-picker, /component-picker/multiple, /legacy/preview-changes/:usageKey and /tagging/components/widget/:contentId.

All four are kept, and will keep rendering without a header and footer. This one isn't a deprecation: it's here so nobody has to wonder.

Third-party services

Hotjar goes, like every other built-in third-party service: the initializeHotjar call, the @edx/frontend-enterprise-hotjar dependency, and the build-time HOTJAR_APP_ID, HOTJAR_VERSION and HOTJAR_DEBUG variables. No replacement is planned.

Not decided yet

Two things are deliberately left for when the conversion starts. They're named here so nobody is surprised later.

The first is course app plugins. Pages and Resources loads each course app's settings with a dynamic import of @openedx-plugins/course-app-*, and those plugins import from the app itself through the CourseAuthoring/* alias. Both lean on this repository's own webpack build, and neither maps onto frontend-base, where the app is an npm package that a site composes. What's at stake is how a course app that isn't bundled here gets loaded at all, and what it's allowed to import from Authoring. If you maintain one, expect to have to change it. How is not known yet.

The second is the Studio header. frontend-base doesn't have one, and won't necessarily get one. Today, Authoring's header carries the course or library title, the Content, Settings and Tools menus, and the search button. What's at stake is where all of that lives once the shell owns the header.

Other deprecations in this repository

A few deprecations and removals are already tracked on their own, and are separate from this ticket: the additional_course_content_plugin slot (#2330), legacy libraries (#2044), leftover flags from the legacy UI (#3086), feature waffle flags (#3090, #3105, #3114), the standalone editor route (#2142) and the Help URLs API (#2768).

How do I transition?

On Tutor, there should be nothing to do: Willow will enable the new app by default, and you'll be able to switch back to the legacy MFE via the FRONTEND_APPS filter if you need to.

If you have plugins in the Authoring slots, there's nothing to port them to yet. The new IDs will be announced here, and frontend-base-compat will have a slot map for this app, so it'll be able to carry existing plugins for a while.

If you build the MFE from master, watch this ticket: when the conversion PR is announced as ready, you'll have a week to point your build at legacy-mfe.

Task List

In progress: the move to React Query (#2540).

To do: the frontend-base conversion (#3038). When its PR is ready, announce it here with the full list of what it drops and the new slot IDs, then wait a week before landing it. Cut legacy-mfe from the last pre-conversion master just before.

To do in Xylon: retire legacy-mfe.

Dominant language
TypeScript
Stars
18
Forks
228
Avg merge
2d 5h
Merged PRs (30d)
24

Getting set up

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.

More from openedx/frontend-app-authoring

All issues in openedx/frontend-app-authoring

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.