Open
Conversation
- 파일 생성 및 프리뷰 추가
- "완료", "네" 버튼
- version 1인 경우 보라색 - 그 외 회색
- 온보딩캐릭터 SVG, PNG 업로드 시도 했으나 실패함 ( 인식을 못함 )
…/TEAM-ALOM/dorundorun-iOS into feat/#19-create-nickname-view-UI
- 텍스트 필드 추가 - 포커스시 글씨체, 색상 변경
- 렌더링 문제인지 원본 파일에는 캐릭터 테두리가 있는데, 화면에 삽입하면 사라지는 문제가 있음
- 한글, 숫자, 영어만 가능하도록 설정함
- 기존엔 contain을 썼는데, 한글 인식 + 공백 인식을 못하여서 정규식으로 구현함
- 닉네임 글자 수 제한 - 닉네임 유효문자 확인 - 닉네임 중복여부 확인 - 경고메세지와 완료버튼 활성화 및 텍스트 필드 상태를 변경
- UI와 로직을 분리하여 가독성을 높이고자함
- 경고 메세지의 유무에 따른 컴포넌트 위치가 조금씩 바뀌는 문제가 있음 - 경고 메세지 크기 지정해주어 해결함
10 tasks
- NicknameTextField, NicknameTextFieldStyle, NicknameWarningMessage 클래스로 분리 - validateNickname() 내 resetValidation(), updateValidation(error:) 함수 분리 - 코드 가독성을 높이고 중복된 UI 업데이트 로직 제거
- PaddingState를 struct로 변경하여 유지보수성을 향상 - switch 문을 제거하고 static let 방식을 사용하여 코드 단순화
- 마이페이지에서 닉네임 변경하는 경우, 해당 로직 재사용성 가능성이 있어 따로 NicknameValidator 생성하였음 - Domain 폴더 생성시 옮기는 것이 좋아보임 !
- 닉네임이 비었을 때의 경우를 reset으로 설정함
10 tasks
Contributor
cinnamonfor6214
left a comment
There was a problem hiding this comment.
코드 리뷰 늦게 드려서 죄송합니다... 🙇♀️🙇♀️ 우선 보면서 궁금했던 것들에 대한 코멘트 남겨봅니당...!
agseou
approved these changes
Mar 20, 2025
Contributor
agseou
left a comment
There was a problem hiding this comment.
구조적으로 넘 깔끔한거 같아요 👍👍
이미지 문제는 추후 디자이너님이랑 싱크 맞추고
뷰모델은 회의에서 정해보아요!
수고하셨어요 !! 짱짱!
| .padding(.bottom, PaddingState.defaultState.firstTextPadding) | ||
|
|
||
| // 이미지 파일이 원본과 다르게 나옴 - 테두리가 사라지는 문제 | ||
| Image(asset: DesignSystemAsset.Icons.onboardingCharacter217) |
Contributor
There was a problem hiding this comment.
이 부분 직접 DesignSystemAsset.Icons.onboardingCharacter217.SwiftUIImage로 가져와서 할지 의논이 필요하겠군요!
|
|
||
| // 닉네임 입력 필드 UI 관리 | ||
| private struct NicknameTextFieldStyle { | ||
| private static let errorColor = Color(red: 1.0, green: 0.376, blue: 0.376, opacity: 1.0) |
Contributor
There was a problem hiding this comment.
공용으로 사용할 수 있는 extension을 추가해서 색상 hexcode만 입력받아 색을 입력할 수 있도록 하는 건 어떨까요?
| Button { | ||
| // store로 action 전달 필요 | ||
| } label: { | ||
| OnboardingButton(label: "완료", activate: nicknameField.submitButtonState.isEnabled).padding(.bottom, 37) |
Contributor
There was a problem hiding this comment.
OnboardingButton(label: "완료", activate: nicknameField.submitButtonState.isEnabled)
.padding(.bottom, 37)여기 들여쓰기 깜박!
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.
🛠 변경 사항 Changes
💬 기타 참고 사항
🔗 관련 이슈 Related issues
closes #19
📸 스크린샷 (선택 사항)
닉네임 입력 상태별 UI
닉네임 입력 필드에서 발생할 수 있는 다양한 상태를 아래에서 확인할 수 있습니다!!