Conversation
Walkthrough홈 화면용 Jetpack Compose UI 컴포넌트 2개(해시태그 배지, 섹션 트레일링 액션)와 디자인 시스템 타이포그래피에 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeHashtag.kt (1)
23-23: named argument=앞뒤 공백 불일치 (Kotlin 스타일 가이드)Line 23의
shape=RoundedCornerShape(size=99.dp)은=양쪽에 공백이 없어, 동일 파일 내 lines 24-25와 스타일이 불일치합니다. Kotlin 코딩 컨벤션 및 ktlint 규칙에 따르면 named argument에는=앞뒤 공백이 필요합니다.✨ 제안하는 수정 방법
- .clip(shape=RoundedCornerShape(size=99.dp)) + .clip(shape = RoundedCornerShape(size = 99.dp))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeHashtag.kt` at line 23, Fix the inconsistent spacing for named arguments in HomeHashtag.kt by adding spaces around the `=` in the `.clip` call: change the `.clip(shape=RoundedCornerShape(size=99.dp))` usage so the named arguments match the file's Kotlin style (use `shape = ...` and also `size = ...` inside RoundedCornerShape) to comply with ktlint/Kotlin conventions and align with the surrounding lines (references: the `.clip` call and `RoundedCornerShape` constructor).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeHashtag.kt`:
- Around line 36-46: The two preview functions HomeHashtagDefaultPreview and
HomeHashtagLongTextPreview call HomeHashtag directly and crash because
LocalDduruColors/LocalDduruTypography (used via DduruTheme.colors and
DduruTheme.typography) are not provided; wrap each preview invocation in the
DduruTheme composition (e.g., DduruTheme { HomeHashtag(text = "...") }) so the
CompositionLocals are supplied before HomeHashtag uses DduruTheme.colors.gray300
or DduruTheme.typography.Caption2.
---
Nitpick comments:
In
`@app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeHashtag.kt`:
- Line 23: Fix the inconsistent spacing for named arguments in HomeHashtag.kt by
adding spaces around the `=` in the `.clip` call: change the
`.clip(shape=RoundedCornerShape(size=99.dp))` usage so the named arguments match
the file's Kotlin style (use `shape = ...` and also `size = ...` inside
RoundedCornerShape) to comply with ktlint/Kotlin conventions and align with the
surrounding lines (references: the `.clip` call and `RoundedCornerShape`
constructor).
app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeHashtag.kt
Outdated
Show resolved
Hide resolved
dlwl224
left a comment
There was a problem hiding this comment.
예시 이미지도 포함해주신거 좋은것같습니다. 참고하겠습니다. 수고하셨습니다.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt (1)
30-31: 콘텐츠가 Start 정렬되어 "TrailingAction"의 디자인 의도와 맞지 않을 수 있음
Arrangement.spacedBy(8.dp)는 두 번째 정렬 인자 없이 사용할 경우, Row의 첫 번째 UI 요소가 화면 좌측부터 배치됩니다.fillMaxWidth()가 적용된 Row에서Arrangement.spacedBy(8.dp)만 사용하면[전체보기][8dp][→]가 왼쪽 정렬되어, "섹션 우측 트레일링 액션"이라는 컴포넌트 이름과 피그마 디자인 의도에 부합하지 않을 수 있습니다.콘텐츠를 우측(End)에 정렬하려면
Arrangement.spacedBy(8.dp, Alignment.End)로 변경하거나, Text 앞에Spacer(Modifier.weight(1f))를 추가하는 방식을 검토하세요.✏️ 제안하는 수정 방법 (Arrangement.spacedBy 활용)
- horizontalArrangement = Arrangement.spacedBy(8.dp) + horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.End)부모 레이아웃에서 이 컴포넌트가 어떻게 배치되는지 확인해 피그마 디자인 의도와 실제 정렬이 일치하는지 검증이 필요합니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt` around lines 30 - 31, Row in HomeSectionTrailingAction is currently using Arrangement.spacedBy(8.dp) which left-aligns contents in a full-width Row; change the horizontal arrangement to Arrangement.spacedBy(8.dp, Alignment.End) to right-align the trailing action, or alternatively insert a Spacer(Modifier.weight(1f)) before the first child to push content to the end. Locate the Row declaration in HomeSectionTrailingAction.kt (the one with verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) and replace the arrangement or add the Spacer as described, then verify in the parent layout that the component occupies full width so the end alignment matches the Figma design.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt`:
- Around line 47-53: The Preview (HomeSectionTrailingActionPreview) is not
wrapped in DduruTheme so CompositionLocals used by HomeSectionTrailingAction
(DduruTheme.typography.Body4 and DduruTheme.colors.gray600) are missing; fix by
wrapping the call to HomeSectionTrailingAction inside DduruTheme { ... } in the
HomeSectionTrailingActionPreview function (ensure you call DduruTheme before
invoking HomeSectionTrailingAction and import/restore any theme provider as
needed).
- Around line 39-43: The clickable Row in HomeSectionTrailingAction.kt lacks
accessibility semantics; update the Row's Modifier (the same one that uses
clickable) to include a semantics block that sets role = Role.Button and a
meaningful contentDescription string describing the action (e.g., "Open section"
or context-specific label), and keep the Icon's contentDescription = null so the
Row-level label is used by screen readers; reference the Row modifier in
HomeSectionTrailingAction and import androidx.compose.ui.semantics.Role and
semantics.
---
Nitpick comments:
In
`@app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt`:
- Around line 30-31: Row in HomeSectionTrailingAction is currently using
Arrangement.spacedBy(8.dp) which left-aligns contents in a full-width Row;
change the horizontal arrangement to Arrangement.spacedBy(8.dp, Alignment.End)
to right-align the trailing action, or alternatively insert a
Spacer(Modifier.weight(1f)) before the first child to push content to the end.
Locate the Row declaration in HomeSectionTrailingAction.kt (the one with
verticalAlignment = Alignment.CenterVertically, horizontalArrangement =
Arrangement.spacedBy(8.dp)) and replace the arrangement or add the Spacer as
described, then verify in the parent layout that the component occupies full
width so the end alignment matches the Figma design.
| Icon( | ||
| imageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight, | ||
| contentDescription = null, | ||
| tint = DduruTheme.colors.gray600 | ||
| ) |
There was a problem hiding this comment.
클릭 가능한 Row에 접근성(semantics) 레이블 누락
clickable Row 전체가 하나의 인터랙션 요소이지만, Row에도 Icon에도 접근성 설명이 없어 스크린 리더가 동작을 안내하지 못합니다.
Icon의 contentDescription = null은 텍스트가 충분한 컨텍스트를 제공하는 경우 허용되지만, clickable Modifier에 semantics 블록을 추가해 role과 contentDescription을 명시하는 것을 권장합니다.
♿ 접근성 개선 제안
Row(
modifier = modifier
.fillMaxWidth()
- .clickable(onClick = onClick)
+ .clickable(
+ onClick = onClick,
+ onClickLabel = text
+ )
.padding(vertical = 4.dp),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Icon( | |
| imageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight, | |
| contentDescription = null, | |
| tint = DduruTheme.colors.gray600 | |
| ) | |
| Row( | |
| modifier = modifier | |
| .fillMaxWidth() | |
| .clickable( | |
| onClick = onClick, | |
| onClickLabel = text | |
| ) | |
| .padding(vertical = 4.dp), | |
| ) { | |
| Icon( | |
| imageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight, | |
| contentDescription = null, | |
| tint = DduruTheme.colors.gray600 | |
| ) | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt`
around lines 39 - 43, The clickable Row in HomeSectionTrailingAction.kt lacks
accessibility semantics; update the Row's Modifier (the same one that uses
clickable) to include a semantics block that sets role = Role.Button and a
meaningful contentDescription string describing the action (e.g., "Open section"
or context-specific label), and keep the Icon's contentDescription = null so the
Row-level label is used by screen readers; reference the Row modifier in
HomeSectionTrailingAction and import androidx.compose.ui.semantics.Role and
semantics.
...in/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt
Outdated
Show resolved
Hide resolved
- 프리뷰 추가 - 디자인 변경에 맞춰 변경 - textStyle 인자로 외부에서 주입
- HomeSectionTrailingAction fillMaxWidth() 제거
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt`:
- Around line 24-27: The Row in HomeSectionTrailingAction is too short for the
recommended 48.dp touch target; update the modifier chain to enforce a minimum
height by inserting sizeIn(minHeight = 48.dp) before .clickable(onClick =
onClick) (i.e., apply sizeIn on the same modifier used for Row so the clickable
area meets Material 3 touch target guidelines).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e57814c7-7e99-4909-82a9-2123771e40e9
📒 Files selected for processing (3)
app/src/main/java/com/gildongmu/dduru/core/designsystem/typography/Type.ktapp/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeHashtag.ktapp/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt
🚧 Files skipped from review as they are similar to previous changes (1)
- app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeHashtag.kt
| Row( | ||
| modifier = modifier | ||
| .clickable(onClick = onClick) | ||
| .padding(vertical = 4.dp), |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
find . -name "HomeSectionTrailingAction.kt" -type fRepository: ddu-ru/ddu-ru-android
Length of output: 169
🏁 Script executed:
cat -n ./app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.ktRepository: ddu-ru/ddu-ru-android
Length of output: 2059
🏁 Script executed:
# Check the design system theme to understand Body4 text style dimensions
fd -t f "theme" "app/src/main/java/com/gildongmu/dduru/core/designsystem" | head -20Repository: ddu-ru/ddu-ru-android
Length of output: 135
🏁 Script executed:
# Let's look at the Typography definitions to understand Body4 dimensions
rg "Body4|body4" app/src/main/java/com/gildongmu/dduru/core/designsystem -A 2 -B 2 -t ktRepository: ddu-ru/ddu-ru-android
Length of output: 91
🏁 Script executed:
cat -n app/src/main/java/com/gildongmu/dduru/core/designsystem/theme/Theme.kt | head -100Repository: ddu-ru/ddu-ru-android
Length of output: 2492
🏁 Script executed:
fd -t f "Typography" app/src/main/java/com/gildongmu/dduru/core/designsystem/typographyRepository: ddu-ru/ddu-ru-android
Length of output: 47
🏁 Script executed:
rg "Body4" app/src/main/java/com/gildongmu/dduru/core/designsystem -A 3 -B 1Repository: ddu-ru/ddu-ru-android
Length of output: 1051
🏁 Script executed:
cat -n app/src/main/java/com/gildongmu/dduru/core/designsystem/typography/Type.ktRepository: ddu-ru/ddu-ru-android
Length of output: 5511
🏁 Script executed:
# Check if there are any size/dimension constants defined for touch targets
rg "48.dp|minHeight|touchTarget" app/src/main/java/com/gildongmu/dduru --max-count 20Repository: ddu-ru/ddu-ru-android
Length of output: 280
🏁 Script executed:
# Check if there are any other similar components that define minimum touch target sizes
rg "sizeIn|minHeight|minWidth" app/src/main/java/com/gildongmu/dduru/presentation -A 1 -B 1 | head -40Repository: ddu-ru/ddu-ru-android
Length of output: 47
🏁 Script executed:
# Verify Material Design guidelines for touch targets by checking Android documentation context
# Also check if this component is used in a context where touch target size might be constrained
rg "HomeSectionTrailingAction" app/src/main/java/com/gildongmu/dduru/presentation -B 2 -A 2Repository: ddu-ru/ddu-ru-android
Length of output: 1564
🏁 Script executed:
# Check Icon default size in Material3
rg "Icon" app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt -A 5Repository: ddu-ru/ddu-ru-android
Length of output: 623
🏁 Script executed:
# Verify how other clickable components in the app handle touch targets
fd "Button" app/src/main/java/com/gildongmu/dduru/core/designsystem/component -type fRepository: ddu-ru/ddu-ru-android
Length of output: 235
🏁 Script executed:
# Check the exact usage location of this component to see if it's constrained
rg "HomeSectionTrailingAction" app/src/main/java/com/gildongmu/dduru/presentation/feature/home -B 5 -A 5Repository: ddu-ru/ddu-ru-android
Length of output: 3022
🏁 Script executed:
# Verify Icon default size by checking Material3 documentation context in the codebase
rg "Icon\(" app/src/main/java/com/gildongmu/dduru --max-count 10 -A 3 | head -50Repository: ddu-ru/ddu-ru-android
Length of output: 646
최소 터치 영역 48.dp를 보장하도록 명시하세요.
현재 코드에서 Row의 높이는 Body4 텍스트(약 17.6.sp 라인 높이)와 기본 아이콘 크기(24.dp)에 상하 패딩 8.dp만 더해져 약 32dp에 불과합니다. 이는 Material Design 3의 권장 최소 터치 영역 48.dp에 미치지 못합니다. sizeIn(minHeight = 48.dp)를 .clickable() 전에 추가하여 접근성을 개선하세요.
🔧 제안하는 수정
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.sizeIn
...
Row(
modifier = modifier
+ .sizeIn(minHeight = 48.dp)
.clickable(onClick = onClick)
.padding(vertical = 4.dp),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Row( | |
| modifier = modifier | |
| .clickable(onClick = onClick) | |
| .padding(vertical = 4.dp), | |
| import androidx.compose.foundation.clickable | |
| import androidx.compose.foundation.layout.Arrangement | |
| import androidx.compose.foundation.layout.Row | |
| import androidx.compose.foundation.layout.padding | |
| import androidx.compose.foundation.layout.sizeIn | |
| Row( | |
| modifier = modifier | |
| .sizeIn(minHeight = 48.dp) | |
| .clickable(onClick = onClick) | |
| .padding(vertical = 4.dp), |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@app/src/main/java/com/gildongmu/dduru/presentation/feature/home/component/HomeSectionTrailingAction.kt`
around lines 24 - 27, The Row in HomeSectionTrailingAction is too short for the
recommended 48.dp touch target; update the modifier chain to enforce a minimum
height by inserting sizeIn(minHeight = 48.dp) before .clickable(onClick =
onClick) (i.e., apply sizeIn on the same modifier used for Row so the clickable
area meets Material 3 touch target guidelines).
✨ 작업 내용
📄 상세 내용
홈 화면에서 사용하는 캡슐 형태의 해시태그 UI를 컴포넌트로 분리하여 구현했습니다. 피그마에 있는 UI 디자인 적용했습니다
클릭 영역을 충분히 확보하기 위해 Row에 padding을 적용했습니다.
👀 To Reviewer
현재는 기본 clickable을 사용하고 있습니다. 추후 공통 noRippleClickable 커스텀 Modifier를 만약 사용한다면 해당 컴포넌트에도 적용 예정입니다. => 현재 HomeHashTag - 실시간인기여행지 부분이 background 컬러가 변경될 가능성이 있습니다 !
📎 관련 이슈
📷 스크린샷 / 영상
Summary by CodeRabbit
New Features
Style