[Feat-T3-86] 인트로 · 로그인 · 이용 약관 UI 구현 및 로직 정리#16
Conversation
- Figma 디자인 시스템에 정의된 색상 값 Asset 추가 - 그에 따른 BitnagilColor 변수 추가 - Bundle을 해당 모듈에서 찾을 수 있도록 코드 변경
- 기존 Enum으로 정리된 BitnagilFont에서 Struct로 변경하여 weight 값에 따른 폰트를 받을 수 있도록 수정 - FontAttributes, FontStyle, FontWeight 등 폰트 정의에 필요한 enum 및 struct 정의
- apple, kakao, check icon 이미지 추가 - BitnagilIcon Enum 정의
- PrimaryButton Component 구현 - IntroView 구현
- IntroView UI 구현 - SceneDelegate 앱 진입점 수정
- LoginView UI 구현 - SocialLoginButton Component 구현 (카카오, 애플)
- TermAgreementItemView 컴포넌트 구현 - TermAgreementView UI 구현 - LoginViewModel과 로직 구현
- 기존 TokenResponseDTO에서 LoginResponseDTO로 수정 (서버 응답에 User의 role이 추가되었음) - AuthEndpoint에 agreements 케이스 추가 - AuthRepositoryProtocol 및 AuthRepository에 submitAgreements 정의 및 구현 - LoginUseCaseProtocol 및 LoginUseCase에 submitAgreements 정의 및 구현 - LoginViewModel에 submitAgreement 로직 구현
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
generalban
left a comment
There was a problem hiding this comment.
훌륭한 코드에요 이 정도면 체크만 하고 바로 머지해도 될 것 같습니다~
| static let horizontalMargin: CGFloat = 20 | ||
| static let labelTopSpacing: CGFloat = 54 | ||
| static let graphViewTopSpacing: CGFloat = 38 | ||
| static let graphViewBottomSpacing: CGFloat = 64 | ||
| static let startButtonBottomSpacing: CGFloat = 20 | ||
| static let startButtonHeight: CGFloat = 54 |
There was a problem hiding this comment.
다양한 디바이스 크기에 대응하기 어려울 수도 있을것 같아요. adaptive layout 고려 해볼 수도 있을 것 같습니닷.
There was a problem hiding this comment.
넵! 현재 Se3 스크린샷으로 봤을 때에는 큰 문제가 없을 것 같습니다.
추후 고정된 값으로 화면이 안보여서 유연한 값이 필요한 상황이 온다면 디자이너와 협의해서 수정해보겠습니다.
| private let socialType: SocialType | ||
| private let stackView = UIStackView() | ||
| private let iconImageView = UIImageView() | ||
| private let buttonLable = UILabel() |
🌁 Background
로그인 기능을 완성하기 위해 해당 작업을 진행하였습니다.
업데이트된 디자인 시스템을 반영하고, 인트로 > 로그인 > 약관 동의 화면을 구현하였습니다.
기존에 LoginViewModel에 구현되어 있던 로그아웃, 탈퇴, 토큰 재발급 기능을 제거했습니다.
(하지만 UseCase는 남아있으니 필요한 view에서 사용할 수 있음)
📱 Screenshot
온보딩 UI 구현하면서 인트로, 약관 동의 화면 Label 색상 변경해야 하는 것을 깨달았습니다 .. 😅
Label 수정 커밋 에서 수정해서 푸시했습니다 !!
색상때문에 다시 캡쳐하긴 번거로워서 해당 사항 감안해주시길 바랍니다.. ㅠㅠ !!
인트로
로그인
약관 동의 (선택 X)
약관 동의 (선택 O)
전체 로직 흐름
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-07-08.at.17.21.16.mp4
👩💻 Contents
디자인 시스템 정리
로그인 흐름 UI 구현
IntroView: 인트로 화면LoginView: 로그인 화면TermsAgreementView: 이용 약관 동의 화면PrimaryButton컴포넌트 구현 (재사용 가능)이용 약관 로직 구현
✅ Testing
UI에 기능을 붙이면서 기존 구현해놨던 로그인 과정과 이용 약관 흐름을 테스트 해봤습니다.
우선 소셜 로그인을 통해 로그인을 하면 User는 guest 권한을 부여받습니다.
이후 약관 동의하여 해당 항목들을 서버로 보냅니다.

현재는 온보딩 뷰가 없어 응답 값을 확인하여 해당 로직이 잘 처리되었는지 확인했습니다.
📝 Review Note
디자인 시스템 개선
BitnagilFont를 struct로 수정해야 했습니다.FontStyle,FontAttributes,FontWeight등의 enum을 정리해놓고,BitnagilFont에서 사용할 수 있도록 수정하였습니다.서브 뷰에 Delegate 사용
TermsAgreementItemView를 구현하였습니다.TermsAgreementItemView에서 사용자 입력 처리가 2개가 될 수 있습니다. (체크 박스, 더보기 버튼)TermsAgreementItemViewDelegate를 구현하여 처리하였습니다.PrimaryButton,SocialLoginButton)는 UIButton으로 구현하여 ViewController에서 addAction을 처리할 수 있도록 구현하였습니다.서버 응답의 User 권한에 따른 분기 처리
또한 로그인 요청을 보내면 서버로부터 유저 권한을 확인한 후 이용 약관 vs 온보딩을 처리해야 합니다.
서버로부터 온 응답이
.guest라면 이용 약관 view를 타야 하고, 그렇지 않으면 (.user) 온보딩 화면을 타야 합니다.다만 현재 PR이 길어질 것 같아 상황은 인지한 채로 온보딩 로직 구현하면서 분기 처리를 진행하겠습니다.
📣 Related Issue