Skip to content

feat: 약관동의 화면 UI만 구현#98

Merged
doyeonk429 merged 13 commits into
developfrom
BOOK-134-feature/#82
Jul 22, 2025
Merged

feat: 약관동의 화면 UI만 구현#98
doyeonk429 merged 13 commits into
developfrom
BOOK-134-feature/#82

Conversation

@doyeonk429
Copy link
Copy Markdown
Member

@doyeonk429 doyeonk429 commented Jul 21, 2025

🔗 관련 이슈

📘 작업 유형

  • ✨ Feature (기능 추가)
  • 🐞 Bugfix (버그 수정)
  • 🔧 Refactor (코드 리팩토링)
  • ⚙️ Chore (환경 설정)
  • 📝 Docs (문서 작성 및 수정)
  • ✅ Test (기능 테스트)
  • 🎨 style (코드 스타일 수정)

📙 작업 내역

  • 약관동의 화면 UI 구현
  • 기능 연결 안함, 아이콘만 있는 체크박스 대신 임시 체크박스 사용

🧪 테스트 내역

  • 브라우저/기기에서 동작 확인
  • 엣지 케이스 테스트 완료
  • 기존 기능 영향 없음

🎨 스크린샷 또는 시연 영상 (선택)

기능 미리보기 기능 미리보기
기능 설명 기능 설명

✅ PR 체크리스트

  • 커밋 메시지가 명확합니다
  • PR 제목이 컨벤션에 맞습니다
  • 관련 이슈 번호를 작성했습니다
  • 기능이 정상적으로 작동합니다
  • 불필요한 코드를 제거했습니다

💬 추가 설명 or 리뷰 포인트 (선택)

  • 기능 구현하면서 체크박스도 수정하겠습니다..

Summary by CodeRabbit

  • 신규 기능

    • 약관 동의 화면(TermsView) 및 약관 항목 셀(TermsItemCell)이 추가되었습니다.
    • 약관 동의 화면을 위한 TermsViewController가 도입되었습니다.
    • 약관 정보를 담는 TermsViewObject 구조체가 추가되었습니다.
  • 개선 사항

    • 새로운 간격 값(spacing7: 28)과 약관 셀 높이(termsCell: 44)가 추가되어 레이아웃 옵션이 확장되었습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 21, 2025

Caution

Review failed

The pull request is closed.

"""

Walkthrough

이번 변경에서는 약관동의 뷰(terms agreement view)와 관련된 새로운 UI 컴포넌트, 뷰 컨트롤러, 뷰 모델, 그리고 관련 상수들이 추가되었습니다. 약관 리스트 셀, 약관 리스트 뷰, 뷰 컨트롤러, 뷰 오브젝트 구조체, 레이아웃 및 스페이싱 상수 정의가 포함됩니다.

Changes

파일 그룹 변경 요약
src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKSpacing.swift BKSpacing enum에 spacing7(28) 상수 추가
src/Projects/BKPresentation/Sources/Common/Constant/BKLayoutSize.swift BKLayoutSize.Height enum에 termsCell(44) 상수 추가
src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/TermsViewModel.swift TermsViewObject 구조체 및 초기화 메서드 추가
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsItemCell.swift 약관 셀(TermsItemCell) 클래스 신규 추가
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift 약관 리스트 뷰(TermsView) 및 관련 레이아웃, configure 메서드 추가
src/Projects/BKPresentation/Sources/AuthFlow/View/TermsViewController.swift 약관동의 뷰 컨트롤러(TermsViewController) 신규 추가

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TermsViewController
    participant TermsView
    participant TermsItemCell

    User->>TermsViewController: 화면 진입
    TermsViewController->>TermsView: 뷰 로드 및 configure(terms:)
    TermsView->>TermsItemCell: 셀별 configure(vo)
Loading

Estimated code review effort

2 (10–30분)

Possibly related PRs

Suggested reviewers

  • clxxrlove
    """

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f1a0d0f and f933bcc.

📒 Files selected for processing (3)
  • 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/ViewModel/TermsViewModel.swift (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BOOK-134-feature/#82

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or @coderabbitai 요약 to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a11976b and f1a0d0f.

📒 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 리로드 처리가 적절하게 구현되어 있습니다.

Comment thread src/Projects/BKPresentation/Sources/AuthFlow/View/TermsItemCell.swift Outdated
Comment thread src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift
Comment thread src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift
Comment thread src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift
Comment thread src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/TermsViewModel.swift Outdated
Copy link
Copy Markdown
Member

@clxxrlove clxxrlove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다 ~

let title: String
let URL: URL?

init(title: String, URL: URL? = nil) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개행 !


import UIKit

struct TermsViewObject {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

파일 이름이랑 객체 이름이 다르네용

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그것은 뷰모델 + VO 파일이기 때문입니다.... 기능 개발하면서 파일 분리할게용. VO model파일로 따로 분리하겠습니다.ㅇ

@doyeonk429 doyeonk429 merged commit ebf5be1 into develop Jul 22, 2025
1 of 2 checks passed
@doyeonk429 doyeonk429 deleted the BOOK-134-feature/#82 branch July 22, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOOK-134/feat] 약관동의 뷰 구현

2 participants