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
Copy link
Copy Markdown

@arbrandes arbrandes commented May 15, 2026

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.py
from tutormfe.hooks import FRONTEND_APPS

@FRONTEND_APPS.add()
def _enable_learner_dashboard(apps):
    apps["learner-dashboard"]["enabled"] = True
    return apps

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
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

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

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           
Flag Coverage Δ
unittests 93.04% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@arbrandes arbrandes linked an issue May 15, 2026 that may be closed by this pull request
@arbrandes arbrandes requested review from feanil and kdmccormick May 15, 2026 11:41
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>
@arbrandes arbrandes force-pushed the arbrandes/frontend-base-take-2 branch from 4467d7e to 7287637 Compare May 15, 2026 11:47
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.

Frontend-base version of sample-plugin

1 participant