Repository navigation
[DONE] Lab 머리줄 규칙 22개가 여럿이 쓰는 CSS 에서 dock 틀 CSS 로 간다 - #240
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UuHW3UoaQf9BPw9Q5XRGrN
PatternLab.module.css is for what two files draw with; 22 header rules and the dark button each had one reader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UuHW3UoaQf9BPw9Q5XRGrN
patternflow-bot
marked this pull request as ready for review
October 25, 2026 03:56
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
Patternflow-lab#183 Patternflow-lab#184 Patternflow-lab#186 Patternflow-lab#187 Patternflow-lab#189 Patternflow-lab#191 Patternflow-lab#192 Patternflow-lab#193 Patternflow-lab#194 Patternflow-lab#196 Patternflow-lab#197 Patternflow-lab#198 Patternflow-lab#199 Patternflow-lab#200 Patternflow-lab#202 Patternflow-lab#203 Patternflow-lab#204 Patternflow-lab#205 Patternflow-lab#206 Patternflow-lab#208 Patternflow-lab#209 Patternflow-lab#210 Patternflow-lab#214 Patternflow-lab#217 Patternflow-lab#218 Patternflow-lab#221 Patternflow-lab#222 Patternflow-lab#223 Patternflow-lab#227 Patternflow-lab#237 Patternflow-lab#238 Patternflow-lab#239 Patternflow-lab#240
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lsh / https://claude.ai/code/session_01UuHW3UoaQf9BPw9Q5XRGrN
Lab 머리줄만 쓰던 규칙 22개를 여럿이 쓰는
PatternLab.module.css에서 머리줄 틀이 있는LabPanels.module.css로, To hardware 창만 쓰던 검은 단추를 그 창의 CSS 로 옮겼어요. 화면은 그대로이고, 머지하면 공용 CSS 에 한 파일만 읽는 클래스가 다시 들어올 때 시험이 빨개져요.좋아지는 것: 없음
체크리스트
3위는 바퀴 9193([DONE] Pattern Lab 코드에서 아무도 읽지 않는 이름 둘이 빠지고, 다른 파일이 읽지 않는 export 62개가 파일 안으로 들어간다 #237~[DONE] Layers 패널의 규칙 24개가 dock 틀 CSS 에서 Layers 패널의 CSS 로 간다 #239)이 했고, 남은 줄 12개 가운데 맨 위가 4위PatternLab.module.css의 클래스마다 읽는 파일 다시 세기LabPanels.module.css로,darkButton을HardwareModal.module.css로.labNav a:focus-visible떼어 같이 옮기기labCss.test.ts에 「한 파일만 읽는 클래스가 없다」 시험, dev CSS 에서 빨개지는지getComputedStyle비교b6e32f8그대로라 merge 할 것이 없었고,3bbe838에서 Drift checks · Web CI 초록한 일
web/src/app/pattern-lab/PatternLab.module.css에서PatternLabClient.tsx만 읽는 규칙 22개를LabPanels.module.css의 머리줄 규칙(.dockHeader들) 바로 뒤로 옮겼어요.labBrand,labTitle,projectIdentity,projectMeta,labName,labNav,saveStatus,saveDot,storageNotice,forkBadge와 그 hover, focus,data-state규칙이에요. 값과 순서는 그대로예요..headerToggle:focus-visible, .headerSelect:focus-visible, .labNav a:focus-visible는 한 규칙이었어요.labNav가 다른 파일의 해시 이름이 되면 Community 링크가 키보드 포커스 테두리를 잃으니,.labNav a:focus-visible를 떼어 같은 값으로 옮겼어요.HardwareModal.tsx만 읽는.darkButton은 이미 있는HardwareModal.module.css끝으로 갔어요.!important셋이 그대로라 순서는 상관없어요.PatternLabClient.tsx는 열한 곳을styles.*에서dock.*로,HardwareModal.tsx는 두 곳을local.darkButton으로 읽어요.labCss.test.ts에 「PatternLab.module.css holds no class that only one file reads」 를 더했어요. 「Lab CSS modules」 시험이 쓰던 소스 목록과 읽는 이름 셈을readers()로 꺼내 둘이 같이 써요. 앞 시험의 판정은 그대로예요.증거
클래스마다
PatternLab.module.css를 불러오는 파일 가운데 그 이름을 읽는 파일을 셌어요(git grep 'styles\.<이름>'):새 시험이 dev 의 CSS 를 잡는지: CSS 와 tsx 다섯을 dev 판으로 되돌리고 돌리면 빨개져요.
앞 시험을
readers()로 바꾼 뒤에도 죽은 클래스를 잡는지:LabPanels.module.css끝에.zzDead {}를 넣으면 빨개져요.화면이 그대로인지:
NEXT_PUBLIC_BUILD_ENABLED=1과NEXT_PUBLIC_COMMUNITY_URL을 주어 dev 와 이 브랜치를 빌드해next start로 열고(Share 와 To hardware 단추가 그려져요), Chromium 으로/pattern-lab을 390×844(터치,hover: none)와 1440×900 에서 28가지 상태로 다뤘어요. 요소마다getComputedStyle의 모든 속성과::before,::after,::placeholder를 정렬해 모아 DOM 경로로 맞춰 봤어요. 상태는 처음 연 화면, 포크와 고쳐 쓰기 표시 둘을 심은 프로젝트, 이름 칸 hover · 포커스 · 빈 칸, 로고와 Community 링크 hover, 키보드로 Community 링크와 Panels 단추에 포커스(:focus-visible확인), Recent 와 To hardware hover, Recent 메뉴,localStorage.setItem을 막아 「Unsaved」 와 저장 실패 알림을 띄운 화면, 거기서 Park 가 실패한 알림, Retry save hover, To hardware 창의 두 단계(검은 Next 단추, 검은 Apply 단추 hover)예요.옮긴 규칙이 그 비교에 실제로 잡혔는지, 그 규칙의 값을 모두 가진 요소를 셌어요:
빌드된 CSS(
.next/static/chunks/*.css):다섯 검사(
web/, 끝줄):3bbe838의 GitHub 검사:화면을 바꾸지 않아서 PR 에 사진은 싣지 않았어요. 28가지 상태의 사진은 스크래치 폴더에서 상태가 맞는지 보는 데만 썼어요.
실행법
cd web npx vitest run src/app/pattern-lab/labCss.test.ts가정
.headerToggle[data-primary="true"]와 그:hover둘은 옮기지 않았어요.headerToggle의 바탕 규칙은 Preview 의headerSelect와 한 규칙(.headerToggle, .headerSelect)이라 두 파일이 쓰는 모양이고, 한 클래스를 두 모듈에 나눠 둘 수는 없어요(모듈마다 해시 이름이 달라요). 그래서 옮긴 것은 22개와 포커스 규칙에서 뗀 셀렉터 하나예요.labNav도 잡아요.LabPanels.module.css로 읽었어요. 표의 고칠 곳에 그 파일이 있고, 그 파일은 이미.dockShell,.dockHeader와 머리줄 메뉴를 담는 dock 틀이에요. 새PatternLabClient.module.css를 만들면 머리줄이 두 파일로 갈라져요.web/ARCHITECTURE.md:78의 「PatternLab.module.csskeeps only what two or more files draw with, andLabPanels.module.cssthe dock chrome」 은 이제 맞아서 고치지 않았어요.Changelog
Web
PatternLabClient.tsxread moved from the sharedPatternLab.module.csstoLabPanels.module.css, To hardware's dark button went toHardwareModal.module.css, and a test fails when a class in the shared file has one reader. Computed styles in 28 Lab states at 390px and 1440px matchdev.경험
언제: 바퀴에서 Pattern Lab 의 포크 표시, 저장 실패 알림 같은 상태를 Playwright 로 띄워 볼 때
교훈: Lab 은 처음 열 때
patternflow_lab_project_v2를 쓰지 않으니 이름 칸을 한 번 바꿔 저장된 뒤에 그 JSON 에forkOf,editOf를 넣고 다시 열고, 저장 실패는Storage.prototype.setItem을 던지게 바꾼 뒤 이름을 고쳐 띄워요근거: #240 에서 연 직후 그 키가
null이라 심기가Cannot set properties of null로 멈췄고, 이름을 바꾼 뒤엔 28가지 상태가 다 떴어요바퀴
바퀴 94 · 후보 4 「Lab 머리줄 규칙 24개가 여럿이 쓰는
PatternLab.module.css에서 셸의 CSS 로 간다」다음 바퀴
LabPanels.module.css에 머리줄 171줄이 앞에 들어가서, 표의 줄 번호가 171줄 뒤로 밀렸어요.!단언 가운데 타입으로 좁힐 수 있는 일곱이 빠진다」:isValidMatrix를 부르는 곳은 아직 두 파일뿐이에요.https://claude.ai/code/session_01UuHW3UoaQf9BPw9Q5XRGrN
Generated by Claude Code