From b0ed4fa3b81152f6a1b465320759f7c18f0daad7 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Mon, 7 Sep 2026 21:45:49 +0200 Subject: [PATCH] ui : Improvements Adds a measured-px height transition to the tool category groups in the Tools submenu, replacing the bits-ui Collapsible whose conditional rendering kills the transition. The same technique as the reasoning panel: the rows stay mounted, the height animates between 0 and the measured scrollHeight, and visibility keeps collapsed rows out of the tab order. Assisted-by: pi:GLM-5.3-Flash --- .../ChatFormActionAddToolsSubmenu.svelte | 64 ++++++++++++++++--- tools/ui/src/routes/(chat)/+layout.svelte | 2 +- 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte index f495441714..21bd77a502 100644 --- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte @@ -1,15 +1,53 @@ @@ -81,13 +119,13 @@ {@const favicon = toolsPanel.getFavicon(group)} {@const groupDisabled = toolsPanel.isGroupDisabled(group)} - toolsPanel.toggleGroupExpanded(group.key)} - open={isExpanded} - > +
- toolsPanel.toggleGroupExpanded(group.key)} + type="button" > {#if isExpanded} @@ -113,7 +151,7 @@ {toolsPanel.getEnabledToolCount(group)}/{group.tools.length} - + @@ -137,7 +175,13 @@
- +
{#each group.tools as entry (entry.key)} {@const enabled = toolsPanel.isToolEnabled(entry)} @@ -165,6 +209,6 @@ {/each}
- - +
+
{/snippet} diff --git a/tools/ui/src/routes/(chat)/+layout.svelte b/tools/ui/src/routes/(chat)/+layout.svelte index 5be56dd560..6c61be1a07 100644 --- a/tools/ui/src/routes/(chat)/+layout.svelte +++ b/tools/ui/src/routes/(chat)/+layout.svelte @@ -23,7 +23,7 @@ }); -
+
{#if showTabs} {/if}