feat: 약관 동의 화면 UI 구현#35
Conversation
|
""" Walkthrough로그인 성공 시 이동 화면을 약관 동의 화면으로 변경하고, 약관 동의 화면 및 프레젠터를 신규로 구현했습니다. 약관 동의 UI는 체크박스, 약관 목록, 전체 동의, 시작 버튼 등으로 구성되며, 관련 문자열 리소스가 추가되었습니다. 버튼 및 레이아웃 스타일도 일부 수정되었습니다. Changes
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으로 이동
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ 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)
✨ Finishing Touches
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
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
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
📒 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]호출은termsTitles와agreedTerms크기가 다를 경우 예외를 발생시킬 수 있습니다. 다음 사항을 확인해주세요:•
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("")) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
아직 url이 정해지지 않아서 임시로 넣었어
There was a problem hiding this comment.
@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.
이거 재현만 할수있으면 문제 해결할 수 있을것같은데,, 아마 @CircuitInject와 같은 어노테이션을 빼먹고 넣지 않았던가 그런쪽의 문제일것같은 |
이 부분 정확하게 어떤 부분 문제인건지 확인해볼 필요가 있을 듯요 |
modifier와 같은 변경사항이 잦은 파라미터는 default parameter를 가진 파라미터 중 가장 첫 순서로 배치하는 것이 좋다 (modifier 값만 넘기고 뒤의 default값 생략 가능하기 때문)
가독성, 일관성을 위해 Text 컴포저블 내부 파라미터 순서와 동일하게 수정

🔗 관련 이슈
📙 작업 설명
📸 스크린샷 또는 시연 영상
KakaoTalk_Video_2025-07-09-03-22-25.mp4
💬 추가 설명 or 리뷰 포인트
KSP PROCESSING_ERROR나서 미쳐버리는줄 알았습니다ㅠ__ㅠ 근데 원인 못찾았습니다.. 여러 AI들에게 사정을 했지만 그들도 몰라요 (지피티한테 처음으로 욕해봄)Summary by CodeRabbit
신규 기능
스타일
문서화