Auto-run, pre-rendering, and PanelLive server component#26
Merged
MarcSkovMadsen merged 8 commits intomainfrom Feb 21, 2026
Merged
Auto-run, pre-rendering, and PanelLive server component#26MarcSkovMadsen merged 8 commits intomainfrom
MarcSkovMadsen merged 8 commits intomainfrom
Conversation
…e Accordion layout - Add `input` param to PanelLive server component — setting `widget.input = data` pushes to client's `server.input` (replaces `widget.send()` as primary API) - Add `output` param to client-side `_ServerData` class — setting `server.output` in Pyodide sends data back to server's `output` param - Rename client namespace injection from `server_data` to `server` - Rename `_ServerData.value` to `_ServerData.input` for consistency - Rewrite showcase: centered Accordion layout (width=800), 10 sections including reactive push (s8), periodic push (s9), and client→server (s10) - Update tutorials and how-to docs to use `widget.input =` and `server.output` - Add tests for input param, input→send wiring, and showcase API usage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…into enhancement/pre-rendering
…extensions/panel-live into enhancement/pre-rendering
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.
PR: Auto-run, pre-rendering, and PanelLive server component
Summary
This PR adds three major features: click-to-run with pre-rendering, a
PanelLiveJSComponent for Panel server apps, and bundled in-package assets for pip installs.What changed
Auto-run and pre-rendering
auto-run="false"is now the default in MkDocs fences -- examples require a click to activate PyodidePanelLive.runAll()API for sequential execution of all<panel-live>elements on a pagepanel-live pre-renderCLI command for build-time renderingpreviewattribute for static image placeholders (PNG/GIF) with "Run" badge overlay.panel-live/to avoid redundant re-rendersPanelLive server component
PanelLiveJSComponent wrapping<panel-live>for use inpanel serveappseditor,app,playground,headless,progress,debugevaluate()-- execute Python in the browser and return the result to the serverrun()-- trigger the full render pipeline programmatically from the serverinputparam -- server-to-client reactive data push (no re-run needed)outputparam -- client-to-server data viaserver.outputsend()-- push arbitrary JSON data to client-side codeCLI and packaging
panel-live servecommand serves the showcase app with auto-discovered assetsdist/(repo dev) ->static/(pip install) -> CDN fallbacksrc/panel_live/static/--pip install panel-liveworks out of the boxpixi run serve-showcasetask chains build-js + serve for always-fresh dev workflowpixi run sync-statictask copies built assets into the package for wheel buildsShowcase app
tests/ui/test_showcase.py)Web component improvements
registerElement()/unregisterElement()for document-order tracking<panel-live-config>element for declarative configurationCI fix
permissions: contents: writetopre_commitjob for PNG optimization auto-commitFiles changed
97 files, +11609 / -2386 lines across:
src/panel_live/-- Python package (component, CLI, ESM, pre-render, fences, sphinx)lib/-- JS source modules (registry, config-element, theme, worker-bridge, panel-live-element)tests/-- 178 Python tests, 178 JS tests, Playwright smoke testdocs/-- updated how-to guides, tutorials, examples, open/closed issuesdocs-sphinx/,docs-quarto/-- extension test sites updatedquarto/_extensions/-- Lua filter and bundled assets updated.github/workflows/ci.yml-- permissions fixTesting
pixi run test-- 178 passed, 4 skippedpixi run test-js-- 178 passed (12 test files)pixi run lint-- all checks passed