From de59b5df829d93246123c884cd2209b611b3a42c Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Sat, 7 Mar 2026 22:17:58 +0100 Subject: [PATCH] fix: note grid drag-and-drop improvements - Use dragHandleZone with grip icon instead of whole-card dragging, so card interactions (checkboxes, pin, archive) still work - Scope pinned/unpinned grids to separate dnd types to prevent cross-zone drag bugs - Add h-full to flip wrapper and NoteCard for equal card heights Co-Authored-By: Claude Opus 4.6 --- src/lib/components/NoteCard.svelte | 5 +++-- src/lib/components/NoteGrid.svelte | 20 +++++++++++++++----- src/routes/(app)/+page.svelte | 3 ++- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/lib/components/NoteCard.svelte b/src/lib/components/NoteCard.svelte index f192315..94cb1fe 100644 --- a/src/lib/components/NoteCard.svelte +++ b/src/lib/components/NoteCard.svelte @@ -18,9 +18,10 @@ interface Props { note: Note; onEdit: (note: Note) => void; + fullHeight?: boolean; } - let { note, onEdit }: Props = $props(); + let { note, onEdit, fullHeight = false }: Props = $props(); $effect(() => { const colors = NOTE_COLORS[note.color]; @@ -68,7 +69,7 @@
onEdit(note)} onkeydown={(e) => e.key === 'Enter' && onEdit(note)} diff --git a/src/lib/components/NoteGrid.svelte b/src/lib/components/NoteGrid.svelte index 0f7e93a..0d5ef2f 100644 --- a/src/lib/components/NoteGrid.svelte +++ b/src/lib/components/NoteGrid.svelte @@ -1,6 +1,7 @@