Background
While working on filter popover positioning (#912 / fran/278-filter-position), we noticed the SidebarDrawer (src/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.tsx) is a styled MUI Popover made to look like a left-anchored drawer:
- Anchored at
(0,0) via anchorReference="anchorPosition", marginThreshold={0}
- Sized to 312px × 100vh through
MuiPaper-root overrides
- Uses the filter folder's
DrawerTransition (Slide) to fake the slide-in
- Carries hacks:
box-shadow: 0 1px 4px 0 transparent (with the comment "possible bug — box shadow 'none' affects rendering of main content") and overflow: visible so the close IconButton can render outside the paper
Meanwhile, the filter drawer surface (src/components/Filter/components/surfaces/drawer/Drawer/drawer.tsx) uses MUI <Drawer> directly. So we have two different "drawer" implementations sitting next to each other.
What to review
Loose scope — not committing to a specific refactor up front. Worth taking a step back and looking at the sidebar mechanism as a whole:
SidebarDrawer: should this be MUI <Drawer> instead of a styled Popover? Pros: built-in modal/backdrop/focus/Escape behavior, drops the box-shadow & overflow: visible workarounds, alignment with the filter drawer surface. Trade-off: the close IconButton currently positions outside the paper, so layout would shift.
- Permanent vs. temporary sidebar split (
Sidebar.tsx): is the breakpoint-based swap between PermanentSidebar and SidebarDrawer still the right shape? Could be unified.
DrawerTransition reuse: SidebarDrawer imports the filter's DrawerTransition. If SidebarDrawer becomes a real Drawer, the filter's transition stays put and the cross-folder dependency goes away.
- Two drawer surfaces in the codebase: confirm whether
SidebarDrawer and the filter Drawer should share an abstraction or stay distinct.
Out of scope
Notes
Spec is intentionally exploratory. Investigation comes first; implementation decisions follow from what the review surfaces.
Background
While working on filter popover positioning (#912 / fran/278-filter-position), we noticed the
SidebarDrawer(src/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.tsx) is a styled MUIPopovermade to look like a left-anchored drawer:(0,0)viaanchorReference="anchorPosition",marginThreshold={0}MuiPaper-rootoverridesDrawerTransition(Slide) to fake the slide-inbox-shadow: 0 1px 4px 0 transparent(with the comment "possible bug — box shadow 'none' affects rendering of main content") andoverflow: visibleso the closeIconButtoncan render outside the paperMeanwhile, the filter drawer surface (
src/components/Filter/components/surfaces/drawer/Drawer/drawer.tsx) uses MUI<Drawer>directly. So we have two different "drawer" implementations sitting next to each other.What to review
Loose scope — not committing to a specific refactor up front. Worth taking a step back and looking at the sidebar mechanism as a whole:
SidebarDrawer: should this be MUI<Drawer>instead of a styledPopover? Pros: built-in modal/backdrop/focus/Escape behavior, drops the box-shadow &overflow: visibleworkarounds, alignment with the filter drawer surface. Trade-off: the closeIconButtoncurrently positions outside the paper, so layout would shift.Sidebar.tsx): is the breakpoint-based swap betweenPermanentSidebarandSidebarDrawerstill the right shape? Could be unified.DrawerTransitionreuse:SidebarDrawerimports the filter'sDrawerTransition. IfSidebarDrawerbecomes a real Drawer, the filter's transition stays put and the cross-folder dependency goes away.SidebarDrawerand the filterDrawershould share an abstraction or stay distinct.Out of scope
Notes
Spec is intentionally exploratory. Investigation comes first; implementation decisions follow from what the review surfaces.