Skip to content

feat: add frontend-base sibling alongside legacy FPF plugin - #45

Open
arbrandes wants to merge 1 commit into
openedx:mainfrom
arbrandes:arbrandes/frontend-base-take-2
Open

feat: add frontend-base sibling alongside legacy FPF plugin#45
arbrandes wants to merge 1 commit into
openedx:mainfrom
arbrandes:arbrandes/frontend-base-take-2

Conversation

@arbrandes

@arbrandesarbrandes commented May 15, 2026

Copy link
Copy Markdown

Description

Adds frontend-app-sample/ alongside the existing frontend-plugin-sample/. The former does the same thing as the latter, but for the frontend-base version of Learner Dashboard.

tutor-contrib-sample registers both. The operator picks which one actually fires by enabling (or not) the frontend-base learner-dashboard app in tutor-mfe's FRONTEND_APPS filter.

Note that one of the README's links out to openedx/docs.openedx.org#1459, which hasn't merged yet.

How to test

Install tutor-contrib-sample from this repo and enable it as usual. Then enable the frontend-base version of Learner Dashboard by adding a tiny standalone Tutor plugin that flips the toggle:

# "$(tutor plugins printroot)"/fb-learner-dashboard.pyfromtutormfe.hooksimportFRONTEND_APPS@FRONTEND_APPS.add()def_enable_learner_dashboard(apps):
apps["learner-dashboard"]["enabled"] =Truereturnapps

Enable it:

tutor plugins enable fb-learner-dashboard

Now bind-mount frontend-app-sample/. This is required because it's not yet published to NPM:

tutor mounts add /path/to/sample-plugin/frontend-app-sample

Launch:

tutor dev launch

The frontend-base site should pick up the slot operation from @openedx/frontend-app-sample. The Archive/Unarchive buttons should now render via the new path on the frontend-base learner dashboard at http://apps.local.openedx.io:8080/learner-dashboard/ (note the 8080 port that tells it apart from the legacy version at port 1996).

Behind the scenes, tutor-mfe auto-detects the frontend-app- prefix and mounts it as a workspace package under packages/frontend-app-sample in the mfe-dev container, so edits hot-reload without rebuilds. You can check with:

tutor dev logs -f mfe-dev

LLM usage notice

Built with assistance from Claude.

@codecov

codecovBot commented May 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.04%. Comparing base (00aa944) to head (b9679b8).

Additional details and impacted files
@@ Coverage Diff @@## main #45 +/- ##
=======================================
Coverage 93.04% 93.04% =======================================
Files 16 16 Lines 503 503 Branches 18 18 =======================================
Hits 468 468 Misses 24 24 Partials 11 11 
FlagCoverage Δ
unittests93.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@arbrandesarbrandes linked an issue May 15, 2026 that may be closed by this pull request
@arbrandes
arbrandesforce-pushed the arbrandes/frontend-base-take-2 branch 2 times, most recently from 7287637 to 8dcfc7aCompareMay 17, 2026 15:10
Introduce frontend-app-sample/ next to the existing frontend-plugin-sample/.
The new directory is a frontend-base app, written in TypeScript, that
contributes a widgetReplace operation against the learner-dashboard's
CourseList slot on the bundled tutor-mfe site. The legacy directory stays
put, unchanged, and keeps targeting the per-MFE env.config.jsx flow.
Have tutor-contrib-sample register both. The operator picks which one
fires by enabling (or not) the frontend-base learner-dashboard app in
tutor-mfe.
Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for freeto 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.

Frontend-base version of sample-plugin

1 participant

@arbrandes