fix(DashboardSidebar): add overflow-hidden to footer slot#6232
fix(DashboardSidebar): add overflow-hidden to footer slot#6232
Conversation
📝 WalkthroughWalkthroughThe change adds the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/theme/dashboard-sidebar.ts (1)
6-6:overflow-hiddenmay clip legitimate footer overlays.Line 6 fixes resize containment, but it also clips vertical overflow for any non-teleported menu/popover/tooltips rendered from footer slot content. Prefer constraining only the horizontal axis unless full clipping is intentional.
Proposed tweak
- footer: 'shrink-0 flex items-center gap-1.5 overflow-hidden px-4 py-2', + footer: 'shrink-0 flex items-center gap-1.5 overflow-x-hidden px-4 py-2',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/theme/dashboard-sidebar.ts` at line 6, The footer container currently uses the class string assigned to footer ('footer: \'shrink-0 flex items-center gap-1.5 overflow-hidden px-4 py-2\'') which applies overflow-hidden and will clip vertical overlays; update that class to only constrain horizontal overflow (e.g., replace overflow-hidden with overflow-x-hidden) or remove the overflow utility entirely so teleported popovers/menus from the footer slot are not vertically clipped while preserving the intended horizontal resize containment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/theme/dashboard-sidebar.ts`:
- Line 6: The footer container currently uses the class string assigned to
footer ('footer: \'shrink-0 flex items-center gap-1.5 overflow-hidden px-4
py-2\'') which applies overflow-hidden and will clip vertical overlays; update
that class to only constrain horizontal overflow (e.g., replace overflow-hidden
with overflow-x-hidden) or remove the overflow utility entirely so teleported
popovers/menus from the footer slot are not vertically clipped while preserving
the intended horizontal resize containment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: be85ad52-2ba7-427a-9cc9-84cc9b88173b
📒 Files selected for processing (1)
src/theme/dashboard-sidebar.ts
commit: |
The footer slot lacked an overflow constraint, so child components like UNavigationMenu could exceed the sidebar width. The body slot already uses overflow-y-auto which establishes a BFC — add overflow-hidden to footer for the same containment. Fixes nuxt#6231
d59a883 to
f52a2b5
Compare
Fixes #6231
The footer slot in
DashboardSidebarwas missing overflow handling. When you put aUNavigationMenuin the footer, it doesn't resize correctly when the sidebar is collapsed — the content bleeds out. The body slot already hasoverflow-y-autowhich creates an overflow context, but footer had nothing.Added
overflow-hiddento the footer slot theme class.