diff --git a/frontend/src/components/NavSidebar.tsx b/frontend/src/components/NavSidebar.tsx index 7aa4d704..13f33840 100644 --- a/frontend/src/components/NavSidebar.tsx +++ b/frontend/src/components/NavSidebar.tsx @@ -27,7 +27,7 @@ import { PopoverSurface } from "./ui/AnchoredPopover"; import { useAnchoredPopover } from "./ui/anchoredPopoverHooks"; import { Pressable } from "./ui/Pressable"; import { SURFACE } from "./ui/surfaces"; -import { NavRail, NavRailDivider, NavRailItem, RAIL_ROW } from "./ui/NavRail"; +import { NavRail, NavRailDivider, NavRailItem, NavRailList, RAIL_ROW } from "./ui/NavRail"; import { usePrefs } from "./prefsContext"; // Primary app navigation: a thin icon-only left rail. The modules used to hide under the avatar @@ -189,15 +189,11 @@ export default function NavSidebar({ // against its right edge.
-
+ {userItems.map(renderItem)} {systemItems.length > 0 && } {systemItems.map(renderItem)} -
+
diff --git a/frontend/src/components/ui/NavRail.tsx b/frontend/src/components/ui/NavRail.tsx index 5dec7b63..ec2a4092 100644 --- a/frontend/src/components/ui/NavRail.tsx +++ b/frontend/src/components/ui/NavRail.tsx @@ -1,5 +1,5 @@ import clsx from "clsx"; -import type { ReactNode } from "react"; +import type { CSSProperties, ReactNode, Ref } from "react"; import type { LucideIcon } from "lucide-react"; import { Pressable } from "./Pressable"; import { SURFACE } from "./surfaces"; @@ -33,6 +33,30 @@ export function NavRail({ ); } +/** The rail's scrolling list of pages. An overflow container clips on BOTH axes, so the list spans the + * rail's padding (`-mx-1 px-1`): the active row's edge bar, which sits in that padding, stays inside + * the list's box and is not cut off. */ +export function NavRailList({ + ref, + style, + children, +}: { + ref?: Ref; + /** The scroll fade's mask. */ + style?: CSSProperties; + children: ReactNode; +}) { + return ( +
+ {children} +
+ ); +} + /** A short, thick centred rule: the "new section" cue on an icon rail (the system modules). */ export function NavRailDivider() { return
;