fix(shared-ui): open AppDrawer above PillNav instead of below

The panel was positioned below the trigger button using top, causing
it to render off-screen since PillNav sits at the bottom. Changed to
bottom positioning so the drawer opens upward.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-02 12:31:56 +02:00
parent 919cb4bf35
commit 88864fd3a1

View file

@ -28,7 +28,7 @@
let triggerButton: HTMLButtonElement;
let searchInput = $state<HTMLInputElement | undefined>(undefined);
let panelPosition = $state({ top: 0, left: 0 });
let panelPosition = $state({ bottom: 0, left: 0 });
let searchQuery = $state('');
// Filter apps by search
@ -50,7 +50,7 @@
function toggle() {
if (triggerButton) {
const rect = triggerButton.getBoundingClientRect();
panelPosition = { top: rect.bottom + 8, left: rect.left };
panelPosition = { bottom: window.innerHeight - rect.top + 8, left: rect.left };
}
onToggle(!isOpen);
}
@ -143,7 +143,7 @@
<!-- Panel -->
<div
class="drawer-panel"
style="top: {panelPosition.top}px; left: {panelPosition.left}px;"
style="bottom: {panelPosition.bottom}px; left: {panelPosition.left}px;"
role="dialog"
aria-label="App switcher"
>
@ -408,7 +408,7 @@
@keyframes panelIn {
from {
opacity: 0;
transform: translateY(-8px);
transform: translateY(8px);
}
to {
opacity: 1;