Repository navigation
[DONE] Pattern Lab 의 Share 창이 Esc 로 닫히고, 닫으면 초점이 Share 단추로 돌아간다 - #217
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Difa7hNLiCp9rFtK3R7Xtt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Difa7hNLiCp9rFtK3R7Xtt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Difa7hNLiCp9rFtK3R7Xtt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Difa7hNLiCp9rFtK3R7Xtt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Difa7hNLiCp9rFtK3R7Xtt
patternflow-bot
marked this pull request as ready for review
October 24, 2026 10:37
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_01Difa7hNLiCp9rFtK3R7Xtt
Lab 머리줄의 Share 가 여는 창은 바깥을 눌러야만 닫혔어요. 이제 Esc 한 번에 닫히고 초점이 Share 단추로 돌아와요. To hardware 안에서 연 Share 창도 Esc 로 그 창만 닫히고, 번역해 둔 헤더는 남아요.
좋아지는 것: Lab 의 Share 창이 Esc 로 닫힌다 — 키보드로 올리다 그만둘 때 마우스로 손을 옮기지 않는다
19위는 바퀴 6684 가 했고, 남은 줄은 20~40위 21개예요PublishModal이useDialog로 Esc 와 초점을 맡는다bf2a706에서 Drift checks 와 Web CI 초록한 일
components/community/PublishModal.tsx의 카드에useDialog를 달았어요. 앞 바퀴들이 커뮤니티의 다른 다섯 창과 To hardware 에 단 것과 같은 훅이에요. Esc 는 창을 닫고, 닫히면 초점은 창을 연 단추로 돌아가요.제목 칸의
autoFocus는 뺐어요. 그대로 두면 훅이 연 단추를 보기 전에 초점이 제목 칸으로 가서, 훅은 제목 칸을 연 단추로 알고 돌려줄 곳을 잃어요. 그래서 카드가 먼저 초점을 받고, 그 뒤 폼이 보이면 제목 칸으로 옮겨요. 세션을 확인하는 동안엔 제목 칸이 없으니 카드가 초점을 쥐고 있다가, 확인이 끝나 폼이 서면 그때 옮겨요. 전의autoFocus도 폼이 설 때 초점을 옮겼어요.To hardware(
app/pattern-lab/HardwareModal.tsx)의 주석은 Publish 가 키를 듣지 않는다고 적고 있어서 고쳤어요. 이제 Esc 하나를 두 리스너가 같이 듣는데, 둘 다 Publish 를 닫는setPublishCode(null)만 해서 To hardware 는 남아요. Send 는 여전히 키를 듣지 않아서 그 말은 그대로 뒀어요.시험은
components/community/dialogKeys.test.tsx에 넣었어요. 다섯 창이 Esc 와 초점을 받은 그 시험 틀에 Share to Community 를 여섯째로 더해, 진짜 단추로 열고 Esc 로 닫은 뒤 초점이 그 단추로 오는지 봐요. 거기에 셋을 더했어요. 제목 칸에서 시작하는지, 세션 확인이 끝나면 제목 칸으로 가는지, 로그인 칸이 든 창도 Esc 한 번에 닫히는지예요.HardwareModal.test.tsx의 「Esc over the Publish modal」 시험엔 초점을 둘 더 봐요. Share 창이 열리면 제목 칸에, 닫히면 「Upload to the community」 단추에 와야 해요.증거
고치기 전
PublishModal.tsx로 돌리면 새 시험 넷이 빨개요(git stash push src/components/community/PublishModal.tsx뒤).고친 뒤엔 다 통과해요.
web/의 다섯 검사 끝줄이에요.check:ci의roadmap은gh로그인이 없어서,links-absolute는 이 클론에 옛 태그가 없어서 skipped 예요.npm run check:voice는 「nothing found」(4 파일 88줄),npm run check:human-lock은 「no locked words changed」예요.Chromium 에서도 눌러 봤어요. 이 빌드엔
NEXT_PUBLIC_COMMUNITY_URL이 없어 Share 가 안 보여서, 그 값을http://localhost:3100로 준 빌드를 이 컨테이너 안에서만 만들었어요. 커뮤니티 서버가 없어서 창은 로그인 칸으로 열려요. Share 를 누르고 Esc, 다시 열어 첫 칸에 초점을 둔 뒤 Esc 했어요.실행법
http://localhost:3100/pattern-lab 에서 머리줄의 Share 를 누르고 Esc 를 눌러요. 창이 닫히고 Share 단추에 초점 테두리가 있어야 해요.
가정
PublishModal.test.tsx를 적었는데,dialogKeys.test.tsx에 넣었어요. 커뮤니티 창의 Esc 와 초점 시험이 다 거기 있고, 진짜 단추로 창을 열어 초점이 돌아올 곳을 두는 틀도 거기 있어요.PublishModal.test.tsx는 두 번 누름과 코드 크기 시험으로 남았어요.HardwareModal.test.tsx:216은 지금:403의 「Esc over the Publish modal」 시험이에요. 그 시험은 고치기 전에도 통과했어요. To hardware 의 리스너가 Publish 를 대신 닫았으니까요. 그래서 초점 두 곳을 더 보게 했고, 고치기 전 코드에선 닫힌 뒤 초점이 「Upload to the community」 로 오지 않아 빨개요.dv-sash(4px, z-index 99)가 Share 창의 바깥 판(z-index 60)보다 위에 있어요. 창의 Username 칸(41,402 · 308×40) 한가운데를elementFromPoint로 찍으면 그 경계가 나와서, Playwright 의 click 이 30초를 기다리다 끝났어요.onClick={onClose}라서, 창 안에서 글을 끌어 고르다 바깥에서 놓으면 닫힐 거예요. 바퀴 78([DONE] Pattern Lab 의 창 안에서 글을 끌어 고르다 창 밖에서 놓아도 창이 닫히지 않는다 #204)은 To hardware 에useBackdropClose를 달았어요. To hardware 의 Send 창(SendModuleModal)은 아직 키를 듣지 않아요.Changelog
Web
경험
언제: 바퀴에서 Lab 의 Share 나 커뮤니티 창을 실제 브라우저로 볼 때
교훈:
NEXT_PUBLIC_COMMUNITY_URL=http://localhost:3100을 그 빌드에만 주면 Share 가 서고 창은 로그인 칸으로 열리는데, 폰 390 에선 dockview 경계가 칸을 덮으니 Playwright 로 칸을 click 하지 말고 focus 한다근거: #217 에서 그렇게 빌드해 390·1440 에서 Esc 뒤 초점이 Share 로 오는 것을 쟀고, 390 의 Username 칸 click 은
dv-sash가 막아 30초를 다 썼어요바퀴
바퀴 85 · 후보 20 「Lab 의 Share 창이 Esc 로 닫힌다」
다음 바퀴
.h에 라이선스 줄이 하나만 있다」: Lab 뼈대가 첫 줄에 CC-BY-SA-4.0 을 박아서, CC BY 4.0 으로 감싼 헤더는 1번째 줄이 CC-BY-SA-4.0, 18번째 줄이 CC-BY-4.0 이에요.https://claude.ai/code/session_01Difa7hNLiCp9rFtK3R7Xtt
Generated by Claude Code