From b9b52e74c63da4e1c0cfbe4944c7a13d159fa5c8 Mon Sep 17 00:00:00 2001 From: knowsky404 Date: Mon, 13 Apr 2026 19:24:33 +0800 Subject: [PATCH] fix(sidebar): prevent version dropdown clipping --- .../components/layout/__tests__/AppSidebar.spec.ts | 11 +++++++++++ frontend/src/style.css | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/layout/__tests__/AppSidebar.spec.ts b/frontend/src/components/layout/__tests__/AppSidebar.spec.ts index 08c3294a..c0da4e38 100644 --- a/frontend/src/components/layout/__tests__/AppSidebar.spec.ts +++ b/frontend/src/components/layout/__tests__/AppSidebar.spec.ts @@ -6,6 +6,8 @@ import { describe, expect, it } from 'vitest' const componentPath = resolve(dirname(fileURLToPath(import.meta.url)), '../AppSidebar.vue') const componentSource = readFileSync(componentPath, 'utf8') +const stylePath = resolve(dirname(fileURLToPath(import.meta.url)), '../../../style.css') +const styleSource = readFileSync(stylePath, 'utf8') describe('AppSidebar custom SVG styles', () => { it('does not override uploaded SVG fill or stroke colors', () => { @@ -16,3 +18,12 @@ describe('AppSidebar custom SVG styles', () => { expect(componentSource).not.toContain('fill: none;') }) }) + +describe('AppSidebar header styles', () => { + it('does not clip the version badge dropdown', () => { + const sidebarHeaderBlockMatch = styleSource.match(/\.sidebar-header\s*\{[\s\S]*?\n \}/) + + expect(sidebarHeaderBlockMatch).not.toBeNull() + expect(sidebarHeaderBlockMatch?.[0]).not.toContain('@apply overflow-hidden;') + }) +}) diff --git a/frontend/src/style.css b/frontend/src/style.css index 59c6d182..acff4abc 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -529,7 +529,6 @@ .sidebar-header { @apply h-16 px-6; @apply flex items-center gap-3; - @apply overflow-hidden; @apply border-b border-gray-100 dark:border-dark-800; transition: padding 0.2s ease,