This PR makes the demo applications in Framework/docs/demo/ actually runnable. Until now, all demo pages would stall on Loading… because the framework’s renderer.js imports Mithril from an absolute path. Unless Mithril is provided at that path, the browser request 404s, window.m never exists, and the demos cannot render. The problem appears both when serving files locally with a static server as well as the hosted GitHub Pages demo (see the Advanced frontend demo).
What this PR does
Adds a proper demo server project under Framework/docs/demo/project/
Includes its own Readme with setup and usage instructions.
Documents the Mithril issue in a new demo Readme.
Explains that Mithril must be served explicitly because of the absolute import.
Provides two ways to run demos:
Full server approach (recommended) – use the new demo server project.
Manual workaround (quick & dirty) – copy or paste Mithril into /mithril/mithril.min.js and serve docs statically.
Updates the main Framework/README.md:
Links to the new demo README as the reliable way to run demos locally.
Why this is needed
Previously, none of the demos worked locally or on GitHub Pages due to the missing /mithril/mithril.min.js.
Onboarding developers had no guidance on how to run demos successfully.
This PR makes demos reproducible, documents the options, and sets up a recommended backend-based solution.
Next steps / open questions
Should the hosted GitHub Pages demo be updated to include a /mithril folder or switched to a CDN import?
Long-term: consider patching renderer.js to allow overriding the Mithril URL via window.WEBUI_MITHRIL_URL.
Acknowledgement: This PR fixes running demos locally. However, it does not address the GitHub Pages–hosted demo, which will still 404 /mithril/mithril.min.js. Fixing the hosted demo (e.g. by publishing Mithril at the site root or switching the import to a CDN) is out of scope for this PR.
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
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.
I DON'T have JIRA ticket
Summary
This PR makes the demo applications in Framework/docs/demo/ actually runnable. Until now, all demo pages would stall on Loading… because the framework’s renderer.js imports Mithril from an absolute path. Unless Mithril is provided at that path, the browser request 404s, window.m never exists, and the demos cannot render. The problem appears both when serving files locally with a static server as well as the hosted GitHub Pages demo (see the Advanced frontend demo).
What this PR does
Why this is needed
Next steps / open questions