Skip to content

[FEAT/#8] 선택 공통 컴포넌트 구현#14

Merged
hyeminililo merged 14 commits intodevelopfrom
feat/#8-selection-chip-component
Jan 11, 2026
Merged

[FEAT/#8] 선택 공통 컴포넌트 구현#14
hyeminililo merged 14 commits intodevelopfrom
feat/#8-selection-chip-component

Conversation

@hyeminililo
Copy link
Copy Markdown
Contributor

@hyeminililo hyeminililo commented Jan 8, 2026

Related issue 🛠

Work Description ✏️

  • 피그마 내에 있는 SelectionChip을 구현했습니다.
  • 선택/미선택에 따른 UI 변경을 반영했습니다.
  • @Composable을 함수 인자로 받아 사용할 수 있도록 구현했습니다.
  • Preview를 만들었습니다.

Screenshot 📸

SelectionBasicChip !(https://github.com/user-attachments/assets/87578200-ed63-42c8-9066-08ce9856312d)
image
MissionChip [ ](https://github.com/user-attachments/assets/759aa4c6-2a73-4df1-b806-1c0fe03fb1c0)
image

Uncompleted Tasks 😅

  • N/A

To Reviewers 📢

나현언니가 프리뷰를 만드는 것에 대해 친절히 알려줬는데 외부에서 패딩을 weight로 주는 것이 어려워서 현재는 상위 컴포저블에서 dp 값을 사용해 패딩을 적용했습니다... 😅 리뷰해주시면 감사하겠습니다 ㅜㅜ!

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 선택 가능한 칩 컴포넌트 추가 — 기본 칩 및 미션 카드 스타일, 선택 토글과 클릭 동작, 미리보기 포함
  • 스타일

    • 타이포그래피 개선 — 정교한 라인 높이 적용으로 텍스트 가독성 향상
  • 자산

    • 라디오 버튼 아이콘 추가 — 선택/비선택 상태를 위한 벡터 아이콘 포함

✏️ Tip: You can customize this high-level summary in your review settings.

- 기존 텍스트 스타일에서 겹치는 부분이 많아 CherrishTextStyle로 따로 함수로 TextStyle 정의
- 피그마 수정사항에 맞춰 LineHeight 적용
- Composable 함수를 인자로 받도록 하여 공통 선택칩 구현
- Selectionchip_default 구현
- MissionCard_dafault 구현
@hyeminililo hyeminililo self-assigned this Jan 8, 2026
@hyeminililo hyeminililo requested a review from a team as a code owner January 8, 2026 19:12
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 8, 2026

Walkthrough

타이포그래피에 private 헬퍼로 라인 높이 스타일을 명시하고, 재사용 가능한 선택 칩 컴포저블(CherrishSelectionChip)과 스타일 열거형 및 라디오 버튼 상태용 벡터 드로어블 2종을 추가했습니다.

Changes

Cohort / File(s) 변경 요약
타이포그래피 개선
app/src/main/java/com/cherrish/android/core/designsystem/theme/Type.kt
private 헬퍼 CherrishTextStyle 추가, LineHeightStyle·TextUnit 임포트 추가, 기존 기본 타이포그래피 항목들을 CherrishTextStyle로 전환하고 명시적 라인높이 값(예: 1.5.em 등) 및 lineHeightStyle 지정.
선택 칩 컴포넌트 추가
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
CherrishSelectionBaseChip, CherrishSelectionChip, CherrishMissionCardChip 공개 composable 추가. 스타일(enum)에 따른 배경·테두리·모서리·패딩·아이콘 처리, 클릭 처리(noRippleClickable), 프리뷰 포함.
선택 칩 스타일 타입
app/src/main/java/com/cherrish/android/core/designsystem/type/CherrishSelectionChipStyle.kt
신규 enum CherrishSelectionChipStyle 추가(SELECTIONCHIP, MISSIONCARD).
아이콘 리소스 추가
app/src/main/res/drawable/ic_radiobtn_default.xml, app/src/main/res/drawable/ic_radiobtn_selected.xml
라디오/선택 상태용 벡터 드로어블 2개 추가(비선택 원형 테두리, 선택 시 채워진 원 + 링).

Sequence Diagram(s)

(생략: 변경 내용이 주로 UI 구성요소·자원 추가 및 내부 구현 변경으로, 다중 구성요소 간의 명확한 순차적 상호작용 흐름 시각화가 필요하지 않습니다.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • nhyeonii
  • sohee6989
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 주요 내용을 정확하게 반영하고 있습니다. 선택 공통 컴포넌트 구현이라는 명확한 설명으로 changeset의 주요 변경사항을 효과적으로 요약하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으며, 관련 이슈, 작업 내용, 스크린샷, 완료 작업 항목, 리뷰어 코멘트를 포함하고 있습니다.
Linked Issues check ✅ Passed PR의 모든 코드 변경사항이 #8 이슈의 요구사항을 충족합니다: 선택 상태별 UI 스타일 정의, 디자인 시스템 적용(색상, 타이포그래피), 프리뷰 포함, 재사용 가능한 컴포넌트 구조 구현.
Out of Scope Changes check ✅ Passed 모든 변경사항이 #8 이슈 범위 내에 있습니다. Type.kt의 lineHeight 개선, SelectionChip 컴포넌트 추가, 스타일 enum 정의, 라디오버튼 drawable 추가 등 모두 선택 컴포넌트 구현과 직접 관련된 변경사항입니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In
@app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt:
- Line 1: The filename contains a typo: rename the file from CherrishSelction.kt
to CherrishSelection.kt and update any references/imports/usages accordingly
(e.g., occurrences of CherrishSelction or imports pointing to that file); ensure
the Kotlin file’s declared class or object name matches the new filename (e.g.,
CherrishSelection) so the symbol and filename stay consistent and rebuilds
without errors.
- Around line 124-130: The Text composable is overriding the typography's font
size by specifying fontSize = 15.sp while also using style =
CherrishTheme.typography.body1M14; remove the redundant fontSize attribute so
the Text uses the typography from CherrishTheme.typography.body1M14 (or if a
different size is intended, update the typography entry instead), keeping color
and modifier as-is.
- Around line 45-48: Unify the corner radius and stop forcing full size: in the
modifier chain on the CherrishSelection chip (the Modifier call that currently
uses .fillMaxSize(), .clip(RoundedCornerShape(9.dp)), .background(...),
.border(..., RoundedCornerShape(10.dp))), remove .fillMaxSize(), and use the
same RoundedCornerShape value for both clip and border (e.g., 8.dp or 9.dp) so
the radii match; ensure the component accepts and applies an external Modifier
parameter rather than forcing size so parent composables can control chip
sizing.
- Around line 83-90: The Text composable is passing both fontSize and style
which conflicts: remove the redundant fontSize parameter and rely on the
typography style (use style = CherrishTheme.typography.body1M14) or instead
select/update a typography entry that defines 20.sp and keep only style; update
the Text invocation inside CherrishSelction (the Text(...) with text = "여드름 ∙
트러블") to use a single source of truth for font sizing by deleting fontSize =
20.sp or by replacing style with the appropriate typography that already has
20.sp.
🧹 Nitpick comments (2)
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt (2)

33-34: 파라미터 순서를 Compose 관례에 맞게 조정하세요.

Compose의 일반적인 관례에 따라 selected 파라미터를 modifier 앞에 배치하는 것이 좋습니다.

♻️ 제안하는 파라미터 순서
 @Composable
 fun CherrishBasicChip(
     onClick: () -> Unit,
-    modifier: Modifier = Modifier,
     selected: Boolean,
+    modifier: Modifier = Modifier,
     content: @Composable () -> Unit
 ) {

49-49: 접근성 향상을 위한 속성 추가를 고려하세요.

clickable 수정자에 role = Role.Buttonindication을 추가하면 접근성과 사용자 피드백이 개선됩니다.

♻️ 접근성 개선 제안

먼저 import를 추가하세요:

import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.ui.semantics.Role

그 다음 clickable 수정자를 업데이트하세요:

+        val interactionSource = remember { MutableInteractionSource() }
         Row(
             modifier = modifier
                 .fillMaxSize()
                 .clip(shape = RoundedCornerShape(size = 9.dp))
                 .background(backgroundColor)
                 .border(width = 1.dp, color = lineColor, shape = RoundedCornerShape(size = 10.dp))
-                .clickable(onClick = onClick)
+                .clickable(
+                    onClick = onClick,
+                    role = Role.Button,
+                    interactionSource = interactionSource,
+                    indication = rememberRipple()
+                )
                 .padding(horizontal = 12.dp, vertical = 6.dp),
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between edeca4c and 20a8bd5.

📒 Files selected for processing (3)
  • .kotlin/sessions/kotlin-compiler-8536313205031847801.salive
  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt
  • app/src/main/java/com/cherrish/android/core/designsystem/theme/Type.kt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt
  • app/src/main/java/com/cherrish/android/core/designsystem/theme/Type.kt
🧬 Code graph analysis (1)
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt (1)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
⏰ 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). (2)
  • GitHub Check: PR Lint Check
  • GitHub Check: PR Build Check
🔇 Additional comments (2)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Type.kt (2)

23-37: 타이포그래피 일관성 개선이 잘 구현되었습니다.

CherrishTextStyle 헬퍼 함수를 도입하여 코드 중복을 제거하고 lineHeightlineHeightStyle을 일관되게 적용한 점이 좋습니다. LineHeightStyle.Alignment.CenterTrim.None 설정으로 텍스트 정렬이 예측 가능하게 동작할 것입니다.


68-160: 타이포그래피 정의 업데이트가 적절합니다.

모든 타이포그래피 항목에 lineHeight 값(헤드라인/타이틀: 1.5.em, 바디/캡션: 1.4.em)을 추가하고 새로운 헬퍼 함수를 사용하여 일관성을 확보한 점이 우수합니다.

@@ -0,0 +1,157 @@
package com.cherrish.android.core.designsystem.component.chip
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

파일명 오타를 수정하세요.

파일명이 CherrishSelction.kt로 되어 있는데, CherrishSelection.kt로 수정해야 합니다. (Selection 철자 오류)

🤖 Prompt for AI Agents
In
@app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt
at line 1, The filename contains a typo: rename the file from
CherrishSelction.kt to CherrishSelection.kt and update any
references/imports/usages accordingly (e.g., occurrences of CherrishSelction or
imports pointing to that file); ensure the Kotlin file’s declared class or
object name matches the new filename (e.g., CherrishSelection) so the symbol and
filename stay consistent and rebuilds without errors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 요것두 확인 부탁 ~~ 글구 파일명과 컴포저블 함수명이 같았으면 좋겠어요!

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check the actual composable function names in the file
cat app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt | head -50

Length of output: 1988


@nhyeonii, 확인했습니다! 두 가지 이슈가 있네요:

  1. 파일명 오타: CherrishSelction.ktCherrishSelection.kt (Selection 철자 수정)
  2. 파일명과 컴포저블 함수명 불일치: 현재 메인 컴포저블 함수는 CherrishBasicChip인데 파일명은 CherrishSelection으로 되어 있습니다.

두 이슈를 함께 해결하려면 다음 두 가지 옵션이 있습니다:

Option A (권장): 파일명을 컴포저블 함수명에 맞추기

  • CherrishSelction.ktCherrishBasicChip.kt
  • 컴포저블 함수명(CherrishBasicChip)은 그대로 유지

Option B: 컴포저블 함수명을 파일명에 맞추기

  • CherrishSelction.ktCherrishSelection.kt (오타만 수정)
  • CherrishBasicChipCherrishSelection으로 함수명 변경

Option A가 더 간단하고, 이미 BasicChip이라는 명확한 의미를 가진 함수명이므로 이쪽을 추천드립니다! 👍

 />/)
( ..')  
(")_(")  

Thoughtful rabbit noting team conventions...


✏️ Learnings added
Learnt from: nhyeonii
Repo: TEAM-Cherrish/Cherrish-Android PR: 14
File: app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt:1-1
Timestamp: 2026-01-09T08:25:52.533Z
Learning: Cherrish Android 프로젝트에서는 Jetpack Compose 컴포저블 파일명과 해당 파일의 메인 컴포저블 함수명이 일치해야 합니다 (예: CherrishBasicChip.kt 파일에는 CherrishBasicChip 컴포저블 함수).

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 넵넵 수정하겠습니다 :)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Comment on lines +45 to +48
.fillMaxSize()
.clip(shape = RoundedCornerShape(size = 9.dp))
.background(backgroundColor)
.border(width = 1.dp, color = lineColor, shape = RoundedCornerShape(size = 10.dp))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

테두리 반경 불일치 및 fillMaxSize 사용을 수정하세요.

두 가지 중요한 문제가 있습니다:

  1. 테두리 반경 불일치: Line 46의 clip은 9.dp를 사용하고 Line 48의 border는 10.dp를 사용하여 시각적 불일치가 발생합니다. 동일한 값으로 통일해야 합니다.

  2. fillMaxSize 사용: 칩 컴포넌트에 .fillMaxSize()를 사용하는 것은 일반적이지 않습니다. 칩은 보통 콘텐츠에 맞춰 크기가 결정되어야 합니다. 부모가 크기를 제어해야 한다면 외부에서 modifier를 통해 전달하는 것이 더 적절합니다.

🐛 제안하는 수정사항
     Row(
         modifier = modifier
-            .fillMaxSize()
-            .clip(shape = RoundedCornerShape(size = 9.dp))
+            .clip(shape = RoundedCornerShape(size = 10.dp))
             .background(backgroundColor)
             .border(width = 1.dp, color = lineColor, shape = RoundedCornerShape(size = 10.dp))
             .clickable(onClick = onClick)
             .padding(horizontal = 12.dp, vertical = 6.dp),
         verticalAlignment = Alignment.CenterVertically
     ) {
📝 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.

Suggested change
.fillMaxSize()
.clip(shape = RoundedCornerShape(size = 9.dp))
.background(backgroundColor)
.border(width = 1.dp, color = lineColor, shape = RoundedCornerShape(size = 10.dp))
.clip(shape = RoundedCornerShape(size = 10.dp))
.background(backgroundColor)
.border(width = 1.dp, color = lineColor, shape = RoundedCornerShape(size = 10.dp))
🤖 Prompt for AI Agents
In
@app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt
around lines 45 - 48, Unify the corner radius and stop forcing full size: in the
modifier chain on the CherrishSelection chip (the Modifier call that currently
uses .fillMaxSize(), .clip(RoundedCornerShape(9.dp)), .background(...),
.border(..., RoundedCornerShape(10.dp))), remove .fillMaxSize(), and use the
same RoundedCornerShape value for both clip and border (e.g., 8.dp or 9.dp) so
the radii match; ensure the component accepts and applies an external Modifier
parameter rather than forcing size so parent composables can control chip
sizing.

Comment on lines +83 to +90
Text(
text = "여드름 ∙ 트러블",
fontSize = 20.sp,
style = CherrishTheme.typography.body1M14,
color = textColor,

textAlign = TextAlign.Center
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

fontSize와 style을 중복 사용하지 마세요.

Line 85와 86에서 fontSize = 20.spstyle = CherrishTheme.typography.body1M14를 동시에 사용하고 있습니다. fontSize 파라미터가 style의 fontSize를 덮어쓰게 되어 타이포그래피 시스템의 일관성이 깨집니다. 둘 중 하나만 사용하세요.

♻️ 제안하는 수정

타이포그래피 스타일만 사용:

                     Text(
                         text = "여드름 ∙ 트러블",
-                        fontSize = 20.sp,
                         style = CherrishTheme.typography.body1M14,
                         color = textColor,
-
                         textAlign = TextAlign.Center
                     )

또는 적절한 타이포그래피 스타일 선택 (20.sp가 필요한 경우):

                     Text(
                         text = "여드름 ∙ 트러블",
-                        fontSize = 20.sp,
-                        style = CherrishTheme.typography.body1M14,
+                        style = CherrishTheme.typography.headlineB20,
                         color = textColor,
-
                         textAlign = TextAlign.Center
                     )
📝 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.

Suggested change
Text(
text = "여드름 ∙ 트러블",
fontSize = 20.sp,
style = CherrishTheme.typography.body1M14,
color = textColor,
textAlign = TextAlign.Center
)
Text(
text = "여드름 ∙ 트러블",
style = CherrishTheme.typography.body1M14,
color = textColor,
textAlign = TextAlign.Center
)
🤖 Prompt for AI Agents
In
@app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt
around lines 83 - 90, The Text composable is passing both fontSize and style
which conflicts: remove the redundant fontSize parameter and rely on the
typography style (use style = CherrishTheme.typography.body1M14) or instead
select/update a typography entry that defines 20.sp and keep only style; update
the Text invocation inside CherrishSelction (the Text(...) with text = "여드름 ∙
트러블") to use a single source of truth for font sizing by deleting fontSize =
20.sp or by replacing style with the appropriate typography that already has
20.sp.

Comment on lines +124 to +130
Text(
text = "반신욕 20분",
style = CherrishTheme.typography.body1M14,
color = textColor,
modifier = Modifier.align(Alignment.BottomStart),
fontSize = 15.sp
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

fontSize와 style 중복 사용을 수정하세요.

Line 129에서 fontSize = 15.sp가 Line 126의 style = CherrishTheme.typography.body1M14의 fontSize를 덮어씁니다. 이는 디자인 시스템의 일관성을 해치므로 하나만 사용하세요.

♻️ 제안하는 수정
                     Text(
                         text = "반신욕 20분",
                         style = CherrishTheme.typography.body1M14,
                         color = textColor,
-                        modifier = Modifier.align(Alignment.BottomStart),
-                        fontSize = 15.sp
+                        modifier = Modifier.align(Alignment.BottomStart)
                     )
📝 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.

Suggested change
Text(
text = "반신욕 20분",
style = CherrishTheme.typography.body1M14,
color = textColor,
modifier = Modifier.align(Alignment.BottomStart),
fontSize = 15.sp
)
Text(
text = "반신욕 20분",
style = CherrishTheme.typography.body1M14,
color = textColor,
modifier = Modifier.align(Alignment.BottomStart)
)
🤖 Prompt for AI Agents
In
@app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt
around lines 124 - 130, The Text composable is overriding the typography's font
size by specifying fontSize = 15.sp while also using style =
CherrishTheme.typography.body1M14; remove the redundant fontSize attribute so
the Text uses the typography from CherrishTheme.typography.body1M14 (or if a
different size is intended, update the typography entry instead), keeping color
and modifier as-is.

Copy link
Copy Markdown
Contributor

@nhyeonii nhyeonii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

작업 속도 체고 ~~ 리뷰 확인하시구 반영 부탁드려요 !

Comment on lines +39 to +41
val backgroundColor = if (selected) cherrishColor.red200 else cherrishColor.gray0

val lineColor = if (selected) cherrishColor.red500 else cherrishColor.gray500
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image image

P1 : 피그마에서 확인할 수 있듯이 배경 컬러가 위, 아래가 달라요 ! sealed를 사용하든 enum을 사용하든 타입을 구별 해서 컬러를 따로 설정해주어야할 것 같숨둥.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 넵넵 아 같다구 생각했어요 ,, 적용해볼게요!!

Comment on lines +46 to +48
.clip(shape = RoundedCornerShape(size = 9.dp))
.background(backgroundColor)
.border(width = 1.dp, color = lineColor, shape = RoundedCornerShape(size = 10.dp))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image image

P1 : 이거 clip과 RoundedCornerShape의 dp가 다르네요 ~~ 그리고 이것도 위는 10.dp, 아래는 9.dp! 얘도 타입에 따라 다르게 지정되도록 명시해줘야 할 것 같숨둥

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 !! 타입에 따라 처리 완료했습니다 :)

.background(backgroundColor)
.border(width = 1.dp, color = lineColor, shape = RoundedCornerShape(size = 10.dp))
.clickable(onClick = onClick)
.padding(horizontal = 12.dp, vertical = 6.dp),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 요 padding은 어디서 나온 값들일까용 ?! 현재 두 종류의 칩들의 패딩값이 다 달라서 얘네도 따로 타입별 구분해주거나 아님 파라미터로 받아와야할 것 같아요.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 우선은 타입별로 구분해주었습니다 :)

@Composable
private fun CherrishSelectionChipPreview() {
CherrishTheme {
val cherrishColor = CherrishTheme.colors
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 요거 굳이 변수로 빼둔 이유가 있을까용 ?! val textColor = if (selected) CherrishTheme.colors.gray800 else CherrishTheme.colors.colors.gray700 이런식으로 변수 선언 안해주고 사용 가능해서요 !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드가 너무 길어지는 것 같아서 나눴는데 다시 변경해보겠습니다 :)

CherrishTheme {
val cherrishColor = CherrishTheme.colors
var selected by remember { mutableStateOf(value = false) }
val textColor = if (selected) cherrishColor.gray800 else cherrishColor.gray700
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 여기두 ~

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 고쳤습니다 :)

) {
Box(
modifier = Modifier
.fillMaxSize()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 얘두

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘도 한 번 fillMaxWidth로 바꿔서 다시 구현해보겠습니다 :)

) {
Text(
text = "여드름 ∙ 트러블",
fontSize = 20.sp,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : fontSize는 이미 style에 적용되어 있기 때문에 따로 작성 안해주셔도 댑니다 !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 사실 위에처럼 패딩을 직접 적용해서 그런지 글씨가 너무 작아보이더라고요 😭😭 그래서 font 사이즈를 더 키웠습니다 ..! 위에 코드 수정하고 이 코드는 지우도록 할게요 ! 😊

style = CherrishTheme.typography.body1M14,
color = textColor,
modifier = Modifier.align(Alignment.BottomStart),
fontSize = 15.sp
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 얘도 따로 지정해줄 필요없어용 !! style 속성에 이미 포함되어 있는거라

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 얘도 위에 지우고 다시 한번 해보겠습니다 !

Comment on lines +132 to +150
Box(
modifier = Modifier
.align(Alignment.TopEnd)
.size(size = 18.dp)
.clip(shape = RoundedCornerShape(percent = 50))
.border(
width = 1.dp,
color = lineColor,
shape = RoundedCornerShape(percent = 50)
),
contentAlignment = Alignment.Center
) {
if (selected) {
Box(
modifier = Modifier
.size(size = 8.dp)
.clip(shape = RoundedCornerShape(percent = 50))
.background(indicatorColor)
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 이 부분 아이콘으로 선택되었을 때, 안되었을 때 넣어줄거라 따로 Box로 만들지 않으셔도 될것 같아유 ~~

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 알겠습니다아 ,,!!

modifier = Modifier
.align(Alignment.TopEnd)
.size(size = 18.dp)
.clip(shape = RoundedCornerShape(percent = 50))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 요거 percent 머지....? dp로 사용해주세용!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 수정하겠습니다 ! !

Copy link
Copy Markdown
Contributor

@sohee6989 sohee6989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셧습니다!!

fun CherrishBasicChip(
onClick: () -> Unit,
modifier: Modifier = Modifier,
selected: Boolean,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 modifier 순서 지켜주세요!
필수 파라미터 - modifier - 선택 파라미터 이 순서를 공식 문서에서 권장하고 있습니다~!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 !! 넵넵 수정하겠습니다 감사합니다 ~~

selected: Boolean,
content: @Composable () -> Unit
) {
val cherrishColor = CherrishTheme.colors
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 변수로 안 빼고 사용해도 되지 않나여??
따로 빼신 이유가 있으실까요??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

길어지고 많이 쓰는 것 같아 뺏는데 ,, 큰 차이가 없더라고요 ,,,ㅎㅎ 그래서 변수로 안 빼는 쪽으로 수정하고 있습니다 ! !

Copy link
Copy Markdown
Contributor

@usuuhyn usuuhyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다 !


@Composable
fun CherrishBasicChip(
onClick: () -> Unit,
Copy link
Copy Markdown
Contributor

@usuuhyn usuuhyn Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

파라미터 순서 관련해서 제안드립니다!
필수 파라미터를 먼저 두고, 선택 인자는 그 다음으로 두는 방식으로 정리해주시면 가독성이 더 좋아질 것 같아용!!
확인 부탁드려요잉

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 !! 참고해서 수정할게용 감사합니다아 ~~~!!

@hyeminililo hyeminililo added FEAT✨ 새로운 기능 구현 혜민🍒 혜민 담당 labels Jan 9, 2026
- 피그마에 있는 2가지 타입에 맞춰 enum class 생성
- enum class(CherrishSelectionChipStyle)에 맞춰 background 및 cornerRadius 적용
- PaddingValues도 타입에 맞춰 재적용
- fillMaxSize() -> fillMaxWidth()로 변경 및 강제 패딩 지정 코드 삭제
- 불필요한 Box or Column 삭제
**하지만 아직 Preview만으로 피그마와 동일하게 구현 실패**
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (5)
app/src/main/java/com/cherrish/android/core/designsystem/type/CherrishSelectionChipStyle.kt (1)

3-6: enum 상수 네이밍 컨벤션 검토

enum 상수가 ALL_CAPS으로 작성되어 있습니다. Kotlin 권장 사항은 PascalCase를 사용하는 것입니다 (예: SelectionChip, MissionCard). 현재 코드도 동작하지만, Kotlin 스타일 가이드와의 일관성을 위해 고려해보시기 바랍니다.

♻️ PascalCase 적용 예시
 enum class CherrishSelectionChipStyle {
-    SELECTIONCHIP,
-    MISSIONCARD
+    SelectionChip,
+    MissionCard
 }
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt (4)

45-53: lineColor 로직 중복 제거

두 스타일 모두 동일한 lineColor 로직을 사용하고 있습니다. 중복을 제거하여 코드를 간결하게 만들 수 있습니다.

♻️ 중복 제거 제안
-    val lineColor = when (style) {
-        CherrishSelectionChipStyle.SELECTIONCHIP -> {
-            if (selected) CherrishTheme.colors.red500 else CherrishTheme.colors.gray500
-        }
-
-        CherrishSelectionChipStyle.MISSIONCARD -> {
-            if (selected) CherrishTheme.colors.red500 else CherrishTheme.colors.gray500
-        }
-    }
+    val lineColor = if (selected) CherrishTheme.colors.red500 else CherrishTheme.colors.gray500

67-76: 유연성 및 코드 중복 개선 고려

  1. fillMaxWidth()가 하드코딩되어 있어 칩이 항상 전체 너비를 차지합니다. 일부 사용 사례에서는 wrap_content가 필요할 수 있습니다.
  2. RoundedCornerShape(size = cornerRadius)가 Line 68과 Line 73에서 중복 생성되고 있습니다.
♻️ 개선 제안
+    val shape = RoundedCornerShape(size = cornerRadius)
+
     Column(
         modifier = modifier
-            .fillMaxWidth()
-            .clip(shape = RoundedCornerShape(size = cornerRadius))
+            .clip(shape = shape)
             .background(backgroundColor)
             .border(
                 width = 1.dp,
                 color = lineColor,
-                shape = RoundedCornerShape(size = cornerRadius)
+                shape = shape
             )
             .noRippleClickable(onClick = onClick)
             .padding(paddingValues),

참고: fillMaxWidth()는 사용 사례에 따라 외부 modifier로 제어하도록 남겨두는 것도 고려해보세요.


35-63: recomposition 최적화 고려 (선택적)

when 표현식들이 매 recomposition마다 재계산됩니다. remember(selected, style)를 사용하면 불필요한 재계산을 방지할 수 있지만, 현재 로직이 단순하므로 성능 영향은 미미할 것으로 예상됩니다.

💡 최적화 예시
val backgroundColor = remember(selected, style) {
    when (style) {
        CherrishSelectionChipStyle.SELECTIONCHIP -> {
            if (selected) CherrishTheme.colors.red200 else CherrishTheme.colors.gray0
        }
        CherrishSelectionChipStyle.MISSIONCARD -> {
            if (selected) CherrishTheme.colors.red100 else CherrishTheme.colors.gray0
        }
    }
}

101-105: 불필요한 modifier 제거

TextfillMaxWidth()가 적용되어 있지만, 상위 Column이 이미 horizontalAlignment = Alignment.CenterHorizontally를 사용하고 있습니다. 텍스트를 중앙 정렬하려는 의도라면 textAlign = TextAlign.Center를 사용하는 것이 더 명확합니다.

♻️ 개선 제안
             Text(
                 text = "여드름 ∙ 트러블",
-                modifier = Modifier.fillMaxWidth(),
-                color = textColor
+                color = textColor,
+                textAlign = TextAlign.Center
             )
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20a8bd5 and 23e7bdb.

📒 Files selected for processing (3)
  • .kotlin/sessions/kotlin-compiler-1582156177811419087.salive
  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
  • app/src/main/java/com/cherrish/android/core/designsystem/type/CherrishSelectionChipStyle.kt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
  • app/src/main/java/com/cherrish/android/core/designsystem/type/CherrishSelectionChipStyle.kt
🧠 Learnings (1)
📚 Learning: 2026-01-09T08:25:52.533Z
Learnt from: nhyeonii
Repo: TEAM-Cherrish/Cherrish-Android PR: 14
File: app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt:1-1
Timestamp: 2026-01-09T08:25:52.533Z
Learning: Enforce that the Kotlin file name under the design system chip package matches the main Jetpack Compose function name defined in that file. For example, CherrishBasicChip.kt should declare a top-level composable function named CherrishBasicChip. If the file name and main composable name do not align, flag for refactor. This improves consistency and discovery across the Android codebase (TEAM-Cherrish/Cherrish-Android).

Applied to files:

  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
🧬 Code graph analysis (1)
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt (1)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
⏰ 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). (2)
  • GitHub Check: PR Lint Check
  • GitHub Check: PR Build Check
🔇 Additional comments (1)
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt (1)

110-163: Preview 구현 확인 완료

Mission Card 스타일의 복잡한 UI(선택 표시기 포함)를 잘 시연하고 있습니다. Preview 함수의 색상 로직이 컴포넌트 로직과 일부 중복되지만, Preview의 특성상 독립적인 시연을 위해 불가피한 측면이 있습니다.

@Composable
fun CherrishSelectionChip(
onClick: () -> Unit,
selected: Boolean,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 보통 Boolean 값 변수명들은 isXXX 라고 네이밍하는 컨벤션을 따른답니당 !! 그리구 요기두 기본값 isSelected = false로 주는 건 어떨까용?!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 넵넵 이것두 반영할게요 !!

Comment on lines +45 to +53
val lineColor = when (style) {
CherrishSelectionChipStyle.SELECTIONCHIP -> {
if (selected) CherrishTheme.colors.red500 else CherrishTheme.colors.gray500
}

CherrishSelectionChipStyle.MISSIONCARD -> {
if (selected) CherrishTheme.colors.red500 else CherrishTheme.colors.gray500
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 요부분은 chipstyle에 따라 바뀌는게 아니라 고정 되어있는거라 그냥 .border( color = if (selected) CherrishTheme.colors.red500 else CherrishTheme.colors.gray500 ) 이렇게 주는게 코드 중복도 줄일 수 잇을 거 가타용

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정했습니다 !

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
@app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt:
- Around line 3-5: Remove the conflicting android.media.Image import so
references to Image resolve to androidx.compose.foundation.Image; in
CherrishSelectionChip.kt delete the import line "android.media.Image" and ensure
any Image(...) usages are using the composable androidx.compose.foundation.Image
(update fully-qualified names only if needed).
🧹 Nitpick comments (3)
app/src/main/res/drawable/ic_radiobtn_selected.xml (1)

1-14: 디자인 시스템 컬러 리소스(또는 tint) 기반으로 통일하는 걸 권장합니다.

현재 #FF617B, #00000000 하드코딩이라 테마/다크모드/컬러 변경 시 일괄 대응이 어려워요. 가능하면 @color/... 참조(또는 Compose에서 tint 적용 가능한 형태로)로 맞추고, 투명색은 @android:color/transparent로 두면 의도가 더 명확합니다.

app/src/main/res/drawable/ic_radiobtn_default.xml (1)

1-11: 기본(미선택) 아이콘도 컬러 하드코딩 대신 리소스 참조로 맞추는 걸 권장합니다.

#CACDD1, #00000000 하드코딩은 디자인 시스템 컬러 변경/테마 대응에 불리합니다. @color/...(또는 명확한 @android:color/transparent)로 통일해두면 유지보수가 쉬워요.

app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt (1)

40-60: 스타일 토큰(background/border/radius/padding) 계산은 한 곳으로 묶으면 유지보수가 쉬워요.

when(style)가 여러 번 반복돼서 스타일 추가/수정 시 누락 위험이 있습니다. style→토큰(data class)로 한 번에 매핑하는 형태를 고려해 주세요. (Line 60 주석 오타: “일떄”→“일 때”)

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23e7bdb and cd15ce3.

📒 Files selected for processing (4)
  • .kotlin/sessions/kotlin-compiler-1697198284998868167.salive
  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
  • app/src/main/res/drawable/ic_radiobtn_default.xml
  • app/src/main/res/drawable/ic_radiobtn_selected.xml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
🧠 Learnings (1)
📚 Learning: 2026-01-09T08:25:52.533Z
Learnt from: nhyeonii
Repo: TEAM-Cherrish/Cherrish-Android PR: 14
File: app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt:1-1
Timestamp: 2026-01-09T08:25:52.533Z
Learning: Enforce that the Kotlin file name under the design system chip package matches the main Jetpack Compose function name defined in that file. For example, CherrishBasicChip.kt should declare a top-level composable function named CherrishBasicChip. If the file name and main composable name do not align, flag for refactor. This improves consistency and discovery across the Android codebase (TEAM-Cherrish/Cherrish-Android).

Applied to files:

  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
🧬 Code graph analysis (1)
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt (1)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
⏰ 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). (2)
  • GitHub Check: PR Lint Check
  • GitHub Check: PR Build Check

Copy link
Copy Markdown
Contributor

@sohee6989 sohee6989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!!
리뷰 한번만 확인 부탁드립니다!!

CherrishSelectionChipStyle.MISSIONCARD -> PaddingValues(horizontal = 7.dp, vertical = 6.dp)
}

// 최소일떄 패딩
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p2: 이거 주석 지워주자요오~~

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 이게 찾아보다가 앱 화면이 가장 작은 경우 패딩을 지정해주는게 좋다는 의견을 받았는데 이런 부분도 구현을 하면 좋을까요 ??

일단 이 주석은 지우겠습니다 !

Image(
painter = painterResource(
id = if (selected)
R.drawable.ic_radiobtn_selected
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1: Painter는 내부적으로 이미지 처리 복잡성 때문에 stable 타입이 아니라서 경우에 따라 불필요한 리컴포지션이 발생할 수 있어 여기 아이콘들 svg 파일로 뽑아서 painterResource 대신에 ImageVector로 쓰는거 어떠세요??

둘의 차이점에 대해서 좀 더 찾아봐도 좋을 것 같습니다!!ㅎㅎ

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 넵넵 한 번 찾아보겠습니다 !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

한 번 찾아봤는데 제가 원래 작성한 Painter는 사진을 같이 그대로 쓰거나 복잡한 그래픽일 때 더 적절하네요 !! 복잡한 그래픽과 같은 비트맵을 보여줄 수 있어, 리컴포지션이 발생하는 걸로 이해했는데 맞을까요 ??
그리고 ImageVetor는 찾아보니 색상을 바꿀 수 있네요! ! 이와 관련해서 리팩토링 진행했습니다 ! 알려주셔서 감사합니다 ☺️

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맞습니다!!

https://developer.android.com/develop/ui/compose/graphics/images/optimization?hl=ko
이 공식 문서에서 관련 설명이 있어서 읽어보시면 좋을 것 같아요!!ㅎㅎ


CherrishSelectionChip(
onClick = { selected = !selected },
modifier = Modifier.fillMaxWidth().padding(all = 30.dp),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p2: modifier에 여러개를 쓸 때는 가독성을 위해 줄바꿈 부탁드려요오~!!ㅎㅎ

Suggested change
modifier = Modifier.fillMaxWidth().padding(all = 30.dp),
modifier = Modifier
.fillMaxWidth()
.padding(all = 30.dp),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 확인했습니다 !!

Text(
text = "반신욕 20분",
modifier = Modifier.align(Alignment.BottomStart).padding(
start = 7.dp,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1: 이거 혹시 컴포넌트 프리뷰 용 임시로 넣은거 아니죠???
아니면 이거 start 패딩 값이 8.dp인 것 같은데 확인 한번만 부탁드립니다!!
(혹시 제가 잘못 본거면 미리 죄송합니다..ㅎㅎ)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 프리뷰용으로 임시로 넣은것인데 다시 한 번 확인해보겠습니다 !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

다시 확인 해봤는데 7로 수정되었나봐요 ,,!!!

}

val paddingValues = when (style) {
CherrishSelectionChipStyle.SELECTIONCHIP -> PaddingValues(10.dp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1: 여기 horizontal = 10.dp, vertical = 30.dp로 넣어주면 될 것 같아요!!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오오 바뀌었네요 !! 감사합니다 !!


@Preview
@Composable
private fun CherrishSelectionChipPreview() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p3: 갑자기 든 생각인데 CherrishSelectionChip, CherrishMissionCard를 지금 프리뷰로 만들어서 어떤 식으로 사용하는지 보여주고 계신데요..!!

지금 CherrishSelectionChip 기반으로 이 두 컴포넌트가 전역적으로 사용되고 있으니 CherrishSelectionChip, CherrishMissionCard를 컴포넌트로 한 번 더 만들어서 사용하게끔하면 더 좋을 것 같습니다!

그렇게 되면 이 컴포넌트 사용성이 더 좋아질 것 같습니다!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 너무 좋네요 !! 그런데 그러면 컴포넌트로 각각 만들고, 바로 사용할 수 있게끔 하는게 좋은가용??
저는 디자인이 아직 확정되지 않았을 수 있어, 뷰를 직접 구현할 때 하는 것도 좋을 것 같다는 생각이 들어서요 ! !

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

컴포넌트로 만들어서 달라지는 부분에 대해서만 입력 후 바로 사용할 수 있게 하면 중복되는 코드도 줄고 더 편할 것 같습니다!

스크린샷 2026-01-11 오전 12 59 31

예를 들어 이 화면에서도 CherrishSelectionChip을 공통 컴포넌트로 미리 만들어두면 텍스트 내용만 바꿔서 재사용이 편할 것 같아요!

그리고 해당 칩이 시술 선택 플로우랑 챌리지 플로우에서 사용되고 있어서 공통 컴포넌트로 칩을 만들어둔거라 CherrishSelectionChip, CherrishMissionCard에 대해서도 지금 만들어두는게 오히려 더 좋지 않을까 합니다!
추가로 칩 부부은 디자인 확정된 거 같아서 미리 만들어놔도 될 것 같습니다!!ㅎㅎ

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 알겠습니다 ! 이와 맞춰 컴포넌트 구현 해서 리팩토링 진행해보겠습니다 :)

@hyeminililo hyeminililo requested a review from nhyeonii January 10, 2026 15:48
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a 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

🤖 Fix all issues with AI agents
In
@app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt:
- Line 154: Replace the hardcoded tint colors in CherrishSelectionChip with
theme colors from CherrishTheme.colors: use CherrishTheme.colors.primary (or the
theme color that represents selected state) instead of red700, and use
CherrishTheme.colors.surfaceVariant or a neutral/unselected color from
CherrishTheme.colors instead of gray500; update the tint assignment in the
CherrishSelectionChip composable accordingly so the chip follows the design
system.
🧹 Nitpick comments (1)
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt (1)

41-65: 선택적 최적화: 계산된 값들을 remember로 메모이제이션 고려

backgroundColor, lineColor, cornerRadius, paddingValues가 매 recomposition마다 재계산됩니다. 현재는 단순한 조건 분기이므로 성능 영향이 미미하지만, 더 나은 최적화를 위해 remember로 메모이제이션을 고려할 수 있습니다.

♻️ 최적화 제안
+    val backgroundColor = remember(isSelected, style) {
+        when (style) {
+            CherrishSelectionChipStyle.SELECTIONCHIP -> {
+                if (isSelected) CherrishTheme.colors.red200 else CherrishTheme.colors.gray0
+            }
+            CherrishSelectionChipStyle.MISSIONCARD -> {
+                if (isSelected) CherrishTheme.colors.red100 else CherrishTheme.colors.gray0
+            }
+        }
+    }
-    val backgroundColor = when (style) {
-        CherrishSelectionChipStyle.SELECTIONCHIP -> {
-            if (isSelected) CherrishTheme.colors.red200 else CherrishTheme.colors.gray0
-        }
-        CherrishSelectionChipStyle.MISSIONCARD -> {
-            if (isSelected) CherrishTheme.colors.red100 else CherrishTheme.colors.gray0
-        }
-    }

다른 계산된 값들에도 동일하게 적용할 수 있습니다.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 274971b and 61a8e30.

📒 Files selected for processing (1)
  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
🧠 Learnings (1)
📚 Learning: 2026-01-09T08:25:52.533Z
Learnt from: nhyeonii
Repo: TEAM-Cherrish/Cherrish-Android PR: 14
File: app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelction.kt:1-1
Timestamp: 2026-01-09T08:25:52.533Z
Learning: Enforce that the Kotlin file name under the design system chip package matches the main Jetpack Compose function name defined in that file. For example, CherrishBasicChip.kt should declare a top-level composable function named CherrishBasicChip. If the file name and main composable name do not align, flag for refactor. This improves consistency and discovery across the Android codebase (TEAM-Cherrish/Cherrish-Android).

Applied to files:

  • app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
🧬 Code graph analysis (1)
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt (1)
app/src/main/java/com/cherrish/android/core/designsystem/theme/Theme.kt (1)
  • CherrishTheme (38-61)
⏰ 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). (2)
  • GitHub Check: PR Lint Check
  • GitHub Check: PR Build Check
🔇 Additional comments (4)
app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt (4)

100-108: 패딩 값 확인 필요

CherrishSelectionBaseChip에서 이미 vertical = 30.dp 패딩이 적용되고(Line 61), Text에 추가로 vertical = 40.dp 패딩이 적용되어 총 수직 패딩이 70dp가 됩니다. Figma 디자인 명세와 일치하는지 확인해 주세요.


162-177: LGTM!

프리뷰 함수가 올바르게 구현되었습니다. 상호작용 가능한 상태를 사용하여 선택/비선택 동작을 테스트할 수 있도록 구성되어 있습니다.


179-194: LGTM!

미션 카드 칩 프리뷰가 적절하게 구현되었습니다. 상호작용 테스트를 위한 상태 관리가 잘 되어 있습니다.


1-194: 전체적으로 잘 구현된 디자인 시스템 컴포넌트입니다

재사용 가능한 선택 칩 컴포넌트가 Jetpack Compose 모범 사례를 따라 잘 구현되었습니다. 파일명이 주요 컴포저블 함수명과 일치하며, 코드 구조가 명확하고 이해하기 쉽습니다. 기본 컴포넌트(CherrishSelectionBaseChip)와 특화된 변형들(CherrishSelectionChip, CherrishMissionCardChip)로 계층화된 설계가 우수합니다.

Based on learnings, 파일명과 주요 컴포저블 함수명의 일관성이 유지되고 있습니다.

R.drawable.ic_radiobtn_default
}
),
tint = if (selected) red700 else gray500,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

디자인 시스템 일관성 유지: 테마 컬러 사용

하드코딩된 색상(red700, gray500) 대신 CherrishTheme.colors를 사용해야 디자인 시스템의 일관성이 유지됩니다. 다른 부분에서는 CherrishTheme.colors를 사용하고 있습니다.

🎨 테마 컬러 적용 제안
-                tint = if (selected) red700 else gray500,
+                tint = if (selected) CherrishTheme.colors.red700 else CherrishTheme.colors.gray500,
📝 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.

Suggested change
tint = if (selected) red700 else gray500,
tint = if (selected) CherrishTheme.colors.red700 else CherrishTheme.colors.gray500,
🤖 Prompt for AI Agents
In
@app/src/main/java/com/cherrish/android/core/designsystem/component/chip/CherrishSelectionChip.kt
at line 154, Replace the hardcoded tint colors in CherrishSelectionChip with
theme colors from CherrishTheme.colors: use CherrishTheme.colors.primary (or the
theme color that represents selected state) instead of red700, and use
CherrishTheme.colors.surfaceVariant or a neutral/unselected color from
CherrishTheme.colors instead of gray500; update the tint assignment in the
CherrishSelectionChip composable accordingly so the chip follows the design
system.

Copy link
Copy Markdown
Contributor

@nhyeonii nhyeonii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우오아 두개 아예 컴포넌트로 만들어둬서 사용하기 넘넘 편할거 같아용 !! 거의 다왔다 ! CherrishSelectionChip얘랑 CherrishMissionCardChip 얘 파일 분리 해주시면 좋을 거 같습니다 !! 리뷰 반영해주세요 ~~

text = text,
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 40.dp),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 요 패딩은 어디에서 나온 패딩일까요 ..?!? 얘 없어도 대지 않나요 ..?!

@Composable
fun CherrishSelectionChip(
text: String,
selected: Boolean,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
selected: Boolean,
isSelected: Boolean,

P1 : 바꿔줘잉 🫰

@Composable
fun CherrishMissionCardChip(
text: String,
selected: Boolean,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
selected: Boolean,
isSelected: Boolean,

P1 : 바꿔줘잉 ~~

modifier = Modifier
.align(Alignment.BottomStart)
.padding(
start = 7.dp,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image image

P1 : 요거 패딩값 이상하다 !!

.padding (top = 38.dp)
.padding (vertical = 6.dp, horizontal = 8. dp)

이렇게 되어야할듯합니다요

@hyeminililo hyeminililo merged commit 3e43cc6 into develop Jan 11, 2026
3 checks passed
@hyeminililo hyeminililo changed the title [FEAT] 선택 공통 컴포넌트 구현 [FEAT/#8] 선택 공통 컴포넌트 구현 Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEAT✨ 새로운 기능 구현 혜민🍒 혜민 담당

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 선택 공통 컴포넌트 구현

4 participants