Skip to content

[DONE] 텍스트 레이어의 글을 비우면 미리보기도 비고, 판을 돌린 흐르기 글이 다시 열어도 살고, 글꼴을 못 남기면 그렇다고 말한다 - #244

Merged
patternflow-bot merged 5 commits into
devfrom
claude/pf-round-96-m6c99k
Oct 25, 2026
Merged

patternflow-bot merged 5 commits into
devfrom
claude/pf-round-96-m6c99k

Conversation

@patternflow-bot

@patternflow-bot patternflow-bot commented Oct 25, 2026 •

Copy link
Copy Markdown

lsh / https://claude.ai/code/session_017SBMKxYYSD2Dfjhnd4fgQJ

Pattern Lab 텍스트 레이어에서 흐르기나 색 램프를 켠 채 글을 다 지우면, 이제 미리보기와 내보내기에서도 글자가 사라져요. 판을 128×64 에서 64×128 로 돌렸거나 오른쪽 맞춤으로 아주 길게 쓴 흐르기 글은 다시 열어도 멈추지 않아요. 글꼴 파일을 이 브라우저가 못 남겼으면 남겼다고 하지 않아요.

좋아지는 것: 텍스트 레이어가 쓴 그대로 보이고 다시 열린다 — 지운 글이 흐르거나 긴 글이 멈추지 않는다

할 일

한 일

① textReach(lib/lab/textRaster.ts)가 캔버스가 없을 때만 null 을 돌려줘요. 글자가 없으면 { left: 0, right: 0 } 이라, drawTextSource 가 열 0 으로 보고 source 를 null 로 두고 bitmap 을 비워요. 효과 None 일 때와 같은 빈 레이어예요.

② source 의 자리를 placeTextSource(lib/lab/textEffects.ts) 한 곳에서 잡아요. 그 판의 sourceColumnLimit 보다 긴 열은 text.ts 가 그리며 버리듯 뒤를 잘라요. 흐르기는 x 를 「source 폭 + 판 폭」으로 나눈 나머지로만 읽어서, x 를 판 바로 옆(source 폭만큼 왼쪽에서 판의 오른쪽 끝까지)으로 옮겨요. 매 프레임은 그대로예요. 색 램프는 x 를 그대로 두고, 판에 하나도 걸치지 않으면 null 이에요. 그리는 쪽(text.ts), 판을 바꾸는 쪽(store/shared.ts 의 resizePixelLayers), 읽는 쪽(serialize.ts 의 readTextSource)이 모두 이 함수를 거쳐요. 읽는 쪽의 Math.abs(x) > width * 8 + columns 는 빠지고 Number.isSafeInteger(x) 가 들어갔어요. 열 한계는 그대로 지켜요.

③ addFontFile(lib/lab/textFonts.ts)이 { option, remembered } 를 돌려줘요. 남기라 했는데 못 남겼으면 TextPanel 이 「Brand Sans is loaded for this visit. This browser wouldn't keep a copy for next time.」 이라고 하고, 「Forget it」 단추도 없어요.

시험은 새 lib/lab/textRaster.test.ts 가 textRaster.ts 를 흉내 내지 않고 가짜 캔버스로 돌려요. 그 캔버스는 글자마다 폭이 글꼴 크기의 반인 덩어리를 그려요. test/setup.ts 의 캔버스는 아무것도 재지 않아서 이 파일 안에서만 바꿔 끼워요. textEffects.test.ts 에 placeTextSource 시험 셋, TextPanel.test.tsx 에 IndexedDB 를 흉내 낸 글꼴 시험 셋을 더했어요.

증거

dev(1fea592)에서 새 시험만 돌렸을 때예요.

   × a moving text whose words are deleted > scroll, with the text set to "", lights nothing, as a still one does
   × a moving text whose words are deleted > scroll, with the text set to "\n", lights nothing, as a still one does
   × a moving text whose words are deleted > ramp, with the text set to "", lights nothing, as a still one does
   × a moving text whose words are deleted > ramp, with the text set to "\n", lights nothing, as a still one does
   × a line longer than its source holds > keeps its scroll running after the panel turns from 128 × 64 to 64 × 128 and the project reopens
   × a line longer than its source holds > keeps its ramp running after the panel turns from 128 × 64 to 64 × 128 and the project reopens
   × a line longer than its source holds > keeps scrolling after the project reopens when it is set right of its X
   × TextPanel > says it is only for this visit when the browser has no IndexedDB
   × TextPanel > says it is only for this visit when the browser refuses to store it
      Tests  9 failed | 21 passed (30)

빨강의 까닭은 셋이에요. 글을 비운 레이어의 source 가 { x: 10, width: 11, … } 로 남았어요. 판을 돌린 source 가 4095열로 64×128 의 한계 2048 을 넘었어요. 오른쪽 맞춤 글은 다시 열면 activeTextEffect 가 null 이었어요.

이 브랜치에서는 세 파일 55개가 다 지나요(Tests 55 passed (55)).

다섯 검사(web/)의 끝줄이에요.

npm ci                          added 762 packages, and audited 763 packages in 49s
npm run lint -- --max-warnings=0   exit 0
npm run typecheck               exit 0 (web, tools/virtual-panel)
npm run build                   exit 0
npm run check:ci                Test Files  102 passed (102) · Tests  1279 passed (1279) · drift 14 passed, links-absolute · roadmap skipped · exit 0
npm run check:voice             check:voice: nothing found

PR 검사는 099b66d 에서 「Drift checks | completed | success」, 「Web CI | completed | success」 예요.

빌드한 /pattern-lab 에서 텍스트 레이어를 하나 더하고, Effect 를 Scroll 로, 「remember in this browser」 를 켠 채 글꼴 파일을 넣고, 글 칸을 비웠어요. 이 브라우저의 글꼴 IndexedDB 는 QuotaExceededError 를 던지게 했어요. dev 는 지운 「Hello」 가 계속 흐르고 「kept in this browser for next time」 이라고 해요. 이 브랜치는 아래 코드 레이어만 보이고, 못 남겼다고 해요.

폰 390 · dev
폰 390 · 이 브랜치
데스크톱 1440 · dev
데스크톱 1440 · 이 브랜치

실행법

cd web
npx vitest run src/lib/lab/textRaster.test.ts src/lib/lab/textEffects.test.ts src/app/pattern-lab/panels/TextPanel.test.tsx

가정

  • 지시 6 의 ② 는 「판을 바꿀 때 다시 굽거나, 읽을 때 버리지 않고 다시 굽기」를 보기로 들었어요. 다시 굽지 않고 자르기와 자리 잡기를 골랐어요. 판을 바꿀 때 source 를 옮기기만 하는 것은 resizePixelLayers 의 뜻이고, 다시 구우면 이 브라우저에 없는 파일 글꼴이 대신 글꼴로 바뀌어요.
  • 이미 저장된 것 가운데 판을 돌려 열 한계를 넘은 source 는 이번에도 읽을 때 버려요. 그 열을 다 풀어야 자를 수 있어서, 남이 보낸 스택 공유 링크까지 크기 한계 없이 받게 돼요. 텍스트 효과는 10월 24일에 포크에 들어왔어요. 오른쪽 맞춤처럼 x 만 한계 밖이던 저장은 이제 열려요.
  • 흐르기 x 를 옮기면 Copy as code 가 판 밖에 통째로 있던 흐르기 글의 sprite 를 다른 곳에 둬요. 예전엔 Text 패널의 X 에, 이제는 0 단계 프레임이 보이는 자리예요. Lab 의 미리보기와 두 내보내기는 그대로예요.
  • 표 밖: 한 source 에 다 못 담을 만큼 긴 오른쪽 · 가운데 맞춤 글은 줄의 앞쪽을 남기고 판에 놓인 뒤쪽을 버려요. 그래서 0 단계 프레임이 글을 둔 자리에 보이지 않고, 색 램프는 아무것도 비추지 않아요.

Changelog

Web

  • A moving text layer whose words are deleted goes blank, and a long scroll opens again still moving. Emptying the text of a scrolling or ramp-running layer left the old letters moving in the preview and both exports. A line too long for a 64 × 128 source after the panel was turned, or set right of its X past 4,096 columns, saved but reopened standing still; every step that makes or reads a source now places it the same way. The Text panel no longer says a font file is kept for next time when this browser would not keep it.

바퀴

바퀴 96 · 지시 6 「텍스트 레이어 고침 셋」

경험

언제: 바퀴에서 390px Pattern Lab 의 dockview 탭(Layers, Text, Preview)을 Playwright 로 바꿀 때
교훈: 탭은 click() 으로 안 바뀌니 탭에 dispatchEvent("pointerdown") 를 보내고, dev 를 따로 빌드할 땐 node_modules 를 심볼릭 링크 대신 cp -al 로 레포 옆 worktree 에 걸어요
근거: #244 에서 locator.evaluate((el) => el.click()) 로 Layers 탭을 눌러도 「+ Text」 가 30초 안에 안 떴고 pointerdown 으로 바로 떴어요. 같은 바퀴에서 스크래치 worktree 의 심볼릭 링크 node_modules 는 Turbopack 이 「Symlink node_modules could not be resolved」 로 빌드를 멈췄어요

다음 바퀴

  • 지시 7 「주석 · 사본 맞추기」: 「창작자 지시」 의 남은 줄이에요. 이번 바퀴는 그 파일들을 건드리지 않았어요.
  • 6위 「Make 가이드와 Pattern Guide 의 Lab 사진이 걷어 낸 Gallery 탭 대신 지금 Lab 을 보인다」: 표에서 남은 맨 위 줄이에요. dockview 탭을 이 PR 「경험」 대로 pointerdown 으로 바꾸면 390 에서도 Text 탭이 든 Lab 을 찍을 수 있어요.
  • 7위 「Pattern Lab 의 ! 단언 가운데 타입으로 좁힐 수 있는 일곱이 빠진다」: textEffects.ts 의 layer.source! 는 이번에 줄이 34줄 밀렸어요.

🤖 Generated with Claude Code

https://claude.ai/code/session_017SBMKxYYSD2Dfjhnd4fgQJ

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SBMKxYYSD2Dfjhnd4fgQJ
@patternflow-bot patternflow-bot changed the title [WIP] pf 96바퀴 — 고를 줄을 찾는 중 [WIP] 텍스트 레이어의 글을 비우면 미리보기도 비고, 판을 돌린 흐르기 글이 다시 열어도 살고, 글꼴을 못 남기면 그렇다고 말한다 Oct 25, 2026
@patternflow-bot patternflow-bot changed the title [WIP] 텍스트 레이어의 글을 비우면 미리보기도 비고, 판을 돌린 흐르기 글이 다시 열어도 살고, 글꼴을 못 남기면 그렇다고 말한다 [DONE] 텍스트 레이어의 글을 비우면 미리보기도 비고, 판을 돌린 흐르기 글이 다시 열어도 살고, 글꼴을 못 남기면 그렇다고 말한다 Oct 25, 2026
@patternflow-bot
patternflow-bot marked this pull request as ready for review October 25, 2026 05:16
@patternflow-bot
patternflow-bot merged commit 053e687 into dev Oct 25, 2026
2 checks passed
@patternflow-bot
patternflow-bot deleted the claude/pf-round-96-m6c99k branch October 25, 2026 05:19
engmung pushed a commit to engmung/Patternflow that referenced this pull request Oct 25, 2026
This was referenced Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants