Skip to content

Conversation

@moondev03
Copy link
Member

@moondev03 moondev03 commented Jan 25, 2026

📌 작업 내용

  • 디자인 시스템에 사용될 PrezelRadio 컴포넌트를 추가했습니다.
  • 이 컴포넌트는 선택 상태에 따라 채워진 아이콘과 외곽선 아이콘으로 구분되며,
  • 아이콘만 표시하거나 텍스트 라벨과 함께 사용할 수 있습니다.
  • PreviewScaffold 개선 (Default ContainerColor, ContentColor 설정)

🧩 관련 이슈


📸 스크린샷

스크린샷

image

터치 영역 참고용

image

📢 논의하고 싶은 내용

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능
    • 디자인 시스템에 새로운 라디오 버튼 컴포넌트 추가 — 아이콘 전용 및 텍스트 라벨형, 일반/대형 크기 옵션 제공.
  • 리팩터
    • 미리보기 화면 레이아웃이 Scaffold 기반으로 변경되어 테마 색상과 안쪽 패딩을 더 잘 반영합니다.
  • 잡일(Chores)
    • 정적 분석 설정에서 일부 파라미터 복잡도 임계값이 조정되었습니다.

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

디자인 시스템에 사용될 `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와 겹치지 않도록 개선했습니다.
@moondev03 moondev03 self-assigned this Jan 25, 2026
@moondev03 moondev03 added the ✨ feat 새로운 기능 추가 또는 기존 기능 확장 label Jan 25, 2026
@moondev03 moondev03 linked an issue Jan 25, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

Walkthrough

디자인 시스템에 새로운 라디오 버튼 컴포넌트가 추가되었습니다. PrezelRadioSize 열거형(REGULAR 40.dp, LARGE 48.dp)을 도입했고, 아이콘 전용 PrezelRadio(checked, onCheckedChange, modifier, size)와 텍스트 레이블 포함 PrezelRadio(text, checked, onCheckedChange, modifier, size, textStyle, textColor)의 두 공용 Composable 오버로드를 추가했습니다. 내부적으로 아이콘 렌더링, 토글 동작과 라디오 시맨틱스를 처리하는 PrezelRadioIcon이 포함되며 프리뷰 함수가 추가되었습니다. 또한 PreviewComponent의 미리보기 레이아웃이 Scaffold로 감싸져 insets를 반영하도록 변경되었고, detekt 설정에서 LongParameterList 임계값이 7에서 8로 상향 조정되었습니다.

Possibly related PRs

  • Number System 설계 및 구현 #18: Preview 컴포넌트 및 미리보기 스캐폴드 변경을 다루며 PreviewComponent 레이아웃 변경과 코드 레벨에서 직접 관련되어 있음.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.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의 주요 변경사항인 PrezelRadio 컴포넌트 구현을 명확하게 설명하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿의 모든 필수 섹션(작업 내용, 관련 이슈, 스크린샷)을 포함하고 있으며 충분한 세부정보를 제공합니다.
Linked Issues check ✅ Passed PrezelRadio 컴포넌트가 Prezel 서비스 테마가 적용되어 구현되었으며, 아이콘 전용 및 텍스트 라벨 포함 사용을 모두 지원하고 있습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 #35 이슈의 범위 내에 있으며, detekt 설정 변경과 PreviewScaffold 개선도 컴포넌트 구현을 지원하는 관련 변경입니다.

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


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

Copy link
Contributor

@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
`@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: Spacerpadding 사용은 의도대로 동작하지 않을 수 있습니다.

Spacer는 기본적으로 0x0 크기이므로 padding을 사용하면 공간이 생기긴 하지만, 이는 일반적인 사용 패턴이 아닙니다. Modifier.width()를 사용하는 것이 더 명확합니다.

♻️ 수정 제안
-        Spacer(modifier = Modifier.padding(PrezelTheme.spacing.V4))
+        Spacer(modifier = Modifier.width(PrezelTheme.spacing.V4))

`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`에 포함된 불필요한 앞쪽 공백을 제거했습니다.
Copy link
Contributor

@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
`@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.

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.

PrezelRadio 구현

2 participants