From 59ee03dbc1104c557190dd597a40582ab31f7efb Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Mon, 25 May 2026 10:50:46 +0200 Subject: [PATCH] feat(raw_apps): default split view, blue preview tab, fix dnd ghosting --- .../common/tabs/DraggableTabs.svelte | 70 ++- .../components/raw_apps/RawAppEditor.svelte | 533 +++++++++--------- 2 files changed, 310 insertions(+), 293 deletions(-) diff --git a/frontend/src/lib/components/common/tabs/DraggableTabs.svelte b/frontend/src/lib/components/common/tabs/DraggableTabs.svelte index 3eef67998f..29de6bd6e0 100644 --- a/frontend/src/lib/components/common/tabs/DraggableTabs.svelte +++ b/frontend/src/lib/components/common/tabs/DraggableTabs.svelte @@ -5,11 +5,23 @@ label: string /** Optional lucide-svelte (or compatible) component rendered at 12px before the label. */ icon?: any + /** Optional class applied to the icon (e.g. `text-accent` to tint it). */ + iconClass?: string + /** Optional class applied to the label text (e.g. `text-accent` to tint it). */ + labelClass?: string /** Defaults to true. Set false to hide the × close button. */ closable?: boolean /** Pinned tabs are rendered outside the drag zone — 'left' or 'right' of the draggable group. */ pinned?: 'left' | 'right' } + + // Per-instance counter so every DraggableTabs gets its own dnd zone `type`. + // svelte-dnd-action treats zones sharing a `type` as one connected pool: + // two bars rendering the same tab ids (e.g. the mirrored single-view bars) + // would let a drag in one bar mark the matching item as a hidden shadow + // placeholder in the other and never clear it. Unique types keep them + // independent. We never drag tabs between two bars, so this loses nothing. + let dndZoneSeq = 0