fix: improve drawers zindex positioning

This commit is contained in:
Ruben Fiszel
2025-09-09 13:20:39 +00:00
parent cccd2c1b12
commit fbe4758eb4
3 changed files with 8 additions and 5 deletions
@@ -65,7 +65,7 @@
loadFolders()
</script>
<Drawer bind:this={newFolder}>
<Drawer bind:this={newFolder} name="newFolder">
<DrawerContent
title="New Folder"
on:close={() => {
@@ -43,8 +43,8 @@
if (openedDrawers.val.includes(id)) {
return
}
offset = openedDrawers.val.length - 1
openedDrawers.val.push(id)
offset = initialOffset + openedDrawers.val.length
}
}
@@ -92,6 +92,7 @@
if (open) {
openedDrawers.val.push(id)
offset = initialOffset + openedDrawers.val.length
}
let wasEverOpen = false
@@ -17,6 +17,7 @@
disableChatOffset?: boolean
class?: string | undefined
positionClass?: string | undefined
name?: string
children?: import('svelte').Snippet<[any]>
}
@@ -32,6 +33,7 @@
disableChatOffset = false,
class: clazz = '',
positionClass = undefined,
name = undefined,
children: children_render
}: Props = $props()
@@ -85,6 +87,7 @@
$effect(() => {
open
console.log('open', open)
untrack(() => {
open ? openDrawer() : closeDrawer()
})
@@ -112,9 +115,8 @@
>
{#snippet children({ handleClickAway, zIndex, isTop })}
<aside
class="drawer windmill-app windmill-drawer {clazz ?? ''} {positionClass ?? ''} {aiChatOpen
? 'respect-global-chat'
: ''}"
class="drawer windmill-app windmill-drawer {name ? `windmill-drawer-${name}` : ''} {clazz ??
''} {positionClass ?? ''} {aiChatOpen ? 'respect-global-chat' : ''}"
class:open
class:close={!open && timeout}
class:global-chat-open={aiChatOpen}