Skip to content

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

Merged
seoyoon513 merged 8 commits intodevelopfrom
BOOK-112-feature/#33
Jul 9, 2025
Merged

feat: 약관 동의 화면 UI 구현#35
seoyoon513 merged 8 commits intodevelopfrom
BOOK-112-feature/#33

Conversation

@seoyoon513
Copy link
Copy Markdown
Contributor

@seoyoon513 seoyoon513 commented Jul 8, 2025

🔗 관련 이슈

📙 작업 설명

  • feature:login 모듈에서 화면 UI 작업
  • navigate 변경 (기존: login -> home, 변경: login -> termsAgreement -> home)

📸 스크린샷 또는 시연 영상

KakaoTalk_Video_2025-07-09-03-22-25.mp4

💬 추가 설명 or 리뷰 포인트

  • Circuit 적용하다가 자꾸 KSP PROCESSING_ERROR 나서 미쳐버리는줄 알았습니다ㅠ__ㅠ 근데 원인 못찾았습니다.. 여러 AI들에게 사정을 했지만 그들도 몰라요 (지피티한테 처음으로 욕해봄)
  • 해결은... 이미 만들어져 있는 Screen 그대로 복사해서 쓰고 내용물만 바꿨더니 됐습니다 허허
  • 추가로 피그마 무료계정이라 dev모드 미지원으로 정확한 padding값을 적용하지 못한 상태입니다. 방법을 좀 찾아보겠습니다

Summary by CodeRabbit

  • 신규 기능

    • 로그인 성공 후 약관 동의 화면으로 이동하도록 변경되었습니다.
    • 약관 동의 화면이 새롭게 추가되어, 전체 동의, 개별 동의, 상세 보기, 시작 버튼 기능이 제공됩니다.
  • 스타일

    • 로그인 화면의 배경색이 흰색으로 변경되었으며, 버튼의 여백과 높이 스타일이 앱 테마에 맞게 개선되었습니다.
  • 문서화

    • 카카오 로그인 버튼 텍스트가 "카카오로 시작하기"로 변경되었고, 약관 동의 관련 텍스트와 항목들이 추가되었습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 8, 2025

"""

Walkthrough

로그인 성공 시 이동 화면을 약관 동의 화면으로 변경하고, 약관 동의 화면 및 프레젠터를 신규로 구현했습니다. 약관 동의 UI는 체크박스, 약관 목록, 전체 동의, 시작 버튼 등으로 구성되며, 관련 문자열 리소스가 추가되었습니다. 버튼 및 레이아웃 스타일도 일부 수정되었습니다.

Changes

파일/경로 요약 변경 내용 요약
feature/login/LoginPresenter.kt 로그인 성공 시 이동 화면을 HomeScreen에서 TermsAgreementScreen으로 변경, 불필요한 HomeScreen import 제거
feature/login/LoginScreen.kt Column에 흰색 배경 적용, 버튼 패딩을 테마 spacing으로 변경, 불필요한 dp 및 height modifier 제거, 관련 import 수정
feature/login/TermsAgreementPresenter.kt TermsAgreementPresenter 클래스 및 Factory 추가, 약관 동의 상태 관리, 이벤트 핸들링, Hilt/Circuit 주입 처리
feature/login/TermsAgreementScreen.kt TermsAgreementScreen 및 State/Event/Composable 구현, 약관 동의 UI, 체크박스, 리스트, 시작 버튼, 미리보기 추가
feature/login/res/values/strings.xml 카카오 로그인 텍스트 수정, 약관 동의 관련 문자열 및 string-array 추가

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LoginScreen
    participant LoginPresenter
    participant Navigator
    participant TermsAgreementScreen
    participant TermsAgreementPresenter

    User->>LoginScreen: 로그인 시도
    LoginScreen->>LoginPresenter: 로그인 요청
    LoginPresenter->>Navigator: 로그인 성공 시 TermsAgreementScreen으로 이동
    Navigator->>TermsAgreementScreen: 화면 전환
    TermsAgreementScreen->>TermsAgreementPresenter: UI 상태 요청 및 이벤트 처리
    User->>TermsAgreementScreen: 약관 동의/체크/시작 버튼 클릭
    TermsAgreementScreen->>TermsAgreementPresenter: 이벤트 전달
    TermsAgreementPresenter->>Navigator: 시작 버튼 클릭 시 HomeScreen으로 이동
Loading

Assessment against linked issues

Objective Addressed Explanation
약관 동의 화면 UI 작업 (#33)
서비스 이용 약관, 개인정보 처리 방침 등 웹페이지 준비되면 웹뷰로 연결 (#33) Term detail 클릭 시 WebView 연결은 TODO로 남아 있음.

Poem

🐰
로그인 지나 약관의 길,
체크박스 토글에 마음을 실어,
모두 동의하면 시작 버튼이 빛나네!
새 하얀 화면 위,
토끼는 깡충,
약관도 찰칵,
독서의 세계로 출발! 📚✨
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1545cbf and c047329.

📒 Files selected for processing (2)
  • feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementPresenter.kt (1 hunks)
  • feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementScreen.kt (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementPresenter.kt
  • feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementScreen.kt
⏰ 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: ci-build
✨ Finishing Touches
  • 📝 Generate Docstrings

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 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 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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: 1

🧹 Nitpick comments (2)
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementPresenter.kt (2)

25-25: 하드코딩된 리스트 크기를 동적으로 변경하는 것을 고려해보세요.

현재 mutableStateListOf(false, false, false)로 하드코딩되어 있는 크기를 문자열 배열 리소스 크기에 맞춰 동적으로 생성하는 것이 더 유지보수하기 좋겠습니다.

-val agreedTerms = rememberRetained { mutableStateListOf(false, false, false) }
+val agreedTerms = rememberRetained { 
+    mutableStateListOf<Boolean>().apply { 
+        repeat(3) { add(false) } // 또는 리소스에서 실제 크기를 가져와 사용
+    }
+}

55-55: TODO 코멘트를 추적하거나 해결해주세요.

웹뷰 화면 이동 기능이 구현되어야 합니다.

이 기능을 구현하거나 별도 이슈로 추적하는 것을 도와드릴까요?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f49de6 and a834fde.

📒 Files selected for processing (5)
  • feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginPresenter.kt (1 hunks)
  • feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginScreen.kt (4 hunks)
  • feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementPresenter.kt (1 hunks)
  • feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementScreen.kt (1 hunks)
  • feature/login/src/main/res/values/strings.xml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginScreen.kt (1)
Learnt from: seoyoon513
PR: YAPP-Github/Reed-Android#32
File: core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/ButtonColorStyle.kt:10-16
Timestamp: 2025-07-08T12:33:01.863Z
Learning: Reed Android 프로젝트에서 KAKAO 버튼 스타일은 디자이너가 pressed 상태 색상을 별도로 정의하지 않았기 때문에 pressed 상태에서도 동일한 Kakao 색상을 사용한다.
🧬 Code Graph Analysis (1)
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementScreen.kt (5)
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/appbar/ReedTopAppBar.kt (1)
  • ReedBackTopAppBar (86-99)
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/checkbox/SquareCheckBox.kt (1)
  • SquareCheckBox (25-53)
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/ReedButton.kt (1)
  • ReedButton (31-97)
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/checkbox/TickOnlyCheckBox.kt (1)
  • TickOnlyCheckBox (19-33)
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/theme/Theme.kt (1)
  • ReedTheme (14-21)
⏰ 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: ci-build
🔇 Additional comments (8)
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginPresenter.kt (1)

53-53: 새로운 사용자 플로우가 올바르게 구현되었습니다.

로그인 성공 후 약관 동의 화면으로 이동하는 내비게이션 변경이 적절합니다.

feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/LoginScreen.kt (2)

66-68: UI 개선이 적절합니다.

배경색 추가와 fillMaxSize 수정자 사용이 올바르게 구현되었습니다.


83-87: 테마 스페이싱 사용으로 일관성이 향상되었습니다.

하드코딩된 패딩 값을 테마 스페이싱으로 변경한 것이 디자인 시스템 일관성 측면에서 좋은 개선입니다.

feature/login/src/main/res/values/strings.xml (1)

3-11: 문자열 리소스가 적절하게 추가되었습니다.

카카오 로그인 버튼 텍스트 변경과 약관 동의 화면을 위한 새로운 문자열 리소스들이 잘 구성되어 있습니다.

feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementPresenter.kt (1)

28-61: 이벤트 핸들링 로직이 잘 구현되었습니다.

전체 동의와 개별 약관 동의 간의 상태 동기화 로직이 올바르게 작동합니다.

feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementScreen.kt (3)

60-149: 전체적인 UI 구현이 잘 되어 있습니다.

화면 구조와 컴포넌트 사용이 적절하며, 디자인 시스템을 올바르게 활용하고 있습니다.


151-189: 개별 약관 항목 컴포넌트가 적절하게 구현되었습니다.

체크박스, 텍스트, 네비게이션 아이콘이 포함된 항목 구성이 잘 되어 있습니다.


119-130: 인덱스 범위 검증 필요: state.agreedTerms[index] 사용 시

Compose 함수 termsTitles.forEachIndexed { index, title -> … } 내에서
state.agreedTerms[index] 호출은 termsTitlesagreedTerms 크기가 다를 경우 예외를 발생시킬 수 있습니다. 다음 사항을 확인해주세요:

termsTitles(string-array 리소스)와 state.agreedTerms 리스트의 크기가 항상 일치하는지
• ViewModel 또는 상태 생성 로직에서 termsTitles.size 기반으로 agreedTerms를 초기화하고 있는지
• 필요 시 state.agreedTerms.getOrElse(index) { false } 또는 termsTitles.zip(state.agreedTerms) 등을 사용해 인덱스를 안전하게 처리

리소스 항목 수 확인 예시:

rg -A10 "terms_agreement_items" feature/login/src/main/res/values/strings.xml

state.eventSink(TermsAgreementScreen.Event.OnTermItemClick(index))
},
onDetailClick = {
state.eventSink(TermsAgreementScreen.Event.OnTermDetailClick(""))
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot Jul 8, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue

URL 파라미터가 빈 문자열로 전달되고 있습니다.

약관 상세 페이지로의 이동 시 실제 URL이 전달되어야 합니다.

-state.eventSink(TermsAgreementScreen.Event.OnTermDetailClick(""))
+state.eventSink(TermsAgreementScreen.Event.OnTermDetailClick(getTermsUrl(index)))

또는 URL을 별도로 관리하는 방식을 고려해보세요.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In
feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementScreen.kt
at line 127, the event OnTermDetailClick is being triggered with an empty string
as the URL parameter. Replace the empty string with the actual URL of the terms
detail page or implement a mechanism to manage and pass the correct URL
dynamically when invoking this event.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

아직 url이 정해지지 않아서 임시로 넣었어

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@seoyoon513 이해했습니다! URL이 아직 정해지지 않았다면 임시로 빈 문자열을 사용하는 것이 합리적입니다.

나중에 추적하기 쉽도록 TODO 주석을 추가하는 것을 고려해보세요:

onDetailClick = {
    // TODO: Replace with actual terms URL once decided
    state.eventSink(TermsAgreementScreen.Event.OnTermDetailClick(""))
},

URL이 정해지면 해당 부분을 업데이트하시면 됩니다.


✏️ Learnings added
Learnt from: seoyoon513
PR: YAPP-Github/Reed-Android#35
File: feature/login/src/main/kotlin/com/ninecraft/booket/feature/login/TermsAgreementScreen.kt:127-127
Timestamp: 2025-07-09T01:14:29.825Z
Learning: In the Reed-Android project's TermsAgreementScreen.kt, the OnTermDetailClick event is intentionally passed an empty string for the URL parameter because the actual URLs for terms detail pages haven't been decided yet. This is a temporary implementation that will be updated once the URLs are finalized.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@easyhooon
Copy link
Copy Markdown
Contributor

해결은... 이미 만들어져 있는 Screen 그대로 복사해서 쓰고 내용물만 바꿨더니 됐습니다 허허

이거 재현만 할수있으면 문제 해결할 수 있을것같은데,, 아마 @CircuitInject와 같은 어노테이션을 빼먹고 넣지 않았던가 그런쪽의 문제일것같은

@easyhooon
Copy link
Copy Markdown
Contributor

추가로 피그마 무료계정이라 dev모드 미지원으로 정확한 padding값을 적용하지 못한 상태입니다. 방법을 좀 찾아보겠습니다

이 부분 정확하게 어떤 부분 문제인건지 확인해볼 필요가 있을 듯요

@seoyoon513
Copy link
Copy Markdown
Contributor Author

seoyoon513 commented Jul 9, 2025

해결은... 이미 만들어져 있는 Screen 그대로 복사해서 쓰고 내용물만 바꿨더니 됐습니다 허허

이거 재현만 할수있으면 문제 해결할 수 있을것같은데,, 아마 @CircuitInject와 같은 어노테이션을 빼먹고 넣지 않았던가 그런쪽의 문제일것같은

오히려 Screen쪽 UI Composable에 @CircuitInject(TermsAgreementScreen::class, ActivityRetainedComponent::class)을 제거하니까 KSP PROCESSING_ERROR 없이 빌드 됐는데 Route not available: TermsAgreementScreen 터짐요

지훈 블로그 발췌

image

modifier와 같은 변경사항이 잦은 파라미터는 default parameter를 가진 파라미터 중 가장 첫 순서로 배치하는 것이 좋다 (modifier 값만 넘기고 뒤의 default값 생략 가능하기 때문)
가독성, 일관성을 위해 Text 컴포저블 내부 파라미터 순서와 동일하게 수정
Copy link
Copy Markdown
Contributor

@easyhooon easyhooon left a comment

Choose a reason for hiding this comment

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

Good!

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-112/feat] 약관 동의 화면 UI 구현

2 participants