Skip to content

Conversation

jinukeu
Copy link
Member

@jinukeu jinukeu commented Jan 16, 2025

💡 Issue

🌱 Key changes

  • NestedCheckbox 구현했습니다.

✅ To Reviewers

📸 스크린샷

스크린샷
image

Summary by CodeRabbit

  • 새로운 기능

    • 중첩 체크박스 컴포넌트 추가
    • 대형 입력 텍스트 컴포넌트에 비밀번호 입력 기능 도입
  • 디자인 시스템 개선

    • 체크박스의 기본 스타일과 색상 설정
    • 입력 텍스트 컴포넌트의 상호작용 소스 유연성 향상
  • 리소스 추가

    • 체크마크 아이콘 벡터 드로어블 리소스 도입

@jinukeu jinukeu added the Feature 기능 추가, 개발 label Jan 16, 2025
@jinukeu jinukeu requested a review from ashwon12 January 16, 2025 14:59
@jinukeu jinukeu self-assigned this Jan 16, 2025
Copy link

coderabbitai bot commented Jan 16, 2025

Important

Review skipped

Auto reviews are limited to specific labels.

🏷️ Labels to auto review (1)
  • CodeRabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

워크스루

이 풀 리퀘스트는 디자인 시스템에 새로운 중첩 체크박스 컴포넌트를 도입합니다. Jetpack Compose를 사용하여 구현된 이 컴포넌트는 다양한 크기와 스타일의 체크박스를 지원하며, 기본 색상, 텍스트 스타일, 아이콘 크기 등을 커스터마이즈할 수 있습니다. 또한 입력 텍스트 컴포넌트에 대한 일부 개선 사항과 새로운 체크 아이콘 벡터 드로어블이 추가되었습니다.

변경 사항

파일 변경 요약
NestedCheckbox.kt 중첩 체크박스 컴포넌트의 기본, 일반, 작은 크기 함수 추가
NestedCheckboxDefaults.kt 중첩 체크박스의 기본 색상, 스타일, 크기 설정
InputText.kt 입력 텍스트 컴포넌트의 상호작용 소스 및 비밀번호 입력 처리 개선
icon_check.xml 새로운 체크 아이콘 벡터 드로어블 추가

연결된 이슈에 대한 평가

목표 해결 여부 설명
중첩 체크박스 컴포넌트 구현 [#17]
다양한 크기와 스타일 지원

아마도 관련된 PR들

제안된 라벨

CodeRabbit

제안된 리뷰어

  • ashwon12

시퀀스 다이어그램

sequenceDiagram
    participant User
    participant NestedCheckbox
    participant NestedCheckboxColors

    User->>NestedCheckbox: 체크박스 상태 변경
    NestedCheckbox->>NestedCheckboxColors: 색상 업데이트
    NestedCheckboxColors-->>NestedCheckbox: 새 색상 반환
    NestedCheckbox->>User: 시각적 피드백 제공
Loading

시 (토끼의 노래)

🐰 체크박스의 춤,
작고 귀여운 디자인의 꿈
색깔 변하고 상태 춤추네
사용자의 손길 따라
디자인 시스템의 작은 기쁨 🎨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@ashwon12 ashwon12 left a comment

Choose a reason for hiding this comment

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

고생하셨어요 ~~ !

@jinukeu
Copy link
Member Author

jinukeu commented Jan 17, 2025

@coderabbitai review

Copy link

coderabbitai bot commented Jan 17, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between b448c16 and 682c97f.

📒 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

Comment on lines 22 to 57
@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,
)
}
}
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

접근성 및 의미론적 개선이 필요합니다.

다음 사항들을 개선하면 좋을 것 같습니다:

  1. 체크박스의 현재 상태를 반영하는 더 자세한 contentDescription
  2. 클릭 이벤트에 대한 시맨틱 속성 추가

다음과 같이 수정해보세요:

 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.

Suggested change
@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,
)
}
}

@jinukeu jinukeu merged commit cfccf42 into develop Jan 17, 2025
1 check was pending
@jinukeu jinukeu deleted the feature/#17-designsystem-nestedcheckbox branch February 10, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature 기능 추가, 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] DesignSystem Nested Checkbox
2 participants