Repository navigation
[DONE] Pattern Lab Pixel 의 − + 단추가 보던 가운데를 붙잡고 확대한다 - #214
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z1E4f68JawhtXCKxLEy8h
The wheel already held the cell under the cursor; the buttons zoomed from the top-left corner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z1E4f68JawhtXCKxLEy8h
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z1E4f68JawhtXCKxLEy8h
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z1E4f68JawhtXCKxLEy8h
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Z1E4f68JawhtXCKxLEy8h
patternflow-bot
marked this pull request as ready for review
October 24, 2026 10:04
This was referenced Oct 24, 2026
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 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.
ops / https://claude.ai/code/session_013Z1E4f68JawhtXCKxLEy8h
Pattern Lab Pixel 패널의 − + 단추는 그림을 뷰포트 왼쪽 위를 기준으로 키워서, 크게 보던 곳이 누를 때마다 옆으로 밀려났어요. 1440 화면에서 10× 일 때 + 한 번에 가운데가 64번째 칸에서 58번째로 갔어요. 휠처럼 지금 보는 가운데를 붙잡게 고쳐서, 머지하면 − + 를 눌러도 보던 칸이 패널 가운데에 그대로 남아요.
좋아지는 것: 픽셀 그림을 − + 로 키워도 보던 곳이 밀리지 않는다 — 다시 찾아 굴릴 일이 없다
할 일
5 는 [DONE] Pattern Lab 에서 AI 갤러리와 Gemini 키 칸이 없어지고, Copy prompt 옆에서 v-field · rgb 를 고른다 #183[DONE] Pattern Lab 에 처음 온 사람이 막히는 곳 16개를 재서 바퀴 후보 표 맨 위에 넣는다 #188, 후보 118 은 [DONE] 폰에서 Pattern Lab 아래 탭을 눌러도 다른 패널이 닫히지 않고, 「⌄」 메뉴가 패널 위에 열린다 #189[DONE] 폰에서 Pattern Lab 의 Pixel 패널이 그림을 1× 대신 2× 로 맞춰 연다 #210 가 했어요. 남은 줄 22개 가운데 맨 위가 후보 190c040d0을 합쳤어요.incoming/pattern-study/만 바뀌어서web/은 그대로이고,check:drift를 다시 돌려 통과했어요한 일
app/pattern-lab/panels/pixel/usePixelViewport.ts: 휠만 쓰던 붙잡을 자리(wheelAnchor)를zoomAnchor와anchorAt으로 꺼냈어요. 휠은 커서 자리를, − + 가 부르는zoomBy는 뷰포트의 보이는 가운데를 넣어요. 확대 뒤 굴림을 되돌리는 레이아웃 효과는 둘이 같이 써요. Director 의 ± 가 보이는 가운데를 지키는 꼴(panels/director/useTimelineZoom.ts:62~:73)을 따랐어요.zoomBy는 지금 배율을zoomRef에서 읽고, 1× 나 32× 끝에서 더 누르면 아무것도 하지 않아요.app/pattern-lab/panels/PixelPanel.test.tsx: 300×200 패널을 6× 로 키워 (50, 20) 칸을 가운데에 두고, + + − − 를 누를 때마다 가운데 칸이 그대로인지, 끝에 굴림이 처음 자리로 돌아오는지 봐요.증거
Playwright 로
/pattern-lab을 열고 Pixel 탭, 「+ Add pixel layer」 를 누른 뒤 − + 로 배율을 맞추고, 그림 가운데를 뷰포트 가운데로 굴려서 쟀어요. 값은 뷰포트 가운데 점이 128×64 그림의 몇째 칸에 있는지예요. 폰은hasTouch,isMobile을 준 창이에요.가운데가 아닌 곳도 봤어요. 12× 에서 45.5, 22.5 를 가운데에 두고 + 세 번, − 세 번을 누르니 390 에선 45.6, 22.6 을 거쳐 45.5, 22.5 로 돌아왔어요. 1440 에선 22.5 줄이 위에 붙어 가운데까지 굴러오지 않아서 45.5, 25.7 에서 시작했고, 45.6, 25.7 을 거쳐 45.5, 25.7 로 돌아왔어요. 폰의 고치기 전 값은 고친 빌드로 갈아 끼운 뒤에 폰을 재기 시작해서 없어요. 두 폭이 같은
zoomBy를 불러요.고친 것을 되돌리고(
git stash로usePixelViewport.ts만) 돌리면 새 시험이 빨개요.web/에서 다섯 검사의 끝줄이에요.GitHub 에선 dev 를 합친 head
86957fd의 Drift checks 와 Web CI 가 둘 다 success 예요. 합치기 전7510de3에서도 둘 다 success 였어요.10× 에서 그림 가운데 칸 (64, 32) 둘레에 주황 십자를 그리고 + 를 두 번 눌러 12× 로 키운 화면이에요. 십자가 패널 가운데에 남고, 상태 줄의 칸은 64,32 예요.
실행법
web/에서npx vitest run src/app/pattern-lab/panels/PixelPanel.test.tsx. 손으로는/pattern-lab에서 Pixel, 「+ Add pixel layer」 를 누르고 + 로 그림을 패널보다 크게 키워요. 아무 칸에 점을 찍어 패널 가운데로 굴린 뒤 + − 를 누르면 점이 가운데에 남아요.가정
getBoundingClientRect의 왼쪽 위에 테두리(clientLeft,clientTop)와clientWidth,clientHeight의 반을 더해요. 16px 패딩은 굴리는 칸 안이라 따로 빼지 않았어요.margin: auto가 가운데에 두고 브라우저가 굴림을 0 으로 잡아서 전과 같아요. 1440 에서 4× 로 돌아가면 64, 32 예요.Changelog
Web
경험
언제: 바퀴에서 Pattern Lab Pixel 패널의 굴림이나 확대를 jsdom 시험으로 볼 때
교훈:
panelSize로 패널 크기를 주면 처음 맞춤이 배율을 바꾸니 상태 줄의 배율부터 확인하고, 굴림은 overlay 의getBoundingClientRect를scrollLeft로 짓는 휠 시험 틀을 빌린다 (jsdom 은 굴림을 잡지 않는다)근거: #214 에서 300×200 패널이 2× 로 열려 + 네 번으로 6× 를 만들었고, 그 틀로 + + − − 뒤 굴림이 처음 값으로 돌아오는지 봤어요
바퀴
바퀴 84 · 후보 19 「Pattern Lab Pixel 의 − + 단추가 보이는 가운데를 붙잡고 확대한다」
다음 바퀴
components/community/PublishModal.tsx에 키 리스너가 없어 바깥 판 클릭으로만 닫혀요. Lab 의 다른 창이 쓰는lib/hooks/useDialog.ts꼴이 있고, To hardware 창의 주석과 시험도 같이 고쳐요.AddHeaderModal.tsx:154,:176이 Lab 에 없는 「Copy C++ prompt」 를 가리켜요.https://claude.ai/code/session_013Z1E4f68JawhtXCKxLEy8h
Generated by Claude Code