Skip to content

fix: sidebar drawer stuck open after desktop→mobile resize#29

Merged
jlc488 merged 1 commit into
mainfrom
fix/sidebar-drawer-resize
Jun 3, 2026
Merged

fix: sidebar drawer stuck open after desktop→mobile resize#29
jlc488 merged 1 commit into
mainfrom
fix/sidebar-drawer-resize

Conversation

@jlc488

@jlc488 jlc488 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

EN

Two responsive bugs on the app shell, reported from resizing the window:

  1. Hamburger could appear on desktop. lg:hidden was on the PrimeVue <Button>, whose component display style can override the utility — so the menu button leaked onto wide screens. Wrapped it in a <div class="lg:hidden"> so it's reliably hidden at lg+.
  2. Drawer stayed open after a resize round-trip. sidebarOpen was only reset on navigation, so: open it → grow to desktop → shrink back, and the sidebar was stuck visible on mobile. Now a (min-width: 1024px) media query (@vueuse/core) resets the flag whenever the viewport reaches desktop, so it can't carry a stale "open" back down to mobile.

Verification: npm run build (vue-tsc + Vite) — green.

KO (한국어)

창 크기 조절에서 나온 앱 셸 반응형 버그 2가지:

  1. 데스크톱에서 햄버거가 보일 수 있었음. lg:hidden이 PrimeVue <Button>에 직접 걸려 있었는데, 컴포넌트 display 스타일이 유틸리티를 이겨 넓은 화면에도 새어 나왔습니다. <div class="lg:hidden">로 감싸 lg+에서 확실히 숨김.
  2. 리사이즈 왕복 후 드로어가 열린 채 남음. sidebarOpen이 네비게이션에서만 리셋돼서: 열고 → 데스크톱으로 키우고 → 다시 줄이면 모바일에서 사이드바가 그대로 남았습니다. 이제 (min-width: 1024px) 미디어 쿼리(@vueuse/core)로 viewport가 데스크톱에 도달하면 플래그를 리셋해, stale "open"이 모바일로 따라 내려오지 못합니다.

검증: npm run build(vue-tsc + Vite) — green.

Two responsive bugs on the app shell:

1. The mobile hamburger could show on desktop. `lg:hidden` was on the
   PrimeVue <Button>, whose component display style can win over the
   utility — so it leaked onto wide screens. Wrap it in a
   <div class="lg:hidden"> so the button is reliably hidden at lg+.

2. The drawer stayed open after a resize round-trip. `sidebarOpen` was
   only reset on navigation, so opening it, growing to desktop, then
   shrinking back left the sidebar stuck visible on mobile. Watch a
   (min-width: 1024px) media query and reset the flag whenever the
   viewport reaches desktop.

Verification: npm run build (vue-tsc + Vite) green.
@jlc488 jlc488 merged commit 039030f into main Jun 3, 2026
3 checks passed
@jlc488 jlc488 deleted the fix/sidebar-drawer-resize branch June 3, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant