Skip to content

fix(DashboardSidebar): add overflow-hidden to footer slot#6232

Open
howwohmm wants to merge 1 commit intonuxt:v4from
howwohmm:fix/dashboard-sidebar-footer-overflow
Open

fix(DashboardSidebar): add overflow-hidden to footer slot#6232
howwohmm wants to merge 1 commit intonuxt:v4from
howwohmm:fix/dashboard-sidebar-footer-overflow

Conversation

@howwohmm
Copy link
Contributor

@howwohmm howwohmm commented Mar 23, 2026

Fixes #6231

The footer slot in DashboardSidebar was missing overflow handling. When you put a UNavigationMenu in the footer, it doesn't resize correctly when the sidebar is collapsed — the content bleeds out. The body slot already has overflow-y-auto which creates an overflow context, but footer had nothing.

Added overflow-hidden to the footer slot theme class.

@howwohmm howwohmm requested a review from benjamincanac as a code owner March 23, 2026 11:30
@github-actions github-actions bot added the v4 #4488 label Mar 23, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 23, 2026

📝 Walkthrough

Walkthrough

The change adds the overflow-hidden utility class to the footer slot's class list in src/theme/dashboard-sidebar.ts. No other classes or exported/public declarations were modified; the footer retains its existing layout and spacing classes while now explicitly clipping overflowing content.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding overflow-hidden to the footer slot of DashboardSidebar to fix overflow behavior.
Linked Issues check ✅ Passed The PR directly addresses issue #6231 by adding overflow-hidden to the footer slot, which constrains footer content to the sidebar width and ensures proper resizing of components like UNavigationMenu.
Out of Scope Changes check ✅ Passed The change is minimal and focused: only one CSS class added to the footer slot to fix the specific overflow issue reported in #6231.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description clearly explains the issue, root cause, and the solution applied to fix overflow handling in the DashboardSidebar footer slot.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/theme/dashboard-sidebar.ts (1)

6-6: overflow-hidden may 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5ae1096 and b14e280.

📒 Files selected for processing (1)
  • src/theme/dashboard-sidebar.ts

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 24, 2026

npm i https://pkg.pr.new/@nuxt/ui@6232

commit: f52a2b5

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
@howwohmm
Copy link
Contributor Author

the editor typecheck failure is pre-existing on v4 — same failure shows on #6239, #6238, and others. not related to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar footer issue

1 participant