fix: move bottomChromeHeight after isTagStripVisible declaration

$derived cannot reference variables declared later in the script.
Moved the calculation below the isTagStripVisible $state declaration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-03 12:39:14 +02:00
parent f0d5ba2128
commit d73591865c

View file

@ -66,8 +66,6 @@
let isCollapsed = $state(false);
let showShortcuts = $state(false);
let showOnboarding = $state(false);
// Bottom chrome height: calculated from state, not measured (avoids reflow loop)
const bottomChromeHeight = $derived((isCollapsed ? 0 : 80) + (isTagStripVisible ? 44 : 0) + 72); // PillNav ~80px + TagStrip ~44px + QuickInputBar ~72px
// ── Theme ───────────────────────────────────────────────
let isDark = $derived(theme.isDark);
@ -129,6 +127,9 @@
isTagStripVisible = !isTagStripVisible;
}
// Bottom chrome height: calculated from state, not measured (avoids reflow loop)
const bottomChromeHeight = $derived((isCollapsed ? 0 : 80) + (isTagStripVisible ? 44 : 0) + 72);
// ── DnD context ─────────────────────────────────────────
let tagDropHandler = $state<((tagId: string, payload: DragPayload) => void) | null>(null);
setContext('tagDropHandler', {