fix(site,skill): 모바일 상단 바 수리 — 탭 전환 스크롤 리셋과 단일 sticky 헤더

사용자 보고 '상단 바가 페이지마다 왔다갔다하며 패딩이 없고 포지션도 이상하다'를 계측으로 원인 규명:
- 탭 전환 시 이전 뷰의 window.scrollY 잔류 — 짧은 뷰에선 클램프(600→49)되어 헤더가 반쯤 잘림. setCurrentView 에 scrollTo(0,0) 리셋(양앱)
- ≤900 헤더 이중 스택(브랜드 줄 43px+크럼 52px)·비sticky·safe-top 무 — .side 숨기고 .topbar 를 sticky+safe-top 단일 헤더로(두레 앱바 문법). 데스크톱 무변경
- 재발 방지: e2e M5 헤더·스크롤 스위트 10단언(스크롤 300px+에서 탭 전환 → scrollY=0·헤더 top=0), 시각 기준 갱신(390px 9화면 의도 변경), verify L0~L6 재통과
- 스킬 mobile-app-ux.md 에 '뷰 전환은 스크롤을 리셋·헤더는 하나' 규칙 반영. 가온 CSS v23
This commit is contained in:
Yun Chan 2026-08-23 14:50:06 +09:00
parent 1b636b7b83
commit d4cd9ca49d
40 changed files with 76 additions and 27 deletions

View file

@ -35,7 +35,7 @@
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Serif+KR:wght@500;600&display=swap"
/>
<link rel="stylesheet" href="./styles/main.css?v=22" />
<link rel="stylesheet" href="./styles/main.css?v=23" />
<link
rel="icon"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%23fafafa'/%3E%3Crect x='6.5' y='6.5' width='19' height='19' rx='4' fill='%23059669'/%3E%3Crect x='10' y='12' width='12' height='1.8' rx='0.9' fill='%23ffffff'/%3E%3Crect x='10' y='15.5' width='8' height='1.8' rx='0.9' fill='%23ffffff' opacity='0.85'/%3E%3Crect x='10' y='19' width='10' height='1.8' rx='0.9' fill='%23ffffff' opacity='0.7'/%3E%3C/svg%3E"
@ -838,6 +838,9 @@
views.forEach((v) => v.classList.toggle("is-on", v.id === "view-" + name));
document.getElementById("crumb-view").textContent = VIEW_LABEL[name] || name;
document.getElementById("view-" + name).focus({ preventScroll: true });
// 뷰 전환은 새 화면의 맨 위에서 시작한다 — 이전 화면의 스크롤이 남으면
// 짧은 뷰에서는 클램프되어 헤더가 반쯤 잘리고, 긴 뷰에서는 화면 중간에 떨어진다
window.scrollTo(0, 0);
};
const gotoView = (name, push = true) => {
if (push) history.pushState({ v: name }, "");