-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/#17 designsystem nestedcheckbox #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 워크스루이 풀 리퀘스트는 디자인 시스템에 새로운 중첩 체크박스 컴포넌트를 도입합니다. Jetpack Compose를 사용하여 구현된 이 컴포넌트는 다양한 크기와 스타일의 체크박스를 지원하며, 기본 색상, 텍스트 스타일, 아이콘 크기 등을 커스터마이즈할 수 있습니다. 또한 입력 텍스트 컴포넌트에 대한 일부 개선 사항과 새로운 체크 아이콘 벡터 드로어블이 추가되었습니다. 변경 사항
연결된 이슈에 대한 평가
아마도 관련된 PR들
제안된 라벨
제안된 리뷰어
시퀀스 다이어그램sequenceDiagram
participant User
participant NestedCheckbox
participant NestedCheckboxColors
User->>NestedCheckbox: 체크박스 상태 변경
NestedCheckbox->>NestedCheckboxColors: 색상 업데이트
NestedCheckboxColors-->>NestedCheckbox: 새 색상 반환
NestedCheckbox->>User: 시각적 피드백 제공
시 (토끼의 노래)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨어요 ~~ !
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🔭 Outside diff range comments (1)
core/designsystem/src/main/java/com/yapp/core/designsystem/component/input/text/InputText.kt (1)
Line range hint
212-282
: 비밀번호 유효성 검사 추가를 고려해보세요.현재 구현은 잘 되어있지만, 다음 기능들을 추가하면 좋을 것 같습니다:
- 최소 길이 검사
- 특수문자/숫자 포함 여부 검사
- 비밀번호 강도 표시
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
core/designsystem/src/main/java/com/yapp/core/designsystem/component/input/nestedcheckbox/NestedCheckbox.kt
(1 hunks)core/designsystem/src/main/java/com/yapp/core/designsystem/component/input/nestedcheckbox/NestedCheckboxDefaults.kt
(1 hunks)core/designsystem/src/main/java/com/yapp/core/designsystem/component/input/text/InputText.kt
(4 hunks)core/designsystem/src/main/res/drawable/icon_check.xml
(1 hunks)
🔇 Additional comments (3)
core/designsystem/src/main/java/com/yapp/core/designsystem/component/input/nestedcheckbox/NestedCheckboxDefaults.kt (1)
42-67
: 잘 구조화된 구현입니다!다음과 같은 좋은 구현 사례들이 보입니다:
@Immutable
어노테이션을 통한 불변성 보장@Stable
어노테이션을 사용한 리컴포지션 최적화- 깔끔한 색상 선택 로직
core/designsystem/src/main/java/com/yapp/core/designsystem/component/input/nestedcheckbox/NestedCheckbox.kt (1)
59-103
: 구현이 깔끔합니다!기본값을 적절히 설정하고
YappNestedCheckboxBasic
을 재사용하여 컴포지션 패턴을 잘 따르고 있습니다.core/designsystem/src/main/java/com/yapp/core/designsystem/component/input/text/InputText.kt (1)
63-63
: 널러블 매개변수 처리가 잘 되어있습니다!
interactionSource
를 널러블로 만들고remember
를 사용하여 기본값을 제공하는 방식이 적절합니다.Also applies to: 70-71, 181-181, 188-189
...ain/java/com/yapp/core/designsystem/component/input/nestedcheckbox/NestedCheckboxDefaults.kt
Show resolved
Hide resolved
...ain/java/com/yapp/core/designsystem/component/input/nestedcheckbox/NestedCheckboxDefaults.kt
Show resolved
Hide resolved
...ain/java/com/yapp/core/designsystem/component/input/nestedcheckbox/NestedCheckboxDefaults.kt
Show resolved
Hide resolved
...em/src/main/java/com/yapp/core/designsystem/component/input/nestedcheckbox/NestedCheckbox.kt
Show resolved
Hide resolved
@Composable | ||
fun YappNestedCheckboxBasic( | ||
modifier: Modifier, | ||
checked: Boolean, | ||
text: String, | ||
textStyle: TextStyle, | ||
iconSize: Dp, | ||
iconRightSpacing: Dp, | ||
colors: NestedCheckboxColors, | ||
onCheckedChange: ((Boolean) -> Unit), | ||
) { | ||
val iconColor = colors.iconColor(checked = checked) | ||
val textColor = colors.textColor(checked = checked) | ||
|
||
Row( | ||
modifier = modifier | ||
.yappClickable( | ||
onClick = { onCheckedChange(!checked) }, | ||
) | ||
) { | ||
Icon( | ||
modifier = Modifier.size(iconSize), | ||
painter = painterResource(R.drawable.icon_check), | ||
tint = iconColor, | ||
contentDescription = "체크 아이콘" | ||
) | ||
|
||
Spacer(Modifier.width(iconRightSpacing)) | ||
|
||
Text( | ||
text = text, | ||
style = textStyle, | ||
color = textColor, | ||
) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
접근성 및 의미론적 개선이 필요합니다.
다음 사항들을 개선하면 좋을 것 같습니다:
- 체크박스의 현재 상태를 반영하는 더 자세한 contentDescription
- 클릭 이벤트에 대한 시맨틱 속성 추가
다음과 같이 수정해보세요:
Row(
modifier = modifier
.yappClickable(
onClick = { onCheckedChange(!checked) },
+ role = Role.Checkbox
)
) {
Icon(
modifier = Modifier.size(iconSize),
painter = painterResource(R.drawable.icon_check),
tint = iconColor,
- contentDescription = "체크 아이콘"
+ contentDescription = if (checked) "선택됨" else "선택되지 않음"
)
📝 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.
@Composable | |
fun YappNestedCheckboxBasic( | |
modifier: Modifier, | |
checked: Boolean, | |
text: String, | |
textStyle: TextStyle, | |
iconSize: Dp, | |
iconRightSpacing: Dp, | |
colors: NestedCheckboxColors, | |
onCheckedChange: ((Boolean) -> Unit), | |
) { | |
val iconColor = colors.iconColor(checked = checked) | |
val textColor = colors.textColor(checked = checked) | |
Row( | |
modifier = modifier | |
.yappClickable( | |
onClick = { onCheckedChange(!checked) }, | |
) | |
) { | |
Icon( | |
modifier = Modifier.size(iconSize), | |
painter = painterResource(R.drawable.icon_check), | |
tint = iconColor, | |
contentDescription = "체크 아이콘" | |
) | |
Spacer(Modifier.width(iconRightSpacing)) | |
Text( | |
text = text, | |
style = textStyle, | |
color = textColor, | |
) | |
} | |
} | |
@Composable | |
fun YappNestedCheckboxBasic( | |
modifier: Modifier, | |
checked: Boolean, | |
text: String, | |
textStyle: TextStyle, | |
iconSize: Dp, | |
iconRightSpacing: Dp, | |
colors: NestedCheckboxColors, | |
onCheckedChange: ((Boolean) -> Unit), | |
) { | |
val iconColor = colors.iconColor(checked = checked) | |
val textColor = colors.textColor(checked = checked) | |
Row( | |
modifier = modifier | |
.yappClickable( | |
onClick = { onCheckedChange(!checked) }, | |
role = Role.Checkbox | |
) | |
) { | |
Icon( | |
modifier = Modifier.size(iconSize), | |
painter = painterResource(R.drawable.icon_check), | |
tint = iconColor, | |
contentDescription = if (checked) "선택됨" else "선택되지 않음" | |
) | |
Spacer(Modifier.width(iconRightSpacing)) | |
Text( | |
text = text, | |
style = textStyle, | |
color = textColor, | |
) | |
} | |
} |
💡 Issue
🌱 Key changes
✅ To Reviewers
📸 스크린샷
Summary by CodeRabbit
새로운 기능
디자인 시스템 개선
리소스 추가