feat(web): add responsive layout with mobile sidebar overlay (MS15-FE-005)
All checks were successful
ci/woodpecker/push/web Pipeline was successful

Mobile (< 768px): sidebar hidden, hamburger button in header, sidebar
slides in as fixed overlay with backdrop.

Tablet (768-1023px): sidebar toggleable via hamburger, pushes content.

Desktop (>= 1024px): sidebar always visible, no hamburger button.

SidebarContext extended with mobileOpen state and isMobile detection
via matchMedia listener.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 14:54:06 -06:00
parent 04f99183f9
commit 28620b2d70
5 changed files with 228 additions and 61 deletions

View File

@@ -27,11 +27,16 @@ interface AppShellProps {
}
function AppShell({ children }: AppShellProps): React.JSX.Element {
const { collapsed } = useSidebar();
const { collapsed, isMobile } = useSidebar();
// On tablet (mdlg), hide sidebar from the grid when the sidebar is collapsed.
// On mobile, the sidebar is fixed-position so the grid is always single-column.
const sidebarHidden = !isMobile && collapsed;
return (
<div
className="app-shell"
data-sidebar-hidden={sidebarHidden ? "true" : undefined}
style={
{
"--sidebar-w": collapsed ? SIDEBAR_COLLAPSED_WIDTH : SIDEBAR_EXPANDED_WIDTH,