Files
HMDesign/docs/sw/sw-viewer-layer-bulb-switch-2026-10-22.md
T
shkim4 14a29933da test(sw): approve the 8cb98b3 viewer layer popup API and baseline
Test-only approval commit after the user-approved 8cb98b3 change on main
(sw-test-regression-baseline section 9); no protected path changes.
- public-api.approved.json re-snapshotted from the clean 8cb98b3 build:
  + SWLayerVisibilityIcon, SWLayerVisibilityIconProps (170 -> 172 exports).
- approvedMainCommit bcec066 -> 8cb98b3. No Story ID or tag change.
- docs/sw/sw-viewer-layer-bulb-switch-2026-10-22.md: change and verification.
2026-10-22 14:21:58 +09:00

45 lines
3.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SW Viewer 레이어 Popup — 전구 아이콘·전체 레이어 Switch (2026-10-22)
SW Viewer 레이어 Popup의 개별 표시 아이콘을 SW Header 레이어 메뉴의 전구로 바꾸고, `전체 켜기`·`전체 끄기` 버튼 두 개를 상단 Switch 하나로 바꾼 사용자 승인 변경과 승인 기준 갱신 기록입니다. SW Header의 전구 디자인·동작과 다른 Popup·공통 컴포넌트는 그대로입니다.
## 1. Commit
| 항목 | 값 |
|---|---|
| 구현 Commit | `8cb98b3` feat(sw): viewer layer popup bulb icon and all-layers switch (main 직접 Commit, 사용자 승인) |
| 승인 기준 Commit | 이 보고서와 같은 테스트 전용 Commit (`approvedMainCommit` `bcec066` → `8cb98b3`, `public-api.approved.json` 재생성) |
## 2. 변경 내용
| 항목 | 변경 전 | 변경 후 |
|---|---|---|
| 레이어별 표시·숨김 | 눈(`Eye`/`EyeOff`) 16px | `SWLayerVisibilityIcon`(Header 전구 그림 20 × 20, 표시 = 색 / 숨김 = 회색). 버튼 24 × 24·Hover·숨긴 행 0.45 유지 |
| 전체 레이어 | `SWViewerButton tone="green"` 2개 | 상단 `SWViewerField label="전체 레이어"` + `SWViewerSwitch`. 전체 표시일 때만 ON, 일부 표시는 OFF → 누르면 전체 표시 |
| 공개 API | — | `SWLayerVisibilityIcon`(value), `SWLayerVisibilityIconProps`(type) 추가(사용자 승인). 기존 `SWHeaderLayerIconArt`를 감싸며 Header 코드 삭제 없음 |
| AI 지침 | 10-21 눈 아이콘 필수·Switch 금지 | `VIEWER.md` §4.1·카탈로그·`DESIGN_RULES.md`·`COMPOSITION_PATTERNS.md`·`AI_GUIDE.md`(4개 패키지 sync)·예제 H를 새 기준으로 갱신. 옵션 패널 등 다른 화면 규칙은 유지 |
## 3. 승인 기준 갱신 (`sw-test-regression-baseline-2026-10-20.md` §9)
- `public-api.approved.json`: `8cb98b3` clean build(`build-info.json` `dirty: false`)에서 `--snapshot`으로 생성. 차이는 신규 Export 2개, 새로 도달하는 `SWHeaderLayerIcons.d.ts`, 바뀐 `sw-viewer/index.d.ts` 해시뿐입니다(170 → 172 Export).
- `approvedMainCommit`: `bcec066` → `8cb98b3`. Story ID·태그 변경이 없어 다른 승인 목록은 바꾸지 않았습니다.
## 4. 검증 결과 (Node 22.23.2, 증거는 저장소 밖 임시 폴더)
| 검사 | 결과 |
|---|---|
| `npm run build:sw`(`8cb98b3`, `dirty: false`) | 성공 |
| `npm run build-storybook` · `npm run typecheck` | 성공 · 성공 |
| Public API Guard | 7/7 PASS (172 Export) |
| home-menu-integration | 23/23 PASS |
| overview / overview overlays | 53/53, 20/20 PASS |
| storybook-unused-removal (Source Guard) | 94/94 PASS |
| `check:ai-docs` · `ai-docs.check.mjs` | PASS · 46/46 PASS |
| 예제 H strict `tsc`(빌드된 dist 기준) | PASS |
| `viewer.browser.mjs` 레이어 Popup 검사 7개 | 7/7 PASS |
미실행: `ai-template-consumer`(Tarball 설치에 네트워크 필요), Firefox, `viewer-regression`(기준선 Storybook 별도 빌드 필요).
## 5. 별도 이슈로 남긴 기존 실패
`viewer.browser.mjs`의 `hover face #266651`, `860: icons only + More`, `520: icons only + More …` FAIL과 `추가 도구` 버튼 Timeout은 변경 전 Story(HEAD `1dd8fb3`)와 변경 전 테스트로도 똑같이 재현되어 이번 변경과 무관합니다. 이번 Commit에서 고치지 않았습니다. 레이어 Popup 신규 검사 7개(전구 아이콘, 전체 Switch ON/OFF, 부분 표시 → 전체 표시, 개별 전환 동기화)는 모두 PASS입니다.