From 35a6d957cf0e8730588de910d08c380619fee22a Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 24 Oct 2025 17:38:04 +0530 Subject: [PATCH] add: fix and add for hovered column. --- .../(suggestions)/empty.svelte | 133 +++++++++++++----- .../(suggestions)/options.svelte | 2 +- 2 files changed, 99 insertions(+), 36 deletions(-) diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte index eb2029d89..e1fdf693b 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte @@ -959,6 +959,27 @@ columnBeingDeleted = null; } + function fadeSlide(_: Node, { y = 8, duration = 200 } = {}) { + return { + duration, + css: (time: number) => ` + opacity: ${time}; + transform: translateY(${(1 - time) * y}px); + ` + }; + } + + function columnHoverMouseTracker(event: MouseEvent) { + if (hoveredColumnId && event.target instanceof Element) { + const hoveredButton = event.target.closest('[data-column-hover]'); + const currentColumnId = hoveredButton?.getAttribute('data-column-hover'); + + if (currentColumnId !== hoveredColumnId) { + hoveredColumnId = null; + } + } + } + $effect(() => { if (!spreadsheetContainer) return; @@ -1051,47 +1072,17 @@ }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0} class:thinking={$tableColumnSuggestions.thinking} class="databases-spreadsheet spreadsheet-container-outer" style:--overlay-icon-color="#fd366e99" - style:--non-overlay-icon-color="--fgcolor-neutral-weak"> + style:--non-overlay-icon-color="--fgcolor-neutral-weak" + onmousemove={columnHoverMouseTracker}>
+ + {@render customTooltip({ text: 'Click to select column', show: isHovered })} {/if}
@@ -1310,6 +1303,7 @@
+{#snippet customTooltip({ text, show })} +
+ + {text} + +
+{/snippet} + {#snippet changeColumnTypePopover({ id, columnObj, iconColor, icon, isColumnInteractable, index })}
{/snippet} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +