From 28bf2471c72027cf2885dd24e26eee9a458dabe2 Mon Sep 17 00:00:00 2001 From: James Hutchison <122519877+JamesHutchison@users.noreply.github.com> Date: Tue, 17 Mar 2026 20:45:58 +0000 Subject: [PATCH 1/8] add noscript option --- src/reactpy/executors/asgi/pyscript.py | 12 +++++++++- src/reactpy/executors/asgi/standalone.py | 17 +++++++++++++- src/reactpy/executors/utils.py | 5 ++++ tests/test_asgi/test_pyscript.py | 27 ++++++++++++++++++++++ tests/test_asgi/test_standalone.py | 29 ++++++++++++++++++++++++ tests/test_asgi/test_utils.py | 12 ++++++++++ 6 files changed, 100 insertions(+), 2 deletions(-) diff --git a/src/reactpy/executors/asgi/pyscript.py b/src/reactpy/executors/asgi/pyscript.py index 20a094cb7..28244ce7f 100644 --- a/src/reactpy/executors/asgi/pyscript.py +++ b/src/reactpy/executors/asgi/pyscript.py @@ -17,7 +17,7 @@ pyscript_component_html, pyscript_setup_html, ) -from reactpy.executors.utils import vdom_head_to_html +from reactpy.executors.utils import html_noscript_path_to_html, vdom_head_to_html from reactpy.types import ReactPyConfig, VdomDict @@ -32,6 +32,7 @@ def __init__( initial: str | VdomDict = "", http_headers: dict[str, str] | None = None, html_head: VdomDict | None = None, + html_noscript_path: str | Path | None = None, html_lang: str = "en", **settings: Unpack[ReactPyConfig], ) -> None: @@ -59,6 +60,8 @@ def __init__( commonly used to render a loading animation. http_headers: Additional headers to include in the HTTP response for the base HTML document. html_head: Additional head elements to include in the HTML response. + html_noscript_path: Path to an HTML file whose contents are rendered within a + `