From f89eacb9906076b64d42264e021eae241ee551f7 Mon Sep 17 00:00:00 2001 From: Sergey Kozyrenko Date: Thu, 16 Jul 2026 21:40:32 +0700 Subject: [PATCH] refactor(settings): give Badge asChild, let the variables panel own its breakpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three follow-ups to the variables palette. The chips composed badgeVariants onto a raw {/* Both autofocus preventDefaults are load-bearing: insert/cycle act on the editor's stored selection, so opening must not steal the caret and closing must return it to the editor. */} { event.preventDefault(); onEditorFocus(); @@ -1107,23 +1103,27 @@ function VariablesContent({ counts, onVariableClick, variables }: VariablesConte : `Insert {{.${variable}}} at the cursor`; return ( - + + ); })} @@ -1132,19 +1132,12 @@ function VariablesContent({ counts, onVariableClick, variables }: VariablesConte } // Don't hoist this useWatch to the parent — it would re-subscribe the whole page per keystroke. -function VariablesPanelContainer({ - control, - isDesktop, - onEditorFocus, - onVariableClick, - variables, -}: VariablesPanelContainerProps) { +function VariablesPanelContainer({ control, onEditorFocus, onVariableClick, variables }: VariablesPanelContainerProps) { const currentTemplate = useWatch({ control, name: 'template' }); return (