Skip to content

Commit f52a2b5

Browse files
committed
fix(DashboardSidebar): add overflow-hidden to footer slot
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 #6231
1 parent 5ae1096 commit f52a2b5

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/theme/dashboard-sidebar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default {
33
root: 'relative hidden lg:flex flex-col min-h-svh min-w-16 w-(--width) shrink-0',
44
header: 'h-(--ui-header-height) shrink-0 flex items-center gap-1.5 px-4',
55
body: 'flex flex-col gap-4 flex-1 overflow-y-auto px-4 py-2',
6-
footer: 'shrink-0 flex items-center gap-1.5 px-4 py-2',
6+
footer: 'shrink-0 flex items-center gap-1.5 overflow-hidden px-4 py-2',
77
toggle: '',
88
handle: '',
99
content: 'lg:hidden',

test/components/__snapshots__/DashboardSidebar-vue.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ exports[`DashboardSidebar > renders with footer slot correctly 1`] = `
110110
<div id="dashboard-sidebar-v-0" data-collapsed="false" data-dragging="false" data-slot="root" class="relative hidden lg:flex flex-col min-h-svh min-w-16 w-(--width) shrink-0 border-e border-default" style="--width: 15%;">
111111
<!--v-if-->
112112
<div data-slot="body" class="flex flex-col gap-4 flex-1 overflow-y-auto px-4 py-2"></div>
113-
<div data-slot="footer" class="shrink-0 flex items-center gap-1.5 px-4 py-2">Footer slot</div>
113+
<div data-slot="footer" class="shrink-0 flex items-center gap-1.5 overflow-hidden px-4 py-2">Footer slot</div>
114114
</div>
115115
<!--v-if-->
116116
<!--v-if-->

test/components/__snapshots__/DashboardSidebar.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ exports[`DashboardSidebar > renders with footer slot correctly 1`] = `
110110
<div id="dashboard-sidebar-v-0-0-0" data-collapsed="false" data-dragging="false" data-slot="root" class="relative hidden lg:flex flex-col min-h-svh min-w-16 w-(--width) shrink-0 border-e border-default" style="--width: 15%;">
111111
<!--v-if-->
112112
<div data-slot="body" class="flex flex-col gap-4 flex-1 overflow-y-auto px-4 py-2"></div>
113-
<div data-slot="footer" class="shrink-0 flex items-center gap-1.5 px-4 py-2">Footer slot</div>
113+
<div data-slot="footer" class="shrink-0 flex items-center gap-1.5 overflow-hidden px-4 py-2">Footer slot</div>
114114
</div>
115115
<!--v-if-->
116116
<!--v-if-->

0 commit comments

Comments
 (0)