[Feature] 신규 메인 화면 컴포넌트 구현 - #1499
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
Walkthrough홈 화면 리디자인을 위한 Compose UI 컴포넌트와 자산을 추가합니다: 기초 칩/아이콘, 소/중/대형 카드, 섹션 레이아웃, 다이닝 페이저(데이터 모델·인디케이터 포함), 셔틀 카드, 벡터 드로어블 및 문자열 리소스가 포함됩니다. 변경 사항홈 화면 UI 컴포넌트 시스템
Sequence DiagramsequenceDiagram
participant User
participant DiningPager
participant HorizontalPager
participant DiningPagerContent
participant DiningPagerIndicator
User->>DiningPager: 전달된 DiningPagerData 리스트
DiningPager->>HorizontalPager: pagerState로 페이지 렌더링
HorizontalPager->>DiningPagerContent: 각 페이지 본문 렌더링
DiningPager->>DiningPagerIndicator: 인디케이터 생성 및 상태 전달
User->>DiningPagerIndicator: 인디케이터 클릭
DiningPagerIndicator->>HorizontalPager: animateScrollToPage(targetPage)
예상 코드 리뷰 난이도🎯 3 (Moderate) | ⏱️ ~25 분 추천 리뷰어
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Actionable comments posted: 2
🧹 Nitpick comments (5)
feature/home/src/main/res/values/strings.xml (1)
8-8: 💤 Low value칼로리 단위 표기 시 가독성 개선을 고려해보세요.
현재
"%1$dkcal"형식은 숫자와 단위 사이에 공백이 없어 가독성이 다소 떨어질 수 있습니다."%1$d kcal"처럼 공백을 추가하면 더 읽기 편한 UI를 제공할 수 있습니다.참고: SonarCloud의 복수형 경고는 한국어 맥락에서는 해당되지 않으므로 무시해도 됩니다.
선택적 개선안
- <string name="dining_kcal">%1$dkcal</string> + <string name="dining_kcal">%1$d kcal</string>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@feature/home/src/main/res/values/strings.xml` at line 8, The string resource dining_kcal currently formats without a space ("%1$dkcal"), hurting readability; update the value of the string resource named dining_kcal to include a space between the numeric placeholder and the unit (e.g., change to "%1$d kcal") so the UI displays "123 kcal" instead of "123kcal".feature/home/src/main/java/in/koreatech/koin/feature/home/component/LargeHomeCard.kt (1)
52-58: ⚡ Quick winLargeHomeCard 시그니처도 동일 규칙으로 정렬이 필요합니다.
label,description이modifier뒤의 기본값 없는 파라미터로 선언되어 있습니다.= null기본값을 주고 기본값 파라미터 섹션으로 두는 방식으로 통일해 주세요.As per coding guidelines
feature/**: "@Composable함수의 파라미터는 기본값이 없는 필수 파라미터, modifier, 기본값이 있는 파라미터 순서로 선언".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@feature/home/src/main/java/in/koreatech/koin/feature/home/component/LargeHomeCard.kt` around lines 52 - 58, LargeHomeCard function signature places nullable parameters label and description before modifier without default values; change their declarations to provide = null and reorder parameters to follow the convention (required params, modifier, params with defaults). Update the LargeHomeCard signature so title and icon remain first, then modifier: Modifier = Modifier, then label: (`@Composable` () -> Unit)? = null and description: (`@Composable` () -> Unit)? = null (colors can remain with its default), ensuring parameter order and defaulting follow the project's composable parameter rules.feature/home/src/main/java/in/koreatech/koin/feature/home/component/HomeSection.kt (1)
23-27: ⚡ Quick win
content슬롯 위치를modifier앞(필수 파라미터 블록)으로 이동해주세요.현재
content는 기본값이 없는 필수 람다인데modifier뒤에 배치되어 있습니다. 선언 순서를 규칙에 맞게 조정해 주세요.As per coding guidelines
feature/**: "@Composable함수의 파라미터는 기본값이 없는 필수 파라미터, modifier, 기본값이 있는 파라미터 순서로 선언".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@feature/home/src/main/java/in/koreatech/koin/feature/home/component/HomeSection.kt` around lines 23 - 27, The HomeSection composable currently declares the required lambda parameter content after modifier; reorder parameters to follow the guideline (required params, modifier, optional params) by moving the content: `@Composable` () -> Unit parameter before modifier: Modifier = Modifier so the signature reads with text and more and content as required params, then modifier, then any defaulted params.feature/home/src/main/java/in/koreatech/koin/feature/home/component/MediumHomeCard.kt (1)
52-59: ⚡ Quick win파라미터 블록을 필수/Modifier/기본값 순서로 맞춰주세요.
label,description,actionButton이 현재는 기본값 없이modifier뒤에 있어 규칙 위반입니다.= null을 부여해 기본값 파라미터 그룹으로 정리해 주세요.As per coding guidelines `feature/**`: "`@Composable` 함수의 파라미터는 기본값이 없는 필수 파라미터, modifier, 기본값이 있는 파라미터 순서로 선언".예시 수정안
fun MediumHomeCard( title: `@Composable` () -> Unit, icon: `@Composable` () -> Unit, modifier: Modifier = Modifier, - label: (`@Composable` () -> Unit)?, - description: (`@Composable` () -> Unit)?, - actionButton: (`@Composable` () -> Unit)?, + label: (`@Composable` () -> Unit)? = null, + description: (`@Composable` () -> Unit)? = null, + actionButton: (`@Composable` () -> Unit)? = null, colors: MediumHomeCardColors = MediumHomeCardDefaults.colors(),🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@feature/home/src/main/java/in/koreatech/koin/feature/home/component/MediumHomeCard.kt` around lines 52 - 59, The MediumHomeCard composable parameter order violates the project rule: put non-default required params first, then modifier, then params with defaults; update the signature of MediumHomeCard so title and icon remain as required, move modifier after them, and give label, description, and actionButton explicit default values (e.g., = null) so they belong to the default-value group; keep colors with its existing default (MediumHomeCardDefaults.colors()) and adjust any call sites if needed.feature/home/src/main/java/in/koreatech/koin/feature/home/component/SmallHomeCard.kt (1)
49-55: ⚡ Quick winComposable 파라미터 순서를 가이드에 맞춰 정리해주세요.
description,actionButton이 기본값 없는 파라미터인데modifier뒤에 있어 현재 저장소 규칙과 어긋납니다. 두 슬롯은= null기본값을 주고 기본값 파라미터 구간으로 이동하는 쪽이 안전합니다.As per coding guidelines `feature/**`: "`@Composable` 함수의 파라미터는 기본값이 없는 필수 파라미터, modifier, 기본값이 있는 파라미터 순서로 선언".예시 수정안
fun SmallHomeCard( title: `@Composable` () -> Unit, icon: `@Composable` () -> Unit, modifier: Modifier = Modifier, - description: (`@Composable` () -> Unit)?, - actionButton: (`@Composable` () -> Unit)?, + description: (`@Composable` () -> Unit)? = null, + actionButton: (`@Composable` () -> Unit)? = null, colors: SmallHomeCardColors = SmallHomeCardDefaults.colors(), shape: Shape = SmallHomeCardDefaults.Shape, contentPadding: PaddingValues = SmallHomeCardDefaults.ContentPadding, borderWidth: Dp = SmallHomeCardDefaults.BorderWidth )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@feature/home/src/main/java/in/koreatech/koin/feature/home/component/SmallHomeCard.kt` around lines 49 - 55, The SmallHomeCard composable has non-default parameters description and actionButton placed after modifier, violating the repo rule; update SmallHomeCard signature so required no-default parameters (title, icon) come first, then modifier: Modifier = Modifier, and then move description and actionButton into the default-parameter section by giving them default values (e.g., description: (`@Composable` () -> Unit)? = null, actionButton: (`@Composable` () -> Unit)? = null) alongside colors: SmallHomeCardColors = SmallHomeCardDefaults.colors(), so the final order is title, icon, modifier, description = null, actionButton = null, colors.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@feature/home/src/main/java/in/koreatech/koin/feature/home/component/DiningPager.kt`:
- Line 54: The passed-in modifier to DiningPager is being reused for the inner
HorizontalPager which can cause duplicated sizing/padding; in the
HorizontalPager call inside the DiningPager composable replace
modifier.fillMaxWidth() with Modifier.fillMaxWidth() (keep the original modifier
applied to the outer Column/DiningPager parameter only) so the internal pager
uses a fresh Modifier and avoids unintended composition of external modifiers.
In `@feature/home/src/main/res/drawable/ic_home_shuttle_ticket.xml`:
- Around line 7-8: The vector's android:pathData in ic_home_shuttle_ticket.xml
is excessively long (very high coordinate precision) causing render perf issues;
open the <path> with the android:pathData attribute, simplify the path by
reducing coordinate precision (round decimal places), remove non-essential
micro-details, or replace the complex vector with a raster asset (PNG/WebP) if
shape complexity remains high, then validate the drawable renders correctly on
low-end devices and update android:fillColor as needed.
---
Nitpick comments:
In
`@feature/home/src/main/java/in/koreatech/koin/feature/home/component/HomeSection.kt`:
- Around line 23-27: The HomeSection composable currently declares the required
lambda parameter content after modifier; reorder parameters to follow the
guideline (required params, modifier, optional params) by moving the content:
`@Composable` () -> Unit parameter before modifier: Modifier = Modifier so the
signature reads with text and more and content as required params, then
modifier, then any defaulted params.
In
`@feature/home/src/main/java/in/koreatech/koin/feature/home/component/LargeHomeCard.kt`:
- Around line 52-58: LargeHomeCard function signature places nullable parameters
label and description before modifier without default values; change their
declarations to provide = null and reorder parameters to follow the convention
(required params, modifier, params with defaults). Update the LargeHomeCard
signature so title and icon remain first, then modifier: Modifier = Modifier,
then label: (`@Composable` () -> Unit)? = null and description: (`@Composable` () ->
Unit)? = null (colors can remain with its default), ensuring parameter order and
defaulting follow the project's composable parameter rules.
In
`@feature/home/src/main/java/in/koreatech/koin/feature/home/component/MediumHomeCard.kt`:
- Around line 52-59: The MediumHomeCard composable parameter order violates the
project rule: put non-default required params first, then modifier, then params
with defaults; update the signature of MediumHomeCard so title and icon remain
as required, move modifier after them, and give label, description, and
actionButton explicit default values (e.g., = null) so they belong to the
default-value group; keep colors with its existing default
(MediumHomeCardDefaults.colors()) and adjust any call sites if needed.
In
`@feature/home/src/main/java/in/koreatech/koin/feature/home/component/SmallHomeCard.kt`:
- Around line 49-55: The SmallHomeCard composable has non-default parameters
description and actionButton placed after modifier, violating the repo rule;
update SmallHomeCard signature so required no-default parameters (title, icon)
come first, then modifier: Modifier = Modifier, and then move description and
actionButton into the default-parameter section by giving them default values
(e.g., description: (`@Composable` () -> Unit)? = null, actionButton: (`@Composable`
() -> Unit)? = null) alongside colors: SmallHomeCardColors =
SmallHomeCardDefaults.colors(), so the final order is title, icon, modifier,
description = null, actionButton = null, colors.
In `@feature/home/src/main/res/values/strings.xml`:
- Line 8: The string resource dining_kcal currently formats without a space
("%1$dkcal"), hurting readability; update the value of the string resource named
dining_kcal to include a space between the numeric placeholder and the unit
(e.g., change to "%1$d kcal") so the UI displays "123 kcal" instead of
"123kcal".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bda1a20e-f0d2-4dbe-96f0-d132520a2b50
📒 Files selected for processing (16)
feature/home/src/main/java/in/koreatech/koin/feature/home/.gitkeepfeature/home/src/main/java/in/koreatech/koin/feature/home/component/DiningPager.ktfeature/home/src/main/java/in/koreatech/koin/feature/home/component/HomeChip.ktfeature/home/src/main/java/in/koreatech/koin/feature/home/component/HomeIcon.ktfeature/home/src/main/java/in/koreatech/koin/feature/home/component/HomeSection.ktfeature/home/src/main/java/in/koreatech/koin/feature/home/component/LargeHomeCard.ktfeature/home/src/main/java/in/koreatech/koin/feature/home/component/MediumHomeCard.ktfeature/home/src/main/java/in/koreatech/koin/feature/home/component/ShuttleTicketCard.ktfeature/home/src/main/java/in/koreatech/koin/feature/home/component/SmallHomeCard.ktfeature/home/src/main/res/drawable/ic_home_bus_route.xmlfeature/home/src/main/res/drawable/ic_home_bus_timetable.xmlfeature/home/src/main/res/drawable/ic_home_callvan.xmlfeature/home/src/main/res/drawable/ic_home_card_arrow.xmlfeature/home/src/main/res/drawable/ic_home_shuttle_ticket.xmlfeature/home/src/main/res/drawable/ic_home_store.xmlfeature/home/src/main/res/values/strings.xml
|
Actionable comments posted: 0 |
| Icon( | ||
| modifier = Modifier.size(20.dp), | ||
| imageVector = ImageVector.vectorResource(R.drawable.ic_home_card_arrow), | ||
| contentDescription = null | ||
| ) |
There was a problem hiding this comment.
[Minor] 화살표 아이콘이 컴포넌트 내부에 하드코딩되어 재사용성 저하
ic_home_card_arrow 아이콘과 그 tint가 컴포넌트 내부에 하드코딩되어 있어, 화살표가 필요 없는 카드 변형이나 다른 액션 아이콘이 필요한 경우 이 컴포넌트를 재사용할 수 없습니다. LargeHomeCardDefaults.colors()에 arrowColor를 추가하거나, trailingIcon: (@Composable () -> Unit)? = { /* 기본 화살표 */ } 슬롯으로 교체를 검토해주세요.
|
|
@coderabbitai reivew |
|
✅ Actions performedReview triggered.
|
|
Actionable comments posted: 0 |
| backgroundColor: Color, | ||
| contentDescription: String?, | ||
| modifier: Modifier = Modifier, | ||
| shape: Shape = RoundedCornerShape(8.dp), |
There was a problem hiding this comment.
typography 제외하고 전부 사용 안했습니다.
어차피 디자인 시스템 싹 엎어야해요
| import `in`.koreatech.koin.core.designsystem.theme.RebrandKoinTheme | ||
|
|
||
| object HomeChipDefaults { | ||
| val Shape: Shape = RoundedCornerShape(100.dp) |
There was a problem hiding this comment.
999아니면 CircleShape 안 썼습니다
|
|
||
| object HomeChipDefaults { | ||
| val Shape: Shape = RoundedCornerShape(100.dp) | ||
| val ContentPadding = PaddingValues(vertical = 0.dp, horizontal = 8.dp) |
There was a problem hiding this comment.
일부러 선언했습니다.
원래라면 없게 선언했겠지만, Defaults라 있는게 깔끔해보이네요



PR 개요
PR 체크리스트
작업사항
작업사항의 상세한 설명
논의 사항
스크린샷
2026-05-28.00-07-10.mp4
추가내용
Summary by CodeRabbit