feat: use frontend-base compatibility layer#298
Merged
arbrandes merged 2 commits intoMay 6, 2026
Merged
Conversation
arbrandes
force-pushed
the
arbrandes/frontend-plugin-framework-compat
branch
from
May 2, 2026 23:13
dd536b9 to
e3f0e14
Compare
arbrandes
force-pushed
the
arbrandes/frontend-plugin-framework-compat
branch
from
May 3, 2026 13:02
e3f0e14 to
2e36316
Compare
arbrandes
force-pushed
the
arbrandes/frontend-plugin-framework-compat
branch
from
May 3, 2026 13:04
2e36316 to
d8bc3cb
Compare
arbrandes
force-pushed
the
arbrandes/frontend-plugin-framework-compat
branch
from
May 3, 2026 13:06
d8bc3cb to
afdc676
Compare
arbrandes
force-pushed
the
arbrandes/frontend-plugin-framework-compat
branch
2 times, most recently
from
May 3, 2026 16:12
e146dd1 to
200f3af
Compare
arbrandes
force-pushed
the
arbrandes/frontend-plugin-framework-compat
branch
5 times, most recently
from
May 3, 2026 23:36
0553620 to
c58e3e5
Compare
arbrandes
marked this pull request as ready for review
May 3, 2026 23:37
arbrandes
force-pushed
the
arbrandes/frontend-plugin-framework-compat
branch
2 times, most recently
from
May 4, 2026 13:07
8c218e3 to
02b2b6d
Compare
Lets a frontend-base site keep working with FPF-built plugins and `@edx/frontend-platform` consumers via @openedx/frontend-base-compat, as a migration aid during the FPF deprecation window. Co-Authored-By: Claude <noreply@anthropic.com>
arbrandes
force-pushed
the
arbrandes/frontend-plugin-framework-compat
branch
4 times, most recently
from
May 5, 2026 11:47
862ea76 to
9966e8c
Compare
arbrandes
commented
May 5, 2026
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| pip install git+https://github.com/overhangio/tutor.git@main |
Collaborator
Author
There was a problem hiding this comment.
We'll have to remember to remove this once it lands in Verawood. But without it, CI will fail.
Allows compat-shim contributions to be scoped to specific MFEs instead of consolidated into a single global bundle, matching how the legacy per-MFE env.config.jsx applied them. Requires tutor@main: depends on the unreleased ENV_SAVED action. Co-Authored-By: Claude <noreply@anthropic.com>
arbrandes
force-pushed
the
arbrandes/frontend-plugin-framework-compat
branch
from
May 5, 2026 12:10
9966e8c to
ec16070
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Lets a frontend-base site keep working with FPF-built plugins as a migration aid during the MFE deprecation window. The shim is opt-in: plugin authors register an
(mfe_name, slot_name, plugin_config)triple inFRONTEND_COMPAT_SLOTSto route a single slot through the compat layer, or list a Tutor plugin name inFRONTEND_COMPAT_PLUGINSto bulk-opt every contribution that plugin makes viaPLUGIN_SLOTS. Sites with no opted-in contributions are unaffected.Requires
tutor@main: depends on the unreleasedENV_SAVEDaction.Implementation Details
Renders one
env.config.<mfe_name>.jsxper MFE alongside the legacy per-MFEenv.config.jsx, each carrying just the contributions opted in for that MFE.site.config.{build,dev}.tsxregisters each one as its own shimAppviacreateLegacyPluginApp, passing the MFE's name asmfeIdso the shim can route-scope its contributions. The wildcard"all"is itself a validmfe_name: it rendersenv.config.all.jsxand mounts it without anmfeId, so its contributions fire globally across every route, mirroring the legacyiter_plugin_slots("all")semantics.site/package.jsonadds the compat dep and an npmoverridesblock redirecting both@openedx/frontend-plugin-frameworkand@edx/frontend-platformto the same compat package, so transitive imports resolve to the shim's stubs and neither real package is installed.Two new filters drive opt-in.
FRONTEND_COMPAT_SLOTSis the per-slot opt-in registry, mirroring the(mfe_name, slot_name, plugin_config)shape ofPLUGIN_SLOTS.FRONTEND_COMPAT_PLUGINSis a coarser bulk opt-in by Tutor plugin name, folding everyPLUGIN_SLOTScontribution from that plugin's hook context through the shim.Three more filters layer
(legacy_id, mapping)deltas onto the shim's curateddefaultSlotMap,defaultWidgetMap, anddefaultRouteMapfor ids the shim doesn't yet cover:FRONTEND_SLOT_COMPAT_MAPS,FRONTEND_WIDGET_COMPAT_MAPS, andFRONTEND_ROUTE_COMPAT_MAPS. These deltas are site-wide (not per-MFE), sosite.config.{build,dev}.tsxmaterializes the merged maps once and passes them by reference into everycreateLegacyPluginAppcall. Identical contributions dedup silently; divergent ones warn and last-wins.All compat wiring is gated on
get_frontend_compat_mfes()being non-empty, and taggedTODO(fpf-removal)for cleanup on the FPF deprecation timeline. Full design captured in openedx/frontend-base-compat ADR 0001.Testing
The easiest way to test this is with tutor-indigo, via this second PR:
overhangio/tutor-indigo#219
After
tutor config saveandtutor images build mfe, you should see the indigoified header in the new Instructor Dashboard app:LLM usage notice
Built with assistance from Claude.