From 1d6afa7f54cf1ac5edfdbe7c5a4088fcd511af3c Mon Sep 17 00:00:00 2001 From: ya7010 Date: Thu, 13 Aug 2026 08:55:02 +0900 Subject: [PATCH] fix(docs): hide playground until ready --- docs/src/routes/playground/index.tsx | 23 ++++++++++++++++++++++- docs/src/styles/playground.css | 27 +++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/docs/src/routes/playground/index.tsx b/docs/src/routes/playground/index.tsx index 506904891..82af16758 100644 --- a/docs/src/routes/playground/index.tsx +++ b/docs/src/routes/playground/index.tsx @@ -151,6 +151,7 @@ export default function Playground() { const [monaco, setMonaco] = createSignal(); const [codeEditor, setCodeEditor] = createSignal(); + const [isMounted, setIsMounted] = createSignal(false); const [editorLoading, setEditorLoading] = createSignal(true); const [editorError, setEditorError] = createSignal(); const [formatShortcut, setFormatShortcut] = createSignal("Ctrl S"); @@ -199,6 +200,10 @@ export default function Playground() { return flattened; }); + const isPlaygroundReady = createMemo( + () => isMounted() && !editorLoading() && runState() !== "loading", + ); + const setFailure = (message: string) => { setRunState("error"); setStatusMessage(message); @@ -679,6 +684,8 @@ export default function Playground() { ); }); + onMount(() => setIsMounted(true)); + onMount(() => { let disposed = false; let editor: MonacoEditor.IStandaloneCodeEditor | undefined; @@ -927,10 +934,13 @@ export default function Playground() { og_url={`${DEFAULT_URL}playground`} /> -
+
+ + + + + {(menu) => (