fix(ui-react): fix sidebar height and content overflow in layouts#6233
fix(ui-react): fix sidebar height and content overflow in layouts#6233gustavosbarreto merged 1 commit intomasterfrom
Conversation
|
Claude finished @luannmoreira's task in 4m 19s —— View job Code Review CompleteReviewed 6 files. 2 issues found (1 high, 1 medium). 1 posted inline, 1 noted below.
|
04ce239 to
9baaa51
Compare
|
/review |
|
Claude finished @gustavosbarreto's task in 5m 9s —— View job Code Review CompleteReviewed 6 files. 1 inline issue posted (1 medium). Previously reported issues (still open)The previous review flagged two issues that are still unaddressed in the current code:
If you've addressed the feedback and want a new review, tag |
|
Addressed in b62e2d8: changed |
|
/review |
|
Claude finished @gustavosbarreto's task in 4m 55s —— View job Code Review CompleteReviewed 6 files. 2 issues found (1 high, 1 medium). 0 posted inline (both are on unchanged lines or already reported). Previously reported issues — still unresolvedThe author indicated these were addressed in commit
What looks good
If you've addressed the feedback and want a new review, tag |
- Fix min-h-screen → h-full on <aside> in SidebarShell so the sidebar fills its flex parent (h-screen → flex-1 min-h-0) correctly instead of forcing 100vh regardless of containment - Remove dead code from useSidebarLayout: hover-expand state/handlers (expanded, pinned, hoverTimer, handleExpand, handleCollapse, handleToggle) and corresponding hover/focus/toggle handlers are no longer used since desktop sidebar is always open; simplify isOpen = isDesktop - Remove pinned prop from Sidebar, AdminSidebar, and SidebarShell; simplify toggle button to a static close action Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix min-h-screen → h-full on <aside> in SidebarShell so the sidebar fills its flex parent (h-screen → flex-1 min-h-0) correctly instead of forcing 100vh regardless of containment - Remove dead code from useSidebarLayout: hover-expand state/handlers (expanded, pinned, hoverTimer, handleExpand, handleCollapse, handleToggle) and corresponding hover/focus/toggle handlers are no longer used since desktop sidebar is always open; simplify isOpen = isDesktop - Remove pinned prop from Sidebar, AdminSidebar, and SidebarShell; simplify toggle button to a static close action
b62e2d8 to
2f2fcc1
Compare
|
/review |
|
Claude finished @gustavosbarreto's task in 3m 58s —— View job Code Review CompleteReviewed 6 files. 1 inline issue posted (1 medium). Previously reported issuesAll three issues from prior reviews have been resolved:
What looks good
If you've addressed the feedback and want a new review, tag |
2f2fcc1 to
e7ef049
Compare
- Use h-screen on AppLayout outer container so the flex chain has a defined height, making the sidebar fill 100% of the viewport - Add overflow-y-auto to <main> so page content scrolls within the main area instead of being clipped by the flex chain - Expand sidebar unconditionally on desktop (isDesktop || expanded || pinned) and remove hover-expand wrappers — sidebar is always wide - Make onToggle optional across SidebarShell, Sidebar, and AdminSidebar; conditionally render the pin button when provided - Replace min-h-screen on <aside> with h-full to correctly fill the parent flex container
e7ef049 to
c221cf7
Compare
|
/review |
|
Claude finished @gustavosbarreto's task in 15s —— View job Code Review CompleteReviewed 7 files across code quality, security, testing, TypeScript patterns, and architecture — no issues found. What looks good
If you push additional changes and want a new review, tag |
What
Fixed two interconnected layout bugs in the console UI: the sidebar
only filling roughly half the viewport height, and page content being
silently clipped at 100vh with no scrollbar.
Why
Both bugs stem from the same root cause in
AppLayout. The outercontainer used
min-h-screen(height: autowith a minimum), and CSSflexbox only distributes positive free space — which doesn't exist
when a container's height is
auto. As a result, the innerflex-1row sized itself to its content, not the viewport. The sidebar's
h-fullthen filled the content height rather than 100vh, leaving itshort on pages with few items.
The fix (
h-screenon the outer container) locks the layout to theviewport. Without
overflow-y-autoon<main>, that would clip pagecontent, so both changes are applied together — the same pattern
AdminLayoutalready used.Changes
AppLayout:min-h-screen→h-screenon the outer containerso the flex chain has a defined height;
overflow-y-autoadded to<main>so content scrolls within the main area instead of beingclipped. Redundant
h-screenremoved from the terminal conditional(already covered by the outer class).
SidebarShell:min-h-screen→h-fullon<aside>— correctnow that the parent flex container has a defined height. Footer border
and label visibility gated on
onTogglepresence to match theconditionally rendered pin button.
useSidebarLayout:isOpen = isDesktop || expanded || pinned—sidebar is always expanded on desktop. This removes the hover-expand
behavior intentionally; the wrapper divs carrying
onMouseEnter/onMouseLeavewere removed from both layouts as partof this simplification.
onTogglemade optional acrossSidebarShell,Sidebar, andAdminSidebar: the pin button renders only whenonToggleisprovided, keeping the component usable without a toggle handler.