-
Notifications
You must be signed in to change notification settings - Fork 1
[Feature/#185] quiz 바텀 네비, 일부 화면 #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tion in main graph
Walkthrough퀴즈 기능을 위한 새로운 하단 탭을 추가하고, 디자인 시스템에 공유 컴포넌트( Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MainActivity
participant BottomNav as Bottom Navigation
participant QuizFragment
participant QuizMainScreen
participant Compose as Compose UI
User->>MainActivity: 앱 시작
MainActivity->>BottomNav: 네비게이션 메뉴 초기화<br/>(Quiz 아이콘 포함)
BottomNav-->>MainActivity: 메뉴 구성 완료
User->>BottomNav: Quiz 탭 선택
BottomNav->>MainActivity: graph_quiz 네비게이션 요청
MainActivity->>QuizFragment: QuizFragment 인스턴스화
QuizFragment->>Compose: initComposeView() 호출
Compose->>QuizMainScreen: WableTheme 내에서 렌더링
QuizMainScreen-->>Compose: UI 구성<br/>(타이머, 점 표시자, 요청 버튼)
Compose-->>User: Quiz 화면 표시
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 사유: 새로운 기능 모듈(8개 파일) 추가, 다중 기존 모듈 수정, 공유 컴포넌트 도입, 네비게이션 로직 변경 등 혼합된 복잡도. 구조적 변경이 여러 영역에 걸쳐 있으나 각 변경은 명확한 목적을 가짐. Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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 (3)
feature/quiz/src/main/AndroidManifest.xml (1)
1-4: 빈 manifest의 향후 확장성 검토현재 manifest는 최소한의 구조로 구성되어 있습니다. 새로운 기능이 추가될 때 필요한 컴포넌트(Activity, Service, Fragment 등)나 권한 선언이 이곳에 추가될 예정인지 확인이 필요합니다. 향후 유지보수성을 위해 필요한 선언들이 적절히 구조화되도록 계획해 주세요.
feature/quiz/src/main/java/com/teamwable/quiz/QuizMainScreen.kt (2)
63-66: repeat(2) 사용 명확성 개선 제안현재 구현은 동작하지만, 점(dot) 2개를 생성하는 의도가 명확하지 않습니다. 더 명시적인 코드를 고려해보세요.
- repeat(2) { - Spacer(modifier = Modifier.height(16.dp)) - WableDot() - } + Spacer(modifier = Modifier.height(16.dp)) + WableDot() + Spacer(modifier = Modifier.height(16.dp)) + WableDot()또는 점의 개수가 동적이라면:
val dotCount = 2 repeat(dotCount) { Spacer(modifier = Modifier.height(16.dp)) WableDot() }
77-82: BoardRequestButton의 onClick 핸들러 구현 필요onClick 핸들러가 비어있습니다. PR 설명에서 언급하신 것처럼 진행 중인 작업으로 보입니다.
이 부분의 구현을 추적하기 위한 이슈를 생성하시겠습니까?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
feature/quiz/src/main/res/drawable/img_quiz_before.pngis excluded by!**/*.pngfeature/quiz/src/main/res/drawable/img_quiz_time.pngis excluded by!**/*.png
📒 Files selected for processing (27)
core/common/src/main/res/drawable/ic_bnv_quiz_active.xml(1 hunks)core/common/src/main/res/drawable/ic_bnv_quiz_inactive.xml(1 hunks)core/common/src/main/res/drawable/ic_quiz_appbar.xml(1 hunks)core/designsystem/src/main/java/com/teamwable/designsystem/component/button/WableBoardRequestButton.kt(1 hunks)core/designsystem/src/main/java/com/teamwable/designsystem/component/dot/WableDot.kt(1 hunks)core/designsystem/src/main/res/values-ko/strings.xml(1 hunks)core/designsystem/src/main/res/values/strings.xml(1 hunks)core/ui/src/main/java/com/teamwable/ui/type/AppBarType.kt(1 hunks)core/ui/src/main/res/values/attrs.xml(1 hunks)core/ui/src/main/res/values/strings.xml(1 hunks)feature/community/src/main/java/com/teamwable/community/CommunityScreen.kt(2 hunks)feature/community/src/main/res/values/strings.xml(0 hunks)feature/main/build.gradle.kts(1 hunks)feature/main/src/main/java/com/teamwable/main/MainActivity.kt(2 hunks)feature/main/src/main/res/drawable/sel_main_bnv_quiz.xml(1 hunks)feature/main/src/main/res/menu/menu_main_navigation.xml(1 hunks)feature/main/src/main/res/navigation/graph_main.xml(1 hunks)feature/main/src/main/res/values/strings.xml(1 hunks)feature/quiz/.gitignore(1 hunks)feature/quiz/build.gradle.kts(1 hunks)feature/quiz/src/main/AndroidManifest.xml(1 hunks)feature/quiz/src/main/java/com/teamwable/quiz/QuizFragment.kt(1 hunks)feature/quiz/src/main/java/com/teamwable/quiz/QuizMainScreen.kt(1 hunks)feature/quiz/src/main/res/layout/fragment_quiz.xml(1 hunks)feature/quiz/src/main/res/navigation/graph_quiz.xml(1 hunks)feature/quiz/src/main/res/values/strings.xml(1 hunks)settings.gradle.kts(1 hunks)
💤 Files with no reviewable changes (1)
- feature/community/src/main/res/values/strings.xml
🧰 Additional context used
🧬 Code graph analysis (5)
feature/quiz/src/main/java/com/teamwable/quiz/QuizMainScreen.kt (3)
core/designsystem/src/main/java/com/teamwable/designsystem/component/dot/WableDot.kt (1)
WableDot(16-27)core/designsystem/src/main/java/com/teamwable/designsystem/component/button/WableBoardRequestButton.kt (1)
BoardRequestButton(13-24)core/designsystem/src/main/java/com/teamwable/designsystem/theme/Theme.kt (1)
WableTheme(54-65)
feature/quiz/src/main/java/com/teamwable/quiz/QuizFragment.kt (2)
core/designsystem/src/main/java/com/teamwable/designsystem/theme/Theme.kt (1)
WableTheme(54-65)feature/quiz/src/main/java/com/teamwable/quiz/QuizMainScreen.kt (1)
QuizMainScreen(28-85)
feature/community/src/main/java/com/teamwable/community/CommunityScreen.kt (1)
core/designsystem/src/main/java/com/teamwable/designsystem/component/button/WableBoardRequestButton.kt (1)
BoardRequestButton(13-24)
core/designsystem/src/main/java/com/teamwable/designsystem/component/dot/WableDot.kt (1)
core/designsystem/src/main/java/com/teamwable/designsystem/theme/Theme.kt (1)
WableTheme(54-65)
core/designsystem/src/main/java/com/teamwable/designsystem/component/button/WableBoardRequestButton.kt (1)
core/designsystem/src/main/java/com/teamwable/designsystem/component/button/WableButton.kt (1)
WableAnnotatedTextButton(91-111)
🔇 Additional comments (32)
feature/quiz/src/main/AndroidManifest.xml (1)
2-2:<manifest>요소에서package속성 확인 필요현재 manifest의
<manifest>루트 요소에package속성이 없습니다. 이것이 의도된 것인지 확인이 필요합니다:
- 동적 기능 모듈(dynamic feature module)인 경우: Gradle 설정에서 package를 상속받으므로 속성이 불필요할 수 있습니다.
- 일반 기능 모듈인 경우: 명시적으로 package 속성을 선언하는 것이 권장됩니다.
모듈 유형 및 Gradle 빌드 구성을 확인하여
package속성이 필요한지 검증해 주세요.feature/quiz/.gitignore (1)
1-1: 표준 빌드 디렉토리 제외 규칙입니다.Android 모듈의 표준적인 gitignore 패턴으로 문제가 없습니다.
feature/quiz/build.gradle.kts (1)
1-19: 퀴즈 기능 모듈 설정이 적절합니다.플러그인 구성과 의존성이 Compose UI 및 Navigation을 사용하는 기능 모듈에 적합합니다. 네임스페이스도 일관성이 있습니다.
core/designsystem/src/main/java/com/teamwable/designsystem/component/dot/WableDot.kt (1)
16-27: 재사용 가능한 Dot 컴포넌트가 잘 구현되었습니다.기본값 설정이 적절하고, 간단하면서도 명확한 구현입니다. Preview도 포함되어 개발 시 유용합니다.
core/designsystem/src/main/java/com/teamwable/designsystem/component/button/WableBoardRequestButton.kt (1)
1-24: 디자인 시스템으로의 컴포넌트 이동이 적절합니다.공통 버튼 컴포넌트를
feature/community에서core/designsystem으로 이동하여 재사용성을 높인 좋은 리팩토링입니다.getAnnotatedString()을@Composable로 변경한 것도stringResource()사용을 위해 올바른 접근입니다.feature/community/src/main/java/com/teamwable/community/CommunityScreen.kt (2)
34-34: 공유 컴포넌트 사용으로 코드가 간결해졌습니다.디자인 시스템의
BoardRequestButton을 사용하여 버튼 스타일링 로직을 위임하고 코드 중복을 제거했습니다.
98-101: 버튼 구현이 올바르게 업데이트되었습니다.
BoardRequestButton을 사용하면서 modifier를 통해 패딩을 전달하는 방식이 적절합니다.settings.gradle.kts (1)
47-47: 새 퀴즈 모듈이 프로젝트에 정상적으로 추가되었습니다.모듈 추가 위치가 적절하며, 다른 feature 모듈들과 일관성이 있습니다.
core/common/src/main/res/drawable/ic_bnv_quiz_active.xml (1)
1-9: 퀴즈 활성 상태 아이콘이 적절합니다.벡터 드로어블 구조가 올바르고, 크기(22dp)가 다른 하단 네비게이션 아이콘과 일치합니다. 활성 상태의 검은색 표시도 적절합니다.
feature/main/src/main/res/navigation/graph_main.xml (2)
14-14: ViewIt 관련 코드 제거 여부를 명확히 해주세요.PR 설명에서 "뷰잇 연결 제거"를 언급하셨고, 리뷰어에게 ViewIt 관련 코드 제거 여부를 물어보셨는데,
graph_view_it이 여전히 포함되어 있습니다.의도적으로 남겨두신 건지, 아니면 제거가 필요한지 확인이 필요합니다.
16-16: 퀴즈 네비게이션 그래프가 정상적으로 추가되었습니다.새로운 퀴즈 기능의 네비게이션 그래프가 메인 그래프에 올바르게 포함되었습니다.
feature/main/src/main/res/drawable/sel_main_bnv_quiz.xml (1)
1-5: 선택기 구조가 올바릅니다.상태별 아이콘 전환이 적절히 구성되어 있습니다.
core/ui/src/main/res/values/strings.xml (1)
72-72: 문자열 리소스 명명 규칙이 일관되게 유지됩니다.기존 앱 바 라벨과 동일한 패턴(label_app_bar_*)으로 구성되어 있습니다.
feature/quiz/src/main/res/navigation/graph_quiz.xml (1)
1-14: 네비게이션 그래프 구조가 올바릅니다.시작 목적지 설정과 프래그먼트 바인딩이 적절하게 구성되어 있습니다.
feature/main/build.gradle.kts (1)
31-31: 퀴즈 모듈 의존성이 올바르게 추가되었습니다.다른 기능 모듈 의존성과 일관된 방식으로 선언되어 있습니다.
feature/main/src/main/java/com/teamwable/main/MainActivity.kt (2)
168-170: ViewIt 네비게이션 참조 변경의 의도를 명확히 해주세요.Line 169에서
viewitR.id.graph_view_it을 사용하도록 변경되었는데, PR 설명에서 "뷰잇 연결 제거"(remove ViewIt connection)를 언급한 점과 모순됩니다. 이 메서드를 유지해야 하는지, 아니면 완전히 제거해야 하는지 확인이 필요합니다. 또한 viewit 모듈에서 실제로graph_view_it리소스를 내보내는지 검증해주세요.
216-216: 퀴즈 네비게이션 상태 바 색상 설정이 적절합니다.다른 유사한 목적지들과 일관되게 다크 상태 바 목적지 집합에 포함되어 있습니다.
core/common/src/main/res/drawable/ic_quiz_appbar.xml (1)
1-9: 퀴즈 앱 바 아이콘이 디자인 시스템과 일관되게 정의되었습니다.크기(32dp), 색상(#8F4BFF), 그리고 아이콘 디자인이 모두 적절합니다.
feature/quiz/src/main/res/values/strings.xml (1)
3-3: 퀴즈 모듈 문자열 리소스가 올바르게 정의되었습니다.기능별 문자열 명명 규칙(str_*)을 따르고 있으며, 한국어 텍스트와 줄 바꿈이 적절합니다.
core/common/src/main/res/drawable/ic_bnv_quiz_inactive.xml (1)
1-9: 비활성화 퀴즈 아이콘이 디자인 표준을 따릅니다.크기(22dp), 회색 색상(#CCCCCC), 그리고 활성 아이콘과의 일관성이 모두 적절합니다.
feature/main/src/main/res/values/strings.xml (1)
11-11: LGTM!퀴즈 탭을 위한 문자열 리소스가 올바르게 추가되었습니다. 네이밍 컨벤션도 기존 패턴을 따르고 있습니다.
core/ui/src/main/res/values/attrs.xml (1)
8-8: LGTM!AppBarBlack 속성에 퀴즈 enum 값이 올바르게 추가되었습니다. 순차적인 번호 부여(0-3)도 적절합니다.
core/designsystem/src/main/res/values/strings.xml (1)
60-62: 공유 컴포넌트 리소스 중앙화 잘 되었습니다!커뮤니티 플로팅 버튼 관련 문자열 리소스를 디자인 시스템으로 이동한 것은 좋은 접근입니다. 여러 피처 모듈에서 재사용 가능하도록 개선되었습니다.
core/designsystem/src/main/res/values-ko/strings.xml (1)
60-62: LGTM!한국어 로케일 리소스가 기본 리소스와 일관되게 추가되었습니다.
feature/quiz/src/main/res/layout/fragment_quiz.xml (2)
7-14: AppBar 설정이 올바르게 구성되었습니다!AppbarBlack의 type 속성이 attrs.xml에 정의된 enum 값("퀴즈")을 올바르게 참조하고 있습니다. Android는 이를 자동으로 해당 int 값(3)으로 매핑합니다.
16-23: LGTM!ComposeView가 올바르게 구성되었습니다. AppBar 하단의 전체 공간을 채우도록 제약 조건이 적절히 설정되었습니다.
core/ui/src/main/java/com/teamwable/ui/type/AppBarType.kt (1)
27-31: LGTM!QUIZ AppBarType이 기존 패턴과 일관되게 추가되었습니다. 리소스 참조와 파라미터 설정이 모두 적절합니다.
feature/quiz/src/main/java/com/teamwable/quiz/QuizMainScreen.kt (2)
28-43: 레이아웃 구조가 깔끔합니다!Column 구성과 타이틀 텍스트가 테마 리소스를 적절히 활용하여 잘 구현되었습니다.
87-93: LGTM!Preview 구성이 올바르게 설정되었습니다. WableTheme으로 감싸서 실제 앱과 동일한 테마로 프리뷰할 수 있습니다.
feature/quiz/src/main/java/com/teamwable/quiz/QuizFragment.kt (2)
9-13: LGTM!QuizFragment가 Hilt DI 및 BindingFragment 패턴을 올바르게 따르고 있습니다. 구조가 깔끔합니다.
15-24: Compose 통합이 모범 사례를 따릅니다!ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed 사용으로 Fragment의 View 라이프사이클에 맞춰 Composition이 적절히 dispose되어 메모리 누수를 방지합니다. WableTheme으로 일관된 테마를 적용한 것도 좋습니다.
feature/main/src/main/res/menu/menu_main_navigation.xml (1)
11-14: 모든 퀴즈 네비게이션 리소스가 올바르게 정의되었습니다.검증 결과:
- ✓ 문자열 리소스:
feature/main/src/main/res/values/strings.xml:11에label_bnv_quiz정의됨- ✓ 드로어블 리소스:
sel_main_bnv_quiz.xml이drawable및drawable-v21디렉터리에 존재- ✓ 네비게이션 그래프:
graph_quiz.xml이 정의되고graph_main.xml에 포함됨XML 구조는 올바르고, 기존 메뉴 항목(홈, 커뮤니티, 뉴스, 프로필)과 일관된 패턴을 따릅니다.
| Text( | ||
| text = "99:99", | ||
| textAlign = TextAlign.Center, | ||
| fontSize = 88.sp, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
하드코딩된 타이머 값 개선 필요
타이머 텍스트 "99:99"와 fontSize 88.sp가 하드코딩되어 있습니다. 실제 타이머 기능 구현 시 다음을 권장합니다:
- 타이머 값을 State 또는 파라미터로 전달
- 가능하다면 fontSize도 디자인 시스템의 타이포그래피 스타일 활용 고려
다음과 같이 개선할 수 있습니다:
@Composable
-fun QuizMainScreen() {
+fun QuizMainScreen(
+ timerText: String = "99:99"
+) {
// ...
Text(
- text = "99:99",
+ text = timerText,
textAlign = TextAlign.Center,
fontSize = 88.sp,
)Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In feature/quiz/src/main/java/com/teamwable/quiz/QuizMainScreen.kt around lines
57 to 61, the timer Text composable currently uses a hardcoded string "99:99"
and a hardcoded fontSize of 88.sp; replace the hardcoded timer with a value
passed in as a parameter or backed by Compose State (e.g., a state/Flow/LiveData
that formats minutes:seconds) and bind the Text to that state, and replace the
hardcoded 88.sp with your app’s typography style (or a dimension resource) so
the size comes from the design system (preserve TextAlign.Center and other
modifiers).
sohyun127
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!! 👍👍👍👍
메인액티비티의 뷰잇 관련 코드 지우는게 좋아보여요!!
제 pr에서 소식 레드닷 때문에 메인엑티비티 건드려야 해서 그때 같이 지워두겠습니다~!
✅ 𝗖𝗵𝗲𝗰𝗸-𝗟𝗶𝘀𝘁
📌 𝗜𝘀𝘀𝘂𝗲𝘀
📎𝗪𝗼𝗿𝗸 𝗗𝗲𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻
📷 𝗦𝗰𝗿𝗲𝗲𝗻𝘀𝗵𝗼𝘁
💬 𝗧𝗼 𝗥𝗲𝘃𝗶𝗲𝘄𝗲𝗿𝘀
겹치는 부분이 생길 것 같아 완료 된것 까지 우선 PR올립니다!
메인액티비티의 뷰잇 관련 코드는 지울까요? 놔둘까요?
Summary by CodeRabbit
릴리스 노트
새로운 기능
Chores