Conversation
Walkthrough피드 및 댓글 관련 UI 컴포넌트의 레이아웃, 타이포그래피, 상호작용을 개선했습니다. 버튼 컴포넌트에 패딩과 텍스트 스타일 파라미터를 추가하고, 댓글 입력 필드와 멘션 목록을 재설계했으며, 삭제 완료 알림 처리를 Compose 효과 기반으로 마이그레이션했습니다. Changes
🚥 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 (2)
presentation/src/main/res/drawable/ic_feed_empty.xml (1)
13-64: 반복 색상은@color리소스로 추출하는 것을 권장합니다.Line 13-64에 동일 hex 색상이 반복되어 있어, 추후 디자인 토큰 변경/다크모드 대응 시 수정 지점이 늘어납니다. 공용 color resource가 이미 있다면 참조로 통일해 주세요.
예시 diff
- android:fillColor="#F6F6F7" + android:fillColor="@color/feed_empty_surface" - android:fillColor="#E8EAEE" + android:fillColor="@color/feed_empty_surface_variant" - android:strokeColor="#F6F6F7" + android:strokeColor="@color/feed_empty_surface"As per coding guidelines "Avoid introducing unused IDs or hardcoded values where theme resources already exist."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@presentation/src/main/res/drawable/ic_feed_empty.xml` around lines 13 - 64, Multiple path elements (e.g., the paths using android:fillColor="#F6F6F7", "#E8EAEE", and android:strokeColor="#F6F6F7"/"#00000000") repeat hardcoded hex colors; extract these hex values into shared color resources (e.g., colors.xml entries like feed_bg, feed_card, transparent) and replace the literal values in the drawable by referencing `@color/feed_bg`, `@color/feed_card`, `@color/transparent` on the android:fillColor and android:strokeColor attributes for the relevant <path> elements (look for the path entries with android:fillColor and android:strokeColor in ic_feed_empty.xml).presentation/src/main/java/daily/dayo/presentation/view/dialog/CommentBottomSheetDialog.kt (1)
328-356: 빈/비어있지 않은 분기에서CommentListView호출 중복을 줄여주세요.현재 두 분기 파라미터가 거의 동일해서 이후 수정 시 누락 가능성이 있습니다. 공통 호출로 묶는 게 유지보수에 유리합니다.
리팩터링 예시
item { - if (postComments.data.isEmpty()) { - Box( - modifier = Modifier - .fillParentMaxHeight() - .fillMaxWidth() - ) { - CommentListView( - currentMemberId = currentMemberId, - postComments = postComments, - onClickProfile = onClickCommentProfile, - onClickReply = onClickReply, - onClickDelete = onClickDelete, - onClickReport = onClickReport, - modifier = Modifier.padding(horizontal = 18.dp), - showEmptyIcon = true - ) - } - } else { - CommentListView( - currentMemberId = currentMemberId, - postComments = postComments, - onClickProfile = onClickCommentProfile, - onClickReply = onClickReply, - onClickDelete = onClickDelete, - onClickReport = onClickReport, - modifier = Modifier.padding(horizontal = 18.dp), - showEmptyIcon = true - ) - } + val commentList: `@Composable` () -> Unit = { + CommentListView( + currentMemberId = currentMemberId, + postComments = postComments, + onClickProfile = onClickCommentProfile, + onClickReply = onClickReply, + onClickDelete = onClickDelete, + onClickReport = onClickReport, + modifier = Modifier.padding(horizontal = 18.dp), + showEmptyIcon = true + ) + } + if (postComments.data.isEmpty()) { + Box( + modifier = Modifier + .fillParentMaxHeight() + .fillMaxWidth() + ) { commentList() } + } else { + commentList() + } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@presentation/src/main/java/daily/dayo/presentation/view/dialog/CommentBottomSheetDialog.kt` around lines 328 - 356, The duplicate calls to CommentListView in the if/else should be collapsed: remove the branching that repeats the same CommentListView invocation and instead call CommentListView once, using the existing condition (postComments.data.isEmpty()) only to control layout differences (e.g., wrap with Box when empty). Update CommentBottomSheetDialog to render CommentListView a single time, keeping the same parameters (currentMemberId, postComments, onClickProfile, onClickReply, onClickDelete, onClickReport, modifier = Modifier.padding(horizontal = 18.dp), showEmptyIcon = true) and only conditionally wrap it with Box when postComments.data.isEmpty().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@presentation/src/main/java/daily/dayo/presentation/screen/feed/FeedScreen.kt`:
- Around line 206-212: The vertical padding for the empty-feed button is
incorrect; update the FilledButton call used for the empty feed (the
FilledButton instance with onEmptyViewClick and label
stringResource(R.string.feed_empty_button)) to use contentPadding with vertical
= 8.dp (matching QA spec) instead of vertical = 11.5.dp so the button
height/padding follows the design.
In `@presentation/src/main/java/daily/dayo/presentation/view/Comment.kt`:
- Around line 475-479: Replace the hardcoded placeholder "댓글을 남겨주세요" in the Text
composable shown inside the empty-check branch (the block using
commentText.value.text.isEmpty()) with a stringResource lookup; add a new string
resource key (e.g., placeholder_comment) in the strings.xml and call
stringResource(R.string.placeholder_comment) in the Text call so the placeholder
text is localized and maintainable.
---
Nitpick comments:
In
`@presentation/src/main/java/daily/dayo/presentation/view/dialog/CommentBottomSheetDialog.kt`:
- Around line 328-356: The duplicate calls to CommentListView in the if/else
should be collapsed: remove the branching that repeats the same CommentListView
invocation and instead call CommentListView once, using the existing condition
(postComments.data.isEmpty()) only to control layout differences (e.g., wrap
with Box when empty). Update CommentBottomSheetDialog to render CommentListView
a single time, keeping the same parameters (currentMemberId, postComments,
onClickProfile, onClickReply, onClickDelete, onClickReport, modifier =
Modifier.padding(horizontal = 18.dp), showEmptyIcon = true) and only
conditionally wrap it with Box when postComments.data.isEmpty().
In `@presentation/src/main/res/drawable/ic_feed_empty.xml`:
- Around line 13-64: Multiple path elements (e.g., the paths using
android:fillColor="#F6F6F7", "#E8EAEE", and
android:strokeColor="#F6F6F7"/"#00000000") repeat hardcoded hex colors; extract
these hex values into shared color resources (e.g., colors.xml entries like
feed_bg, feed_card, transparent) and replace the literal values in the drawable
by referencing `@color/feed_bg`, `@color/feed_card`, `@color/transparent` on the
android:fillColor and android:strokeColor attributes for the relevant <path>
elements (look for the path entries with android:fillColor and
android:strokeColor in ic_feed_empty.xml).
🪄 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: f2b02824-2d11-49dc-bc58-b62d781466b2
📒 Files selected for processing (8)
presentation/src/main/java/daily/dayo/presentation/screen/feed/FeedScreen.ktpresentation/src/main/java/daily/dayo/presentation/screen/main/MainScreen.ktpresentation/src/main/java/daily/dayo/presentation/screen/post/PostScreen.ktpresentation/src/main/java/daily/dayo/presentation/view/Button.ktpresentation/src/main/java/daily/dayo/presentation/view/Comment.ktpresentation/src/main/java/daily/dayo/presentation/view/FeedPostView.ktpresentation/src/main/java/daily/dayo/presentation/view/dialog/CommentBottomSheetDialog.ktpresentation/src/main/res/drawable/ic_feed_empty.xml
| FilledButton( | ||
| onClick = onEmptyViewClick, | ||
| label = stringResource(id = R.string.feed_empty_button), | ||
| modifier = Modifier.height(44.dp), | ||
| contentPadding = PaddingValues(horizontal = 20.dp, vertical = 11.5.dp), | ||
| textStyle = DayoTheme.typography.b5 | ||
| ) |
There was a problem hiding this comment.
빈 피드 버튼 내부 세로 패딩이 QA 스펙과 다릅니다.
Line 210의 vertical = 11.5.dp는 이 PR 목표(상하 8dp)와 불일치합니다. 스펙대로 맞추는 편이 안전합니다.
수정 제안
- contentPadding = PaddingValues(horizontal = 20.dp, vertical = 11.5.dp),
+ contentPadding = PaddingValues(horizontal = 20.dp, vertical = 8.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.
| FilledButton( | |
| onClick = onEmptyViewClick, | |
| label = stringResource(id = R.string.feed_empty_button), | |
| modifier = Modifier.height(44.dp), | |
| contentPadding = PaddingValues(horizontal = 20.dp, vertical = 11.5.dp), | |
| textStyle = DayoTheme.typography.b5 | |
| ) | |
| FilledButton( | |
| onClick = onEmptyViewClick, | |
| label = stringResource(id = R.string.feed_empty_button), | |
| modifier = Modifier.height(44.dp), | |
| contentPadding = PaddingValues(horizontal = 20.dp, vertical = 8.dp), | |
| textStyle = DayoTheme.typography.b5 | |
| ) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@presentation/src/main/java/daily/dayo/presentation/screen/feed/FeedScreen.kt`
around lines 206 - 212, The vertical padding for the empty-feed button is
incorrect; update the FilledButton call used for the empty feed (the
FilledButton instance with onEmptyViewClick and label
stringResource(R.string.feed_empty_button)) to use contentPadding with vertical
= 8.dp (matching QA spec) instead of vertical = 11.5.dp so the button
height/padding follows the design.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4be88c72e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| painter = painterResource(id = R.drawable.ic_comment_empty), | ||
| contentDescription = "empty", | ||
| tint = Color.Unspecified | ||
| Spacer(modifier = Modifier.weight(64f)) |
There was a problem hiding this comment.
Keep empty-state centering in scrollable post comments
CommentListView now relies on weighted Spacers to center the empty state, but this composable is also used from PostScreen inside a LazyColumn item (PostScreen.kt), where vertical space is unbounded and weight-based centering does not apply. As a result, the empty comment state remains top-aligned on the post detail screen even though the bottom-sheet path was adjusted with fillParentMaxHeight(), so the QA alignment fix is only partially effective.
Useful? React with 👍 / 👎.
작업 내용
참고
모듈별 기능 영향 및 사용자 대면 변경사항
피드 화면 (FeedScreen)
FilledButton컴포저블에contentPadding과textStyle파라미터를 추가하여 향후 버튼 스타일 커스터마이징 가능하게 개선댓글 화면 (Comment & CommentBottomSheetDialog)
메인 화면 (MainScreen)
sheetGesturesEnabled = false설정으로 사용자가 리스트를 스크롤하는 중에 실수로 sheet를 닫는 것 방지피드 아이템 (FeedPostView)
피드 빈 상태 이미지 (ic_feed_empty.xml)
autoMirrored="true"속성으로 우-좌 언어 지원위험 포인트 및 상태 관리
중위험: 비동기 효과(Effect) 패턴 변경
SideEffect + coroutineScope.launch에서LaunchedEffect(postCommentDeleteSuccess)이벤트 기반으로 마이그레이션Event래퍼의getContentIfNotHandled()동작이 정확히 한 번만 실행되어야 함requestPostComment) 중에 사용자가 sheet를 닫을 경우 Race condition 가능성저위험: UI 상태 일관성
MutableInteractionSource를 멘션 리스트 행에 추가하여 pressed 상태 시각화저위험: bottom sheet 제스처 비활성화
sheetGesturesEnabled = false로 드래그/스와이프 상호작용 완전 차단필수 테스트 및 검증 항목
기능 테스트
댓글 삭제 플로우:
멘션 목록 상호작용:
댓글 입력 필드:
Bottom sheet 제스처:
피드 UI 개선:
회귀(Regression) 테스트
엣지 케이스 및 상태 검증
Event<T>) 정확성: 댓글 삭제 성공 이벤트가 재처리되지 않는지 확인