From 9a00d7c5ee30a0874923d57fdbbde1fbced3a499 Mon Sep 17 00:00:00 2001 From: Algis Dumbris Date: Mon, 16 Mar 2026 20:28:49 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20mobile-responsive=20Web=20UI=20?= =?UTF-8?q?=E2=80=94=20sidebar=20drawer,=20hamburger=20menu,=20touch=20tar?= =?UTF-8?q?gets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On viewports < 768px (md breakpoint): - Sidebar slides in as a drawer with dark overlay backdrop - Hamburger button in the header toggles the sidebar - Nav link clicks auto-close the drawer - Sidebar items get 44px min-height for touch-friendly tapping - Search input uses fluid width instead of fixed 320px Desktop (>= 768px) behavior is unchanged: sidebar always visible, main content offset by 260px, no hamburger button. Co-Authored-By: Claude Opus 4.6 (1M context) --- web/src/app.css | 2 +- web/src/lib/components/Header.svelte | 19 ++++++++++++++++--- web/src/lib/components/Sidebar.svelte | 25 ++++++++++++++++++++++++- web/src/routes/+layout.svelte | 7 ++++--- 4 files changed, 45 insertions(+), 8 deletions(-) diff --git a/web/src/app.css b/web/src/app.css index 12db510..1171923 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -128,7 +128,7 @@ background-color: var(--bg-tertiary); } .sidebar-item { - @apply flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors cursor-pointer; + @apply flex items-center gap-2 px-3 py-2 md:py-1.5 min-h-[44px] md:min-h-0 rounded text-sm transition-colors cursor-pointer; color: var(--text-secondary); } .sidebar-item:hover { diff --git a/web/src/lib/components/Header.svelte b/web/src/lib/components/Header.svelte index af51247..ec98a81 100644 --- a/web/src/lib/components/Header.svelte +++ b/web/src/lib/components/Header.svelte @@ -2,6 +2,8 @@ import { page } from '$app/stores'; import { goto } from '$app/navigation'; + let { onMenuToggle = () => {} }: { onMenuToggle?: () => void } = $props(); + let searchQuery = $state(''); function handleSearch(e: SubmitEvent) { @@ -27,13 +29,24 @@ }); -
-

{pageTitle()}

+
+ + + +

{pageTitle()}

-
+
diff --git a/web/src/lib/components/Sidebar.svelte b/web/src/lib/components/Sidebar.svelte index 90b2c59..b36ed58 100644 --- a/web/src/lib/components/Sidebar.svelte +++ b/web/src/lib/components/Sidebar.svelte @@ -5,6 +5,8 @@ import { notifications } from '$lib/stores/notifications'; import { channels as channelsApi, agents as agentsApi, deadLetters as deadLettersApi } from '$lib/api/client'; + let { open = false, onclose = () => {} }: { open?: boolean; onclose?: () => void } = $props(); + let channelList = $state([]); let agentList = $state([]); let deadLetterCount = $state(0); @@ -36,6 +38,10 @@ } } + function handleNavClick() { + onclose(); + } + function isActive(href: string): boolean { return $page.url.pathname === href || ($page.url.pathname.startsWith(href) && href !== '/'); } @@ -55,7 +61,17 @@ ]; -