Conversation
`PrezelTabs` 컴포넌트에서 뱃지 표시 기능을 제거하고 관련 데이터 구조를 단순화하였습니다. * `PrezelBadge` 컴포넌트 및 `PrezelBadgeSize` 관련 파일 삭제 * `PrezelTabItem` 데이터 클래스를 제거하고 `tabs` 파라미터 타입을 `ImmutableList<String>`으로 변경 * `PrezelTabs` 내부에서 뱃지 표시(`badgeCount`), 활성화 상태(`enabled`) 처리 로직 삭제 * `PrezelTabLabel`의 간격 설정을 `PrezelTheme.spacing.V8`로 수정 * 컴포넌트 단순화에 따른 프리뷰 코드 업데이트
`PrezelTabs` 컴포넌트 내 탭 인디케이터(`tabIndicatorOffset`) 설정 코드의 줄바꿈과 공백을 정리하여 가독성을 개선했습니다.
WalkthroughPrezelBadge 디자인 시스템 컴포넌트가 완전 삭제되었고 PrezelTabs는 탭 모델을 Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt (1)
70-111:⚠️ Potential issue | 🟠 Major배지 제거와 별개로 탭 비활성화 기능까지 사라져 UX 회귀 가능성이 있습니다.
Line 74 및 Line 108-111 기준으로
enabled제어가 완전히 제거되어, 이제 비활성 탭을 표현/차단할 수 없습니다. 이 PR 목표가 “배지 제거”라면 기능 범위가 과도하게 줄어든 변경입니다. 비활성 제어는 독립 API로 유지하는 편이 안전합니다.제안 패치 (비활성 제어를 문자열 탭 구조와 분리 유지)
`@Composable` fun PrezelTabs( tabs: ImmutableList<String>, pagerState: PagerState, modifier: Modifier = Modifier, size: PrezelTabSize = PrezelTabSize.Regular, userScrollEnabled: Boolean = true, + tabEnabled: (index: Int) -> Boolean = { true }, content: `@Composable` (pageIndex: Int) -> Unit, ) { @@ PrezelTabsBar( tabs = tabs, pagerState = pagerState, size = size, + tabEnabled = tabEnabled, onTabClick = { index -> handleTabClick(scope, pagerState, index) }, ) @@ private fun PrezelTabsBar( tabs: ImmutableList<String>, pagerState: PagerState, size: PrezelTabSize, + tabEnabled: (index: Int) -> Boolean, onTabClick: (index: Int) -> Unit, ) { @@ tabs.forEachIndexed { index, label -> PrezelTabContent( label = label, selected = pagerState.currentPage == index, + enabled = tabEnabled(index), size = size, onClick = { onTabClick(index) }, ) } } } @@ private fun PrezelTabContent( label: String, selected: Boolean, + enabled: Boolean, size: PrezelTabSize, onClick: () -> Unit, ) { Tab( selected = selected, + enabled = enabled, onClick = onClick, modifier = Modifier.height(if (size == PrezelTabSize.Small) 36.dp else 48.dp),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt` around lines 70 - 111, Restore the tab "enabled" control that was removed: update PrezelTabContent to accept an enabled: Boolean parameter and pass it to the Tab(...) call (Tab(selected=..., onClick=..., enabled=enabled, ...)), and update PrezelTabsBar to supply that enabled flag per tab (e.g., extend the tabs model or add a parallel List<Boolean>/ImmutableList<Boolean> or a data class for each tab) so PrezelTabsBar calls PrezelTabContent(label=..., selected=..., size=..., enabled=enabledForIndex, onClick={...}). Ensure function signatures PrezelTabsBar and PrezelTabContent and calls to Tab use the new enabled parameter so disabled tabs are rendered and click-blocked as before.
🧹 Nitpick comments (1)
Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt (1)
128-136: 현재 구조에서는Row + spacedBy가 불필요합니다.Line 130은 자식이
Text1개인 상태라 간격 값이 적용되지 않습니다. 단순Text로 줄이면 가독성이 좋아집니다.제안 패치 (라벨 렌더링 단순화)
`@Composable` private fun PrezelTabLabel( label: String, size: PrezelTabSize, ) { - Row( - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(PrezelTheme.spacing.V8), - ) { - Text( - text = label, - style = if (size == PrezelTabSize.Small) PrezelTextStyles.Body3Medium.toTextStyle() else PrezelTextStyles.Body2Bold.toTextStyle(), - ) - } + Text( + text = label, + style = if (size == PrezelTabSize.Small) { + PrezelTextStyles.Body3Medium.toTextStyle() + } else { + PrezelTextStyles.Body2Bold.toTextStyle() + }, + ) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt` around lines 128 - 136, The Row wrapper around the single Text in PrezelTabs.kt is unnecessary (spacedBy has no effect with one child); remove the Row and render the Text directly using the existing label and size logic (keep the conditional style: if (size == PrezelTabSize.Small) PrezelTextStyles.Body3Medium.toTextStyle() else PrezelTextStyles.Body2Bold.toTextStyle()), and delete the verticalAlignment and horizontalArrangement parameters (and any unused imports) to simplify and improve readability.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In
`@Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt`:
- Around line 70-111: Restore the tab "enabled" control that was removed: update
PrezelTabContent to accept an enabled: Boolean parameter and pass it to the
Tab(...) call (Tab(selected=..., onClick=..., enabled=enabled, ...)), and update
PrezelTabsBar to supply that enabled flag per tab (e.g., extend the tabs model
or add a parallel List<Boolean>/ImmutableList<Boolean> or a data class for each
tab) so PrezelTabsBar calls PrezelTabContent(label=..., selected=..., size=...,
enabled=enabledForIndex, onClick={...}). Ensure function signatures
PrezelTabsBar and PrezelTabContent and calls to Tab use the new enabled
parameter so disabled tabs are rendered and click-blocked as before.
---
Nitpick comments:
In
`@Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt`:
- Around line 128-136: The Row wrapper around the single Text in PrezelTabs.kt
is unnecessary (spacedBy has no effect with one child); remove the Row and
render the Text directly using the existing label and size logic (keep the
conditional style: if (size == PrezelTabSize.Small)
PrezelTextStyles.Body3Medium.toTextStyle() else
PrezelTextStyles.Body2Bold.toTextStyle()), and delete the verticalAlignment and
horizontalArrangement parameters (and any unused imports) to simplify and
improve readability.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelBadge.ktPrezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt
💤 Files with no reviewable changes (1)
- Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelBadge.kt
`PrezelTabs`의 가독성을 높이고 코드 구조를 단순화하기 위해 내부 컴포넌트를 정리했습니다. * `PrezelTabLabel` 컴포저블을 제거하고 `PrezelTab`의 `text` 파라미터 내로 로직을 통합했습니다. * 불필요한 `Row`, `Arrangement`, `Spacer` 임포트 및 레이아웃 구조를 정리했습니다. * `PrezelTab` 아이템의 높이 설정 로직을 `Modifier.height`로 간소화했습니다.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt (1)
99-119: 탭별enabled상태 제거에 대한 논의PR 본문에서 언급하신 대로,
PrezelTabItem제거로 인해 탭별enabled상태 제어 기능이 함께 제거되었습니다. 현재Tab컴포넌트는enabled파라미터를 제공하지 않아 모든 탭이 항상 활성화된 상태입니다.만약 향후 특정 탭을 비활성화해야 하는 요구사항이 있다면 API 재설계가 필요할 수 있습니다. 현재 요구사항에서 탭 비활성화가 불필요하다면 이 단순화는 적절합니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt` around lines 99 - 119, PrezelTabContent currently has no way to disable a tab; add an explicit enabled: Boolean = true parameter to PrezelTabContent and use it to prevent clicks and render disabled visuals: when enabled is false pass onClick = {} (or wrap onClick with if (enabled) call) to Tab, and adjust text/color rendering (use PrezelTheme.colors.textDisabled or LocalContentAlpha/alpha) to appear disabled; update any callers (replacing removed PrezelTabItem) to supply enabled where needed and ensure Tab's selected/visual behavior continues to work with the new enabled flag.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt`:
- Around line 99-119: PrezelTabContent currently has no way to disable a tab;
add an explicit enabled: Boolean = true parameter to PrezelTabContent and use it
to prevent clicks and render disabled visuals: when enabled is false pass
onClick = {} (or wrap onClick with if (enabled) call) to Tab, and adjust
text/color rendering (use PrezelTheme.colors.textDisabled or
LocalContentAlpha/alpha) to appear disabled; update any callers (replacing
removed PrezelTabItem) to supply enabled where needed and ensure Tab's
selected/visual behavior continues to work with the new enabled flag.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/component/PrezelTabs.kt
📌 작업 내용
🧩 관련 이슈
📸 스크린샷
📢 논의하고 싶은 내용
PrezelTabItem에서 badgeCount가 제거되어서 딱히 존재이유가 없다 느껴져서 data class도 제거했습니다.
TabItem의 enabled를 따로 설정할 일이 있을까요?
Summary by CodeRabbit
릴리스 노트