Repository navigation
[DONE] Pattern Lab 코드의 @matrix 줄을 고쳐 치는 동안 픽셀과 텍스트 레이어가 잘려 나가지 않는다 - #202
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bhpuo7Z37H7CHDvAMqopiS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bhpuo7Z37H7CHDvAMqopiS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bhpuo7Z37H7CHDvAMqopiS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bhpuo7Z37H7CHDvAMqopiS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bhpuo7Z37H7CHDvAMqopiS
patternflow-bot
marked this pull request as ready for review
October 24, 2026 03:23
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.
lsh / https://claude.ai/code/session_01Bhpuo7Z37H7CHDvAMqopiS
Pattern Lab 코드의
// @matrix 128x64를 96 으로 고쳐 치면 한 자마다 판이 12, 9 폭으로 바뀌어서, 끝까지 칠한 픽셀 레이어가 8,192칸 가운데 576칸만 남았어요. 이제 편집기에서 치는 동안엔 판을 그대로 두고 편집기를 떠날 때 한 번 바꿔서 96×64 의 6,144칸이 다 남아요. 읽지 못하는 줄은 판을 바꾸지 않고, 판이 줄어 잘린 픽셀은 되돌리기로 돌아와요.좋아지는 것: 코드의 판 크기 줄을 고쳐 쳐도 그림이 안 잘린다 — 칠해 둔 픽셀과 글자가 남는다
체크리스트
10 은 바퀴 6675([DONE] 폰에서 Pattern Lab 아래 탭을 눌러도 다른 패널이 닫히지 않고, 「⌄」 메뉴가 패널 위에 열린다 #189~[DONE] Pattern Lab 에서 레이어를 하나 더 얹어도 코드 레이어가 내보낸 JS 에서 미리보기와 같은 픽셀을 찍는다 #200)가 했어요check:voicedev를 merge 했어요97074d2)한 일
Code 패널의 편집기는 칠 때마다
updateLayerCode를 불러요. 거기서@matrix줄이 바뀌면 바로 판을 바꾸고 래스터 레이어를 잘랐어요. 이제 편집기는{ holdMatrix: true }로 불러서 줄을 기다리게 하고, 편집기에서 초점이 나가면(Monaco 의onDidBlurEditorWidget) 새applyMatrixLine이 그 줄을 받아요. 패널이 다른 레이어로 가거나 닫힐 때도 받아요. Paste, 프리셋 ‹ ›, Clear 처럼 코드를 통째로 바꾸는 길은 지금처럼 바로 받아요.판을 바꾸는 줄은 읽히는 줄뿐이에요.
1x64,600x64처럼 범위(8~512) 밖이거나 줄이 없으면 판은 그대로예요. 예전엔 둘 다 128×64 로 돌아갔어요. 줄이 기다리는 동안과 읽지 못할 때는 편집기 위에 한 줄이 떠요. 「The frame becomes 96×64 when you leave the editor.」 와 「The @matrix line needs each side from 8 to 512. The frame stays 128×64.」 예요.판이 바뀔 때마다(
resizePixelLayers, Preview 의 판 고르기와 패턴 열기도 같은 길이에요) 픽셀 레이어를 먼저pixelHistory에 남겨요. 판이 줄어든 바로 뒤엔 그 칸이 지금 그림과 같아서, Pixel 패널의 되돌리기는 그런 칸을 건너뛰어요. 판이 다시 커진 뒤엔 그 칸이 잘린 열을 돌려줘요.증거
새 시험은
web/src/lib/lab/store/layers.test.ts다섯,web/src/app/pattern-lab/panels/CodePanel.test.tsx셋,web/src/lib/lab/pixelHistory.test.ts셋이에요. 고침을 커밋한 뒤 옛 판을git show origin/dev:…로 깔고 돌렸어요.표 줄의 값을 옛 코드에서 다시 쟀어요. 128×64 를 다 칠한 픽셀 레이어와 「Patternflow」 텍스트 레이어(44픽셀)를 두고 줄을 한 자씩 고쳤어요.
고친 코드에선 다섯 자 내내 128×64 에 8,192칸이고, 편집기를 떠나면 96×64 에 6,144칸, 텍스트 44픽셀, x 48 이에요.
빌드한 사이트에서도 쳐 봤어요. 이 컨테이너는 jsdelivr 가 막혀서 Playwright 가 Monaco 요청을
web/node_modules/monaco-editor(같은 0.55.1)로 돌려줬어요. 128×64 를 다 칠한 35% 픽셀 레이어를 둔 프로젝트를 localStorage 에 넣고, Code 패널 첫 줄에// @matrix 96x64를 한 자씩 친 뒤 레이어 이름을 눌러 편집기를 떠났어요. 두 폭이 같았어요.web/에서 다섯 검사의 끝줄이에요.links-absolute와roadmap은gh가 원래 레포를 못 읽는 컨테이너라skipped예요. PR 의drift.yml이 다시 돌려요. 문서는 고치지 않아서check:human-lock은 돌리지 않았어요.실행법
web/에서npm run dev로/pattern-lab을 열고, Pixel 패널에서 판을 다 칠해요. Code 패널 첫 줄에// @matrix 96x64를 한 자씩 치는 동안 Preview 의 판 고르개는 128 × 64 그대로이고 편집기 위에 「The frame becomes 96×64 when you leave the editor.」 가 떠요. 편집기 밖을 누르면 판이 96 × 64 가 되고 픽셀은 다 남아요. 시험은npx vitest run src/lib/lab/store/layers.test.ts src/lib/lab/pixelHistory.test.ts src/app/pattern-lab/panels/CodePanel.test.tsx src/app/pattern-lab/panels/PixelPanel.test.tsx예요.가정
12x64,9x64는 읽혀서 잘려요. 잠깐 쉬면 받는 꼴은 천천히 치는 사람에게 같은 일이 생겨요. 치는 동안 판이 안 바뀌어 헷갈리지 않게 편집기 위에 한 줄을 띄웠어요.pixelHistory에 남기라고만 했는데, 그대로 하면PixelPanel.test.tsx의 「undo still works after the matrix size changes」 가 빨개졌어요. 판이 준 바로 뒤의 첫 되돌리기가 아무것도 안 바꾸는 칸을 쓰기 때문이에요. 그 시험은 그대로 두고, 판이 바뀔 때 남긴 칸에만 표를 달아 그 칸이 지금 그림과 같으면 건너뛰게 했어요. 모든 칸을 건너뛰게 하면 빈 곳에서 들어 올린 선택을 Esc 로 놓을 때 그 앞 획까지 지워져서, 그 길은pixelHistory.test.ts에 시험으로 묶었어요.spec)에서 다시 그려지기 때문이에요.@knobs줄은 지금처럼 칠 때마다 받아요. 이 바퀴는 판 크기만 봤어요.Changelog
Web
@matrixline no longer crops the pixel and text layers. The Lab took the line up at every keystroke, so typing 96 over the 128 of// @matrix 128x64passed through 12x64 and 9x64 and left a full pixel layer with 576 of its 8,192 cells. The frame now changes when focus leaves the editor, a line out of range or gone leaves it as it is, and Undo in the Pixel panel brings back what a smaller frame cut off.경험
언제: 바퀴에서 Pattern Lab 의 Code 패널(Monaco)에 실제로 쳐 보며 재거나 사진을 찍을 때
교훈: 컨테이너가 jsdelivr 를 막아 편집기가 Loading 에서 멈추니, Playwright
context.route로cdn.jsdelivr.net/npm/monaco-editor@0.55.1/요청을web/node_modules/monaco-editor/의 같은 경로 파일로 돌려준다근거: #202 에서 그렇게 해서 빌드한 Lab 의 Monaco 에
// @matrix 96x64를 한 자씩 치고 자동 저장의 칸 수까지 쟀어요바퀴
바퀴 76 · 후보 11 「코드의
// @matrix줄을 고쳐 치는 동안 픽셀과 텍스트 레이어가 잘려 나가지 않는다」다음 바퀴
https://claude.ai/code/session_01Bhpuo7Z37H7CHDvAMqopiS
Generated by Claude Code