feat: 닉네임 입력 단계 랜덤 닉네임 및 중복 확인 기능 추가#123
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- RefreshIcon SVG viewBox를 16x16 → 24x24로 교체 (아이콘 클리핑 해결) - InputField에 showClearButton 추가 (값 있을 때 clear 버튼 표시) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Input 컴포넌트의 handleClear는 native Event("input")를 dispatch하는데
이것이 React Hook Form onChange까지 안정적으로 전달되지 않을 수 있음.
onClear 콜백에서 setValue를 직접 호출해 RHF 상태를 확실히 초기화.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
useEffect에서 getValues로 기존 폼 값을 확인하고, 이미 입력된 값이 있을 경우 랜덤 닉네임으로 덮어쓰지 않도록 처리. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GET → POST, 엔드포인트 수정 (participants/nickname/validation) - 요청: searchParams → JSON body - 응답: isDuplicate 필드 제거 → 중복 시 에러 코드(P006) throw 방식으로 변경 - 네이밍 정리: checkNicknameDuplicate → validateNickname - Footer handleNext: isApiError + ERROR_CODES.DUPLICATE_NICKNAME 에러 핸들링 연결 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Input 컴포넌트는 value prop 없으면 internalValue(로컬 state)로 hasValue를 판단. RHF의 setValue는 native DOM 값을 직접 조작하므로 internalValue가 업데이트되지 않아 clear 버튼이 표시되지 않는 문제가 있었음. useWatch로 RHF 값을 구독해 value prop으로 내려주면 isControlled=true가 되어 hasValue가 실제 폼 값을 항상 정확하게 반영. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- queryOption.ts import 구문 한 줄로 정리 (린터) - NicknameStep Footer 에러 핸들링을 switch문으로 변경 (기존 패턴과 통일) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자 참여 흐름의 닉네임 입력 단계를 대폭 개선하여, 사용자가 쉽고 편리하게 닉네임을 설정할 수 있도록 돕습니다. 무작위 닉네임 추천과 실시간 중복 확인 기능을 도입하여 입력 과정을 간소화하고, 여러 UI/UX 문제점을 해결하여 전반적인 사용성을 높였습니다. 또한, API 연동 및 관련 훅을 추가하여 기능 확장을 위한 기반을 마련했습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| @@ -0,0 +1,22 @@ | |||
| export const RANDOM_NICKNAMES = [ | |||
|
|
||
| import { RANDOM_NICKNAMES } from "#/constants/nickname"; | ||
|
|
||
| const shuffle = <T>(arr: T[]): T[] => { |
There was a problem hiding this comment.
https://es-toolkit.dev/reference/array/shuffle.html 이거 써보는 것도 좋아
## [2.0.0-beta.11](v2.0.0-beta.10...v2.0.0-beta.11) (2026-02-27) ### Features * 닉네임 입력 단계 랜덤 닉네임 및 중복 확인 기능 추가 ([#123](#123)) ([4cf0323](4cf0323))
## [2.1.0](v2.0.0...v2.1.0) (2026-02-27) ### Features * 닉네임 입력 단계 랜덤 닉네임 및 중복 확인 기능 추가 ([#123](#123)) ([4cf0323](4cf0323))
🎯 PR 제목
feat: 닉네임 입력 단계 랜덤 닉네임 및 중복 확인 기능 추가
📑 작업 상세 내역
기능 추가
useRandomNickname훅을 추가해 중복 방지 랜덤 닉네임을 생성합니다useValidateNickname훅을 추가합니다버그 수정
onClear로 RHF 상태를 명시적으로 업데이트합니다기타 작업
🙏 리뷰 요청 사항
useRandomNickname훅의 셔플 및 중복 방지 로직이 의도대로 동작하는지 확인해주세요.InputField에valueprop을 내려줘 controlled 모드로 전환한 부분이 기존 폼 동작에 영향을 주지 않는지 검토해주세요.validateNicknameAPI 에러 핸들링(ERROR_CODES.DUPLICATE_NICKNAME)이 서버 스펙과 일치하는지 확인해주세요.📃 참고 자료
🖼️ 작업 결과물