From dbdaece23de9ac63f2e7ca9e6bfcdc4fc156a3fa Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Sun, 28 Jun 2026 21:30:03 +0200 Subject: [PATCH] Revert "ui: fix accessibility for hover-gated interactive elements assisted by claude(in debugging and tests) (#24727)" (#25098) --- .../ChatAttachmentsListItemMcpPrompt.svelte | 2 +- .../ChatMessageUserPending.svelte | 2 +- .../SidebarNavigationConversationItem.svelte | 137 +++++++++++------- 3 files changed, 83 insertions(+), 58 deletions(-) diff --git a/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemMcpPrompt.svelte b/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemMcpPrompt.svelte index c55dfdec7b..636e93f221 100644 --- a/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemMcpPrompt.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemMcpPrompt.svelte @@ -33,7 +33,7 @@ {#if !readonly && onRemove}
onRemove?.()} />
diff --git a/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserPending.svelte b/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserPending.svelte index 5c2913202c..4be582b39a 100644 --- a/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserPending.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserPending.svelte @@ -56,7 +56,7 @@
diff --git a/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte b/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte index 2c1b9adf21..b1c2b78f65 100644 --- a/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte +++ b/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte @@ -39,6 +39,7 @@ depth = 0 }: Props = $props(); + let renderActionsDropdown = $state(false); let dropdownOpen = $state(false); let isLoading = $derived(getAllLoadingChats().includes(conversation.id)); @@ -70,10 +71,26 @@ } } + function handleMouseLeave() { + if (!dropdownOpen) { + renderActionsDropdown = false; + } + } + + function handleMouseOver() { + renderActionsDropdown = true; + } + function handleSelect() { onSelect?.(conversation.id); } + $effect(() => { + if (!dropdownOpen) { + renderActionsDropdown = false; + } + }); + onMount(() => { document.addEventListener('edit-active-conversation', handleGlobalEditEvent as EventListener); @@ -86,19 +103,23 @@ }); -
{ + if (!e.currentTarget.contains(e.relatedTarget as Node | null)) { + handleMouseLeave(); + } + }} > -
{#if depth > 0} @@ -109,7 +130,7 @@ @@ -125,15 +146,18 @@ {#if isLoading} - +
@@ -145,50 +169,52 @@
-
- { - e.stopPropagation(); - handleTogglePin(); - } - }, - { - icon: Pencil, - label: 'Edit', - onclick: handleEdit, - shortcut: ['shift', 'cmd', 'e'] - }, - { - icon: Download, - label: 'Export', - onclick: (e: Event) => { - e.stopPropagation(); - conversationsStore.downloadConversation(conversation.id); + {#if renderActionsDropdown} +
+ { + e.stopPropagation(); + handleTogglePin(); + } }, - shortcut: ['shift', 'cmd', 's'] - }, - { - icon: Trash2, - label: 'Delete', - onclick: handleDelete, - variant: 'destructive', - shortcut: ['shift', 'cmd', 'd'], - separator: true - } - ]} - /> -
-
+ { + icon: Pencil, + label: 'Edit', + onclick: handleEdit, + shortcut: ['shift', 'cmd', 'e'] + }, + { + icon: Download, + label: 'Export', + onclick: (e: Event) => { + e.stopPropagation(); + conversationsStore.downloadConversation(conversation.id); + }, + shortcut: ['shift', 'cmd', 's'] + }, + { + icon: Trash2, + label: 'Delete', + onclick: handleDelete, + variant: 'destructive', + shortcut: ['shift', 'cmd', 'd'], + separator: true + } + ]} + /> +
+ {/if} +