feat: 약관동의 화면 UI만 구현#98
Conversation
|
Caution Review failedThe pull request is closed. """ Walkthrough이번 변경에서는 약관동의 뷰(terms agreement view)와 관련된 새로운 UI 컴포넌트, 뷰 컨트롤러, 뷰 모델, 그리고 관련 상수들이 추가되었습니다. 약관 리스트 셀, 약관 리스트 뷰, 뷰 컨트롤러, 뷰 오브젝트 구조체, 레이아웃 및 스페이싱 상수 정의가 포함됩니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TermsViewController
participant TermsView
participant TermsItemCell
User->>TermsViewController: 화면 진입
TermsViewController->>TermsView: 뷰 로드 및 configure(terms:)
TermsView->>TermsItemCell: 셀별 configure(vo)
Estimated code review effort2 (10–30분) Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (3)
✨ 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
|
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (2)
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift (2)
27-31: 다국어 지원을 고려해보세요.하드코딩된 한국어 문자열 대신 다국어 지원을 위한 localizable 문자열 사용을 검토해보세요.
-text: "약관 동의 후\n독서 기록을 남겨보세요", +text: NSLocalizedString("terms_agreement_title", comment: "Terms agreement screen title"),
113-113: 매직 넘버를 상수로 정의하세요.하드코딩된 높이 값을 LayoutGuide에 상수로 정의하면 유지보수성이 향상됩니다.
+static let collectionViewHeight: CGFloat = 156그리고 레이아웃에서:
-$0.height.equalTo(156) +$0.height.equalTo(LayoutGuide.collectionViewHeight)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKSpacing.swift(1 hunks)src/Projects/BKPresentation/Sources/AuthFlow/View/TermsItemCell.swift(1 hunks)src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift(1 hunks)src/Projects/BKPresentation/Sources/AuthFlow/View/TermsViewController.swift(1 hunks)src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/TermsViewModel.swift(1 hunks)src/Projects/BKPresentation/Sources/Common/Constant/BKLayoutSize.swift(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#69
File: src/Projects/BKDesign/PreviewApp/Sources/View/CatalogViewController.swift:57-70
Timestamp: 2025-07-10T14:01:04.933Z
Learning: clxxrlove는 Reed-iOS 프로젝트에서 테스트/데모용 코드와 프로덕션 코드에 대해 다른 코드 품질 기준을 적용한다. 테스트용 뷰에서는 안전성 검증 등의 엄격한 코드 품질 요구사항을 적용하지 않는 것을 선호한다.
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#94
File: src/Projects/BKData/Sources/Repository/DefaultBookRepository.swift:15-40
Timestamp: 2025-07-21T05:16:18.481Z
Learning: clxxrlove는 Reed-iOS 프로젝트에서 기능 구현 시 우선순위를 명확하게 설정한다. 기본 기능 구현을 먼저 완료하고, 에러 처리나 안정성 개선은 이후 단계에서 진행하는 것을 선호한다.
Learnt from: doyeonk429
PR: YAPP-Github/Reed-iOS#68
File: src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift:124-133
Timestamp: 2025-07-10T08:21:49.399Z
Learning: doyeonk429는 테스트 전용으로만 사용되는 extension이나 코드는 해당 테스트 파일에 그대로 두는 것을 선호합니다. 실제 프로덕션 코드에서 사용되지 않는 테스트 전용 코드는 별도 파일로 분리하지 않고 테스트 파일 내에 유지하는 것이 그들의 코드 구성 방식입니다.
Learnt from: doyeonk429
PR: YAPP-Github/Reed-iOS#63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:38-48
Timestamp: 2025-07-08T17:17:40.046Z
Learning: doyeonk429는 BKDesign 프로젝트에서 다크모드 지원 코드를 미래를 위한 사전 준비 코드로 구현하고 있다. 현재 다크모드 디자인이 없어서 모든 다크모드 분기에서 라이트모드 색상을 반환하도록 의도적으로 구현했으며, 나중에 다크모드 디자인이 완성되면 해당 케이스만 구현하면 되는 구조로 설계했다.
Learnt from: doyeonk429
PR: YAPP-Github/Reed-iOS#68
File: src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift:0-0
Timestamp: 2025-07-10T08:21:44.204Z
Learning: doyeonk429는 BKDesign PreviewApp의 테스트 파일에서 주석 처리된 코드를 의도적으로 남겨두어 쉽게 테스트 구성을 전환할 수 있도록 구현한다. 이는 개발 편의성을 위한 것으로, 테스트 파일에서는 일반적인 "주석 처리된 코드 제거" 규칙을 적용하지 않는다.
src/Projects/BKPresentation/Sources/Common/Constant/BKLayoutSize.swift (1)
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/TermsViewModel.swift (1)
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsViewController.swift (1)
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift (1)
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
🧬 Code Graph Analysis (1)
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsItemCell.swift (3)
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift (3)
setupView(65-76)configure(78-85)configure(133-137)src/Projects/BKDesign/Sources/Extensions/UIView+.swift (1)
addSubviews(7-9)src/Projects/BKDesign/Sources/Components/BKLabel.swift (1)
setText(71-74)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (12)
src/Projects/BKPresentation/Sources/Common/Constant/BKLayoutSize.swift (1)
15-15: 상수 추가가 적절합니다.기존 패턴을 잘 따르고 있으며, 44pt는 터치 영역으로 적절한 높이입니다.
src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKSpacing.swift (1)
14-14: 디자인 시스템 확장이 적절합니다.기존 스페이싱 시스템에 중간값을 추가하여 더 세밀한 레이아웃 조정이 가능해집니다.
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsViewController.swift (1)
16-18: 빈 네비게이션 타이틀의 의도 확인이 필요합니다.빈 문자열로 설정된 네비게이션 타이틀이 의도적인 디자인인지 확인해주세요. 약관동의 화면이라면 관련된 타이틀이 있는 것이 사용자 경험에 더 좋을 수 있습니다.
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsItemCell.swift (3)
10-15: 레이아웃 가이드 구성이 잘 되어 있습니다.상수들이 적절히 정리되어 있고, BKSpacing을 활용하여 디자인 시스템과 일관성을 유지하고 있습니다.
44-50: 셀 높이 고정 구현이 적절합니다.
preferredLayoutAttributesFitting을 오버라이드하여 일관된 셀 높이를 보장하는 구현이 좋습니다.
52-77: Auto Layout 설정이 잘 구성되어 있습니다.체크박스, 타이틀 레이블, 그리고 chevron 아이콘의 제약 조건들이 논리적으로 잘 설정되어 있습니다.
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift (6)
9-11: 빈 enum 선언이 적절합니다.향후 이벤트 핸들링을 위한 빈 enum 선언은 UI 우선 구현 단계에서 적절한 접근입니다.
16-25: 레이아웃 상수 정의가 체계적입니다.LayoutGuide enum을 통한 상수 관리가 잘 구성되어 있고, BKSpacing을 활용한 일관된 디자인 시스템 적용이 좋습니다.
44-58: Collection view 설정이 적절합니다.레이아웃 생성, 스크롤 인디케이터 숨김, 선택 비활성화 등의 설정이 약관 리스트 표시에 적합하게 구성되어 있습니다.
62-63: 임시 데이터 처리 방식이 명확합니다.ViewModel로 이전 예정임을 주석으로 명시하여 임시 구현임을 분명히 했습니다.
122-131: UI 설정 메서드가 잘 구현되었습니다.체크박스 활성화, 라벨 텍스트 설정, 테두리 및 모서리 반경 스타일링이 체계적으로 구성되어 있습니다.
133-137: Public 메서드 구현이 적절합니다.외부에서 약관 데이터를 설정할 수 있는 public 메서드와 collection view 리로드 처리가 적절하게 구현되어 있습니다.
| let title: String | ||
| let URL: URL? | ||
|
|
||
| init(title: String, URL: URL? = nil) { |
|
|
||
| import UIKit | ||
|
|
||
| struct TermsViewObject { |
There was a problem hiding this comment.
그것은 뷰모델 + VO 파일이기 때문입니다.... 기능 개발하면서 파일 분리할게용. VO model파일로 따로 분리하겠습니다.ㅇ
🔗 관련 이슈
📘 작업 유형
📙 작업 내역
🧪 테스트 내역
🎨 스크린샷 또는 시연 영상 (선택)
✅ PR 체크리스트
💬 추가 설명 or 리뷰 포인트 (선택)
Summary by CodeRabbit
신규 기능
개선 사항