Skip to content

[REFATOR/#54] SelectionSection 리팩토링#55

Merged
usuuhyn merged 1 commit intodevelopfrom
refactor/#54-selection-section-component
Jan 13, 2026
Merged

[REFATOR/#54] SelectionSection 리팩토링#55
usuuhyn merged 1 commit intodevelopfrom
refactor/#54-selection-section-component

Conversation

@usuuhyn
Copy link
Copy Markdown
Contributor

@usuuhyn usuuhyn commented Jan 13, 2026

Related issue 🛠

Work Description ✏️

  • MissionCard 관련 코드 삭제
  • descriptionTextStyle -> nullable로 변경

Screenshot 📸

SelectionSectionWithDescription SelectionSection

Uncompleted Tasks 😅

N/A

To Reviewers 📢

CherrishSelectionSection .. 미션카드 컴포넌트 수정되면서 SelectionSection으로 강등됏습니다ㅜㅜ 파일 위치랑 파일 이름이랑 다 바꿧어용~~

Summary by CodeRabbit

릴리스 노트

  • 리팩토링
    • 선택 섹션 컴포넌트의 구조가 간소화되었습니다.
    • 렌더링 로직이 통일되어 안정성이 향상되었습니다.
    • 텍스트 스타일 옵션이 더욱 유연해졌습니다.

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

- MissionCard 관련 코드 삭제
- descriptionTextStyle -> nullable로 변경
@usuuhyn usuuhyn self-assigned this Jan 13, 2026
@usuuhyn usuuhyn requested a review from a team as a code owner January 13, 2026 20:01
@usuuhyn usuuhyn added REFACTOR💡 앱 로직의 구조와 품질 개선 수현🍒 수현 담당 labels Jan 13, 2026
@usuuhyn usuuhyn linked an issue Jan 13, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 13, 2026

Walkthrough

CherrishSectionChipType 열거형을 제거하고 SelectionSection 컴포넌트를 리팩토링합니다. 함수명을 변경하고, 패키지 위치를 이동하며, MissionCard 분기를 제거하고 CherrishSelectionChip만 사용하도록 통합합니다.

Changes

Cohort / File(s) 변경 사항
CherrishSectionChipType 삭제
app/src/main/java/com/cherrish/android/core/designsystem/component/type/CherrishSectionChipType.kt
SELECTION_CHIP, MISSION_CARD 상수를 가진 공개 열거형 클래스 전체 제거
SelectionSection 리팩토링
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt
함수명 CherrishSelectionSection → SelectionSection 변경, chipType 매개변수 제거, CherrishMissionCard 의존성 제거, descriptionTextStyle을 nullable 옵션 매개변수로 변경, SelectionChipGrid → ChipGrid로 내부 이름 변경, 패키지 위치 변경

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #14: CherrishSelectionChip 및 CherrishSelectionChipStyle 추가 작업과 직접 연결되어 있으며, 이 PR에서 단일 SelectionSection으로 통합됨
  • PR #39: 이 PR에서 도입된 CherrishSectionChipType 열거형과 chipType 기반 분기를 제거하고 단순화함
  • PR #31: CherrishSelectionChip/CherrishMissionCard 리팩토링과 관련되어 있으며, 이 PR에서 MissionCard 분기를 제거하고 SelectionChip만 사용하도록 변경함

Suggested reviewers

  • sohee6989
  • nhyeonii
🚥 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 제목 '[REFATOR/#54] SelectionSection 리팩토링'는 변경사항의 핵심을 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿의 모든 필수 섹션을 포함하고 있으며, 작업 내용, 스크린샷, 검토자 참고사항이 적절히 작성되어 있습니다.
Linked Issues check ✅ Passed PR의 모든 코드 변경사항이 #54 이슈의 요구사항을 충족하고 있습니다: CherrishSelectionSection 이름 변경, 파일 위치 이동, MissionCard 코드 삭제, descriptionTextStyle 널러블 변경 모두 구현됨.
Out of Scope Changes check ✅ Passed 모든 변경사항이 #54 이슈의 범위 내에 있으며, 요구되지 않은 추가 변경사항은 없습니다.

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

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent 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 d750ca3 and 9908dc2.

📒 Files selected for processing (2)
  • app/src/main/java/com/cherrish/android/core/designsystem/component/type/CherrishSectionChipType.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt
💤 Files with no reviewable changes (1)
  • app/src/main/java/com/cherrish/android/core/designsystem/component/type/CherrishSectionChipType.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/presentation/calendar/procedure/component/SelectionSection.kt
🧠 Learnings (1)
📚 Learning: 2026-01-12T19:49:27.085Z
Learnt from: nhyeonii
Repo: TEAM-Cherrish/Cherrish-Android PR: 41
File: app/src/main/java/com/cherrish/android/presentation/challenge/ChallengeScreen.kt:30-39
Timestamp: 2026-01-12T19:49:27.085Z
Learning: When a Jetpack Compose screen composable receives a Scaffold paddingValues: PaddingValues parameter (commonly from Scaffold), apply it to the root container's modifier first (e.g., .padding(paddingValues)) before applying any additional padding. This ensures content respects system bars (status/navigation) and avoids layout overlap. This pattern should be followed across presentation screens under app/src/main/java/com/cherrish/android/presentation/ to maintain consistent insets handling.

Applied to files:

  • app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt
⏰ 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 Build Check
  • GitHub Check: PR Lint Check
🔇 Additional comments (3)
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt (3)

26-53: LGTM!

PR 목표에 맞게 CherrishSelectionSection에서 SelectionSection으로 이름이 변경되었고, descriptionTextStyle이 nullable로 변경되었습니다. 파라미터 순서(필수 파라미터 → modifier → 선택적 파라미터)가 Compose 컨벤션을 잘 따르고 있으며, 상태 호이스팅 패턴도 적절히 적용되어 있습니다.


83-109: LGTM!

descriptionTextStyle가 nullable로 변경되었고, null일 경우 기본 스타일(CherrishTheme.typography.body1R14)을 사용하는 방식이 깔끔합니다. isNullOrBlank() 체크를 통한 description 처리도 적절합니다.


111-141: LGTM!

Preview 함수들이 SelectionSection의 두 가지 사용 케이스(description 유무)를 잘 테스트하고 있습니다. mutableIntStateOf 사용과 persistentListOf를 통한 불변 리스트 활용이 적절합니다.


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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt (1)

55-81: 72번 라인의 불필요한 빈 줄을 제거하세요.

itemsIndexed 람다의 매개변수 다음에 있는 빈 줄(72번)은 제거하면 코드 가독성이 개선됩니다.

또한 LazyVerticalGrid에 명시적인 높이 제약이 없어서, 이 컴포넌트가 향후 스크롤 가능한 부모 컨테이너(예: LazyColumn, verticalScroll())에 통합될 때 중첩 스크롤 문제가 발생할 수 있습니다. 사용 사례에 따라 wrapContentHeight() 또는 부모에서 높이를 제한하는 방식으로 처리하는 것을 권장합니다.

📜 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 d750ca3 and 9908dc2.

📒 Files selected for processing (2)
  • app/src/main/java/com/cherrish/android/core/designsystem/component/type/CherrishSectionChipType.kt
  • app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt
💤 Files with no reviewable changes (1)
  • app/src/main/java/com/cherrish/android/core/designsystem/component/type/CherrishSectionChipType.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/presentation/calendar/procedure/component/SelectionSection.kt
🧠 Learnings (1)
📚 Learning: 2026-01-12T19:49:27.085Z
Learnt from: nhyeonii
Repo: TEAM-Cherrish/Cherrish-Android PR: 41
File: app/src/main/java/com/cherrish/android/presentation/challenge/ChallengeScreen.kt:30-39
Timestamp: 2026-01-12T19:49:27.085Z
Learning: When a Jetpack Compose screen composable receives a Scaffold paddingValues: PaddingValues parameter (commonly from Scaffold), apply it to the root container's modifier first (e.g., .padding(paddingValues)) before applying any additional padding. This ensures content respects system bars (status/navigation) and avoids layout overlap. This pattern should be followed across presentation screens under app/src/main/java/com/cherrish/android/presentation/ to maintain consistent insets handling.

Applied to files:

  • app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt
⏰ 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 Build Check
  • GitHub Check: PR Lint Check
🔇 Additional comments (3)
app/src/main/java/com/cherrish/android/presentation/calendar/procedure/component/SelectionSection.kt (3)

26-53: LGTM!

PR 목표에 맞게 CherrishSelectionSection에서 SelectionSection으로 이름이 변경되었고, descriptionTextStyle이 nullable로 변경되었습니다. 파라미터 순서(필수 파라미터 → modifier → 선택적 파라미터)가 Compose 컨벤션을 잘 따르고 있으며, 상태 호이스팅 패턴도 적절히 적용되어 있습니다.


83-109: LGTM!

descriptionTextStyle가 nullable로 변경되었고, null일 경우 기본 스타일(CherrishTheme.typography.body1R14)을 사용하는 방식이 깔끔합니다. isNullOrBlank() 체크를 통한 description 처리도 적절합니다.


111-141: LGTM!

Preview 함수들이 SelectionSection의 두 가지 사용 케이스(description 유무)를 잘 테스트하고 있습니다. mutableIntStateOf 사용과 persistentListOf를 통한 불변 리스트 활용이 적절합니다.

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.

수고하셨습니다!

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.

LGTM ~~ 🚀🚀🚀🚀 고생했어요 ~~

@usuuhyn usuuhyn merged commit 5e82518 into develop Jan 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

REFACTOR💡 앱 로직의 구조와 품질 개선 수현🍒 수현 담당

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] CherrishSelectionSection 리팩토링

3 participants