-
Notifications
You must be signed in to change notification settings - Fork 1
PrezelRadio 구현 #44
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
base: develop
Are you sure you want to change the base?
PrezelRadio 구현 #44
Conversation
디자인 시스템에 사용될 `PrezelRadio` 컴포넌트를 추가했습니다. 이 컴포넌트는 선택 상태에 따라 채워진 아이콘과 외곽선 아이콘으로 구분되며, 아이콘만 표시하거나 텍스트 라벨과 함께 사용할 수 있습니다.
* **컴포넌트 추가**: `PrezelRadio` 컴포저블 함수를 추가했습니다.
* 아이콘만 있는 버전과 텍스트 라벨을 포함한 버전을 오버로딩하여 제공합니다.
* `checked` 상태에 따라 `RadioCircleFilled`와 `RadioCircleOutlined` 아이콘을 사용합니다.
* **크기 옵션 추가**: `PrezelRadioSize` enum (`REGULAR`, `LARGE`)을 추가하여 라디오 버튼의 크기를 조절할 수 있도록 했습니다.
* **미리보기 추가**: `PrezelRadioPreview`를 통해 다양한 상태와 크기의 라디오 버튼을 시각적으로 확인할 수 있도록 구현했습니다.
Detekt의 정적 분석 규칙 중 `LongParameterList`의 함수 파라미터 최대 개수(`functionThreshold`)를 7에서 8로 상향 조정했습니다.
디자인 시스템 프리뷰의 공통 레이아웃을 담당하는 `PreviewScaffold` 컴포저블의 구현 방식을 `Column`에서 Material3의 `Scaffold`로 변경했습니다. * `Column`과 수동으로 설정하던 배경색(`background`)을 `Scaffold`의 `containerColor`로 대체했습니다. * `Scaffold`의 `contentColor`를 지정하여 하위 컴포넌트의 기본 텍스트 색상을 설정했습니다. * `Scaffold`가 제공하는 `innerPadding`을 `Column`에 적용하여 콘텐츠가 시스템 UI와 겹치지 않도록 개선했습니다.
Walkthrough디자인 시스템에 새로운 라디오 버튼 컴포넌트가 추가되었습니다. Possibly related PRs
🚥 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. Comment |
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: 2
🤖 Fix all issues with AI agents
In
`@Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelRadio.kt`:
- Line 144: The SectionTitle call contains an unintended leading space in the
string literal; remove the leading space so SectionTitle receives
"PrezelRadioSize.LARGE" instead of " PrezelRadioSize.LARGE"—locate the
SectionTitle(...) invocation in PrezelRadio.kt and update the string passed
(referencing SectionTitle and the PrezelRadioSize.LARGE text) to eliminate the
extra whitespace.
- Around line 110-115: 내부 PrezelRadio가 자체 Modifier.toggleable을 여전히 적용해 아이콘 클릭 시
내부 toggleable이 이벤트를 소비하는 문제입니다; 이를 고치려면 내부에 제스처를 적용하지 않는 시각적 컴포저블(예:
PrezelRadioContent 또는 PrezelRadio의 파라미터로 toggleableEnabled/interactionEnabled를
추가하여 false로 끌 수 있는 변형)을 만들어 외부 Row의 toggleable이 실제로 클릭을 처리하도록 하세요; 내부 컴포저블은
toggleable을 제거하고 필요하면 Modifier.clearAndSetSemantics로 접근성 시맨틱만 설정하도록 변경하고, 기존
PrezelRadio 호출부는 해당 non-toggleable 시각 컴포저블을 사용하도록 바꿔주세요.
🧹 Nitpick comments (1)
Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelRadio.kt (1)
117-117:Spacer에padding사용은 의도대로 동작하지 않을 수 있습니다.
Spacer는 기본적으로 0x0 크기이므로padding을 사용하면 공간이 생기긴 하지만, 이는 일반적인 사용 패턴이 아닙니다.Modifier.width()를 사용하는 것이 더 명확합니다.♻️ 수정 제안
- Spacer(modifier = Modifier.padding(PrezelTheme.spacing.V4)) + Spacer(modifier = Modifier.width(PrezelTheme.spacing.V4))
...l/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelRadio.kt
Outdated
Show resolved
Hide resolved
...l/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelRadio.kt
Outdated
Show resolved
Hide resolved
`PrezelRadio` 컴포넌트의 가독성과 명확성을 개선하기 위해 `Spacer`와 패딩 관련 코드를 수정했습니다. * `Row`의 `toggleable` Modifier 체이닝에서 `padding`을 다음 줄로 이동하여 가독성을 높였습니다. * 수평 간격을 명시적으로 나타내기 위해 `Spacer(modifier = Modifier.padding(V4))`를 `Spacer(modifier = Modifier.width(V4))`로 변경했습니다.
`PrezelRadio`와 `PrezelRadioWithText` 컴포저블의 내부 구현을 개선하여 코드 중복을 줄이고 구조를 명확하게 변경했습니다.
* **기능 분리**: 아이콘을 그리는 로직을 `PrezelRadioIcon`이라는 별도의 private 컴포저블로 추출했습니다.
* **코드 개선**:
* `PrezelRadio`와 `PrezelRadioWithText`가 `PrezelRadioIcon`을 재사용하도록 하여 중복 코드를 제거했습니다.
* 불필요한 `clearAndSetSemantics` 수식어 호출을 삭제했습니다.
* 수식어(Modifier) 체이닝 순서를 `size` 다음에 `toggleable`이 오도록 조정하여 일관성을 높였습니다.
`PrezelRadio` 컴포넌트의 미리보기(`@Preview`) 코드에서 `SectionTitle`에 포함된 불필요한 앞쪽 공백을 제거했습니다.
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: 1
🤖 Fix all issues with AI agents
In
`@Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelRadio.kt`:
- Around line 111-128: The touch padding is applied after the passed-in modifier
(which contains .toggleable), so the outer 8dp padding isn't included in the
touch target; in PrezelRadioIcon reorder the modifiers so padding is applied
before size and before .then(modifier) (e.g., use
Modifier.padding(PrezelTheme.spacing.V8).size(size.value).then(modifier)) so the
padding becomes part of the final touchable area.
📌 작업 내용
PrezelRadio컴포넌트를 추가했습니다.PreviewScaffold개선 (Default ContainerColor, ContentColor 설정)🧩 관련 이슈
📸 스크린샷
스크린샷
터치 영역 참고용
📢 논의하고 싶은 내용
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.