Skip to content

feat(playground): auto-load the editor via a blueprint unzip step#62

Merged
eXeLearningProject merged 2 commits into
mainfrom
feat/playground-editor-unzip
Jun 8, 2026
Merged

feat(playground): auto-load the editor via a blueprint unzip step#62
eXeLearningProject merged 2 commits into
mainfrom
feat/playground-editor-unzip

Conversation

@erseco

@erseco erseco commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

What

Auto-load the embedded eXeLearning editor in the Playground via a single unzip blueprint step, so it boots with a working editor instead of requiring the manual Download & Install Editor button.

{
  "step": "unzip",
  "destination": "/www/moodle/mod/exeweb/dist",
  "data": { "url": "https://github-proxy.exelearning.dev/?repo=exelearning/exelearning&release=v4.0.0&asset=exelearning-static-v4.0.0.zip" }
}

Why

The static editor is byte-identical across all eXeLearning plugins and is already published once at exelearning/exelearning. Fetching that shared artifact through the github-proxy (CORS) over the fast JS transport is the WordPress-Playground-idiomatic pattern and avoids both a per-PR built artifact and the slow runtime PHP download. The release asset wraps everything in a static/ folder, so extracting into dist yields dist/static/..., which embedded_editor_source_resolver serves via its bundled precedence (moodledata -> bundled -> none). Pinned to v4.0.0 to match .editor-version for deterministic previews.

embedded_editor_installer is kept for production/offline installs; only the playground changes.

Part of a fleet-wide change unifying how the editor loads in every eXeLearning playground.

Test

Open the Playground for this branch and confirm the editor loads on boot (no manual step), the editor zip is fetched from github-proxy.exelearning.dev, and a page renders.


Moodle Playground Preview

The changes in this pull request can be previewed and tested using a Moodle Playground instance.

Preview in Moodle Playground

ℹ️ The eXeLearning editor is fetched from the shared release and unpacked into the plugin when the playground boots, so the first load may take a few extra seconds. ELPX upload, viewer and preview work normally.

erseco added 2 commits June 7, 2026 13:10
Add an 'unzip' blueprint step that fetches the shared eXeLearning editor release asset through the github-proxy and extracts it into the plugin's bundled dist/static, so the playground boots with a working editor instead of requiring the manual "Download & Install Editor" button.

The static editor is byte-identical across all eXeLearning plugins and is already published once at exelearning/exelearning, so it is pulled over the fast JS transport (Cache API). The release asset wraps everything in a 'static/' folder, so extracting into 'dist' yields 'dist/static/...', which embedded_editor_source_resolver serves via its 'bundled' precedence (moodledata -> bundled -> none). Pinned to v4.0.0 to match .editor-version for deterministic previews.

embedded_editor_installer is kept for production/offline installs; the PR-preview note is updated accordingly.
Match the WordPress/Omeka README style: render the 'Preview in Moodle Playground' button via an HTML <img width="224"> (smaller) and add the note that the editor is fetched from the shared release and unpacked on boot. The blueprint URL is unchanged.
@erseco erseco requested review from ignaciogros and pabloamayab June 7, 2026 15:35
@erseco erseco self-assigned this Jun 7, 2026
@erseco erseco added the documentation Improvements or additions to documentation label Jun 7, 2026
@eXeLearningProject eXeLearningProject merged commit feb4966 into main Jun 8, 2026
1 check passed
@eXeLearningProject eXeLearningProject deleted the feat/playground-editor-unzip branch June 8, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants