From 965fc25085a21bcc256376142d924e2957014452 Mon Sep 17 00:00:00 2001 From: Timothy Lau Date: Thu, 23 Oct 2025 22:25:57 +0800 Subject: [PATCH] Refactor ConfigEditor to use component for visibility management and update dependencies to latest versions --- .../components/Editor/ConfigEditor.tsx | 19 +++---- compiler/apps/playground/package.json | 14 ++--- compiler/apps/playground/styles/globals.css | 9 +++ compiler/apps/playground/yarn.lock | 57 ++++++++++--------- 4 files changed, 54 insertions(+), 45 deletions(-) diff --git a/compiler/apps/playground/components/Editor/ConfigEditor.tsx b/compiler/apps/playground/components/Editor/ConfigEditor.tsx index 18f904d225f0e..cf80b48dbf0da 100644 --- a/compiler/apps/playground/components/Editor/ConfigEditor.tsx +++ b/compiler/apps/playground/components/Editor/ConfigEditor.tsx @@ -14,6 +14,7 @@ import React, { unstable_ViewTransition as ViewTransition, unstable_addTransitionType as addTransitionType, startTransition, + Activity, } from 'react'; import {Resizable} from 're-resizable'; import {useStore, useStoreDispatch} from '../StoreContext'; @@ -34,12 +35,8 @@ export default function ConfigEditor({ const [isExpanded, setIsExpanded] = useState(false); return ( - // TODO: Use when it is compatible with Monaco: https://github.com/suren-atoyan/monaco-react/issues/753 <> -
+ { startTransition(() => { @@ -49,11 +46,8 @@ export default function ConfigEditor({ }} formattedAppliedConfig={formattedAppliedConfig} /> -
-
+ + { startTransition(() => { @@ -62,7 +56,7 @@ export default function ConfigEditor({ }); }} /> -
+
); } @@ -122,7 +116,8 @@ function ExpandedEditor({ return ( + enter={{[CONFIG_PANEL_TRANSITION]: 'slide-in', default: 'none'}} + exit={{[CONFIG_PANEL_TRANSITION]: 'slide-out', default: 'none'}}>