feat: HTML and WASM export of Reveal slides - #10703
Draft
peter-gy wants to merge 6 commits into
Draft
Conversation
Resolve configured layouts once and serialize them through static and WebAssembly mount configs so file, HTTP, and Pyodide exports share the same fallback behavior.
Keep serialized layouts pending until cells exist, then validate and materialize them through the existing renderer plugins. Initialize mounted URL state before the first render.
Hide notebook chrome for exported decks, enable static speaker view, and synchronize deep links and code controls across static and WebAssembly startup.
Flush document transactions before layout serialization, recover ambiguous sync failures through an authoritative full save, and prevent older auto-export jobs from committing after newer state.
|
Deployment failed for project marimo-docs with the following error: View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
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.
Summary
A notebook configured as slides currently exports as a normal vertical notebook because its saved layout is not part of the exported mount data.
This PR carries the configured layout through static HTML and WebAssembly export, then restores it through the existing layout plugins before cells render. Static HTML opens as a Reveal deck with captured outputs. WebAssembly
--mode runopens the same deck and keeps Python-backed controls reactive in the browser.Both formats preserve slide types, fragments, speaker notes, deck settings, deep links, and code visibility. Ordinary notebooks retain their normal exported shell.
Implementation
Speaker view
Both formats embed speaker notes in the exported HTML, so anyone with the file can read them. Static HTML enables Reveal speaker view with
S.WebAssembly keeps speaker view disabled. Reveal creates the presenter previews by loading the deck twice in iframes, which would start two more Pyodide workers and rerun the notebook independently. Those previews could diverge from the main deck and repeat side effects. Clean support would need passive preview frames supplied by the main runtime, so this change keeps one Pyodide owner per deck. We can consider this as a follow up, but for now the effort-reward ratio seemed poor.
Closes #10682