Resizable sidebar width #99
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#99
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The sidebar is fixed at 16rem (
--sidebar-width); long page titles truncate and wide screens waste space. Users want to drag it to their liking.Scope
A drag handle on the sidebar's right edge resizes it with the mouse (pointer events; also keyboard-adjustable for accessibility). Clamp to a sane range (e.g. 12–32rem). Persist the chosen width per browser via the existing
usePersistentStatemechanism (likeui.sidebar.collapsed). Resizing must play nicely with the existing collapse toggle (Ctrl/Cmd+, hamburger) and the editor's force-hide (useForceSidebarHidden): collapse animates from/to the chosen width, not the default.Acceptance criteria
Technical notes
--sidebar-widthtoken (apps/web/src/styles/tokens.css),.sidebarand.sidebar--collapsed(base.css — the collapse usesmargin-left: calc(-1 * var(--sidebar-width)), which follows a custom width automatically if the token is set as inline style on.app-body)..app-bodyflexbox inapps/web/src/layout/AppLayout.tsx; persistence helperusePersistentStateis already there.Dependencies
None.
Size: ~0.5 days
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Umgesetzt in
6c4f37e(CI grün; die späteren Statusmeldungen „failure" auf diesem Commit sind von Folge-Pushes überholte, abgebrochene Runs — der HEAD-Laufe740ea6mit allen M10-Änderungen ist komplett grün).Was drin ist
apps/web/src/layout/SidebarResizer.tsx: Drag-Handle an der rechten Sidebar-Kante (role=separator,aria-valuenow/min/max), Pointer-Drag mitsetPointerCapture, Tastatur: Pfeiltasten (±1rem) + Home/End, Doppelklick = Reset auf 16rem.usePersistentState('ui.sidebar.width'), wieui.sidebar.collapsed.AppLayoutsetzt--sidebar-widthals Inline-Style auf.app-body— dadurch animieren Collapse (Ctrl/Cmd+\, Hamburger) und der Editor-Force-Hide automatisch von/zur gewählten Breite (margin-left: calc(-1 * var(--sidebar-width))). Bei eingeklappter Sidebar wird der Handle nicht gerendert.layout.sidebar.resize(de+en).Verifiziert im Browser gegen einen frischen lokalen Stack: Drag live, Breite überlebt Reload, Clamp beidseitig (End→32rem, weiter rechts bleibt 32; Home→12rem), Doppelklick-Reset, Collapse/Expand bei 24rem Custom-Breite (margin-left exakt -384px), Tastaturbedienung über den fokussierten Handle.