File Uploader UI 컴포넌트 추가, PrezelIcons 추가#136
Conversation
- 속도(`ic_speed`), 왕관(`ic_crown`), 우상단 화살표(`ic_arrow_top_right`) 아이콘 추가 - 시작 서클(`ic_start_circle`), 별 외곽선(`ic_star_outlined`), 채워진 별(`ic_star_filled`) 아이콘 추가 - `core:designsystem` 모듈의 drawable 리소스 구성
- 파일 업로드 상태(LOADING, UPLOADED, PAUSED, PLAYING) 및 타입(SCRIPT, AUDIO) 정의 - 업로드 진행률 표시를 위한 `PrezelProgressBar` 연동 - 오디오 타입일 경우 재생/일시정지 제어 및 탐색(Seek) 바 기능 구현 - `FileUploader` 관련 접근성 설명 및 문자열 리소스 추가 - 디자인 시스템 테마 및 아이콘 적용 내역 반영
- `FileUploader` 내의 복잡한 조건부 렌더링 로직을 `FileUploaderContent` 컴포넌트로 분리 - 오디오 재생 중일 때 현재 재생 시간의 텍스트 색상을 강조(interactiveRegular)하도록 변경 - `buildAnnotatedString`을 사용하여 현재 시간과 전체 시간을 하나의 `Text` 컴포넌트 내에서 서로 다른 스타일로 표시 - `strings.xml`에서 `time_range` 포맷을 `time_separator`(/)로 변경하여 유연한 텍스트 구성 지원 - `AudioProgressRow` 및 관련 컴포넌트의 파라미터 구조 정리 및 미리보기 데이터 업데이트
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough파일 업로더 Jetpack Compose 컴포넌트와 6개의 디자인 시스템 아이콘 자산이 추가됩니다. FileUploader는 스크립트 및 오디오 파일을 지원하며, 로딩/업로드/재생/일시정지 상태를 표시하고, 오디오의 경우 대화형 시크바 제어와 접근성 semantics를 포함합니다. ChangesFileUploader 컴포넌트 및 디자인 시스템 아이콘
Suggested labels
🚥 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. 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt`:
- Around line 237-240: The touch target for the play/pause icon is too small
(Modifier.size(20.dp) and 24.dp) so update the UI in FileUploader.kt where the
icon uses Modifier.size(20.dp) / 24.dp with clickable(onClick = if (playing)
onPauseClick else onPlayClick) to ensure a minimum touch area of ~48.dp: wrap or
replace the current modifier with a larger hit target (e.g.,
Modifier.size(48.dp).clickable(...)) and keep the visual icon at 20/24.dp
centered inside (use a Box or align/requiredSize for the inner icon) so the
clickable area is larger while the visible icon stays the same; apply the same
change to the other occurrence that uses 24.dp.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: caba49a8-7d92-443c-978e-4f99d9f7279a
📒 Files selected for processing (8)
Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_arrow_top_right.xmlPrezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_crown.xmlPrezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_speed.xmlPrezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_star_filled.xmlPrezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_star_outlined.xmlPrezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_start_circle.xmlPrezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.ktPrezel/core/ui/src/main/res/values/strings.xml
- `FileUploaderType` 및 `FileUploaderState`를 `sealed interface` 구조의 `FileUploaderState`로 통합하여 타입 안정성 강화 - `ScriptStatus`(LOADING, UPLOADED)와 `AudioStatus`(LOADING, PAUSED, PLAYING)로 세부 상태 분리 - 오디오 재생 바의 `AudioSeekHandle` 위치가 진행률에 따라 정확하게 중앙에 위치하도록 오프셋 계산 로직 수정 - 클릭 가능한 요소들에 `noRippleClickable`을 적용하여 불필요한 리플 효과 제거 - 대화형 프리뷰(`FileUploaderInteractivePreview`) 추가하여 재생 및 탐색 동작 검증 가능하도록 개선
- FileUploaderState 하위 상태를 enum 기반에서 sealed interface 및 data object 기반으로 변경 - FileUploaderState.Script와 FileUploaderState.Audio의 세부 상태를 계층 구조로 재정의 - 더 이상 사용되지 않는 ScriptStatus 및 AudioStatus 열거형 제거 - 상태 구조 변경에 맞춰 FileUploader 컴포저블의 로직 및 프리뷰 코드 업데이트
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt (1)
415-415:⚠️ Potential issue | 🟡 Minor | ⚡ Quick win로딩 중에
100%가 먼저 보일 수 있습니다.
roundToInt()는 99.5% 이상을100으로 올려서, 아직Loading상태인데 완료처럼 보이게 만들 수 있습니다. 완료 여부는 이미state로 구분하고 있으니 퍼센트 표시는 내림 처리하는 쪽이 더 안전합니다.수정 예시
-private fun Float.toPercentValue(): Int = (coerceIn(0f, 1f) * 100).roundToInt() +private fun Float.toPercentValue(): Int = (coerceIn(0f, 1f) * 100).toInt()🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt` at line 415, The percent conversion in Float.toPercentValue() can round 99.5% up to 100 and show completion prematurely; change the implementation to always truncate (e.g., use toInt() or floor after multiplying by 100) instead of roundToInt(), so progress values less than 100 remain below 100 while the real completion is determined by state (update the Float.toPercentValue function accordingly).
♻️ Duplicate comments (1)
Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt (1)
244-257:⚠️ Potential issue | 🟡 Minor | ⚡ Quick win재생/취소 버튼의 터치 영역이 아직 너무 작습니다.
noRippleClickable로 바뀌었지만 실제 hit area는 여전히 20dp/24dp 수준이라 오탭 가능성이 큽니다. 보이는 아이콘 크기는 유지하고, 클릭 가능한 외곽만 최소 48dp로 키우는 편이 안전합니다.수정 예시
- Icon( - painter = painterResource(if (playing) PrezelIcons.Pause else PrezelIcons.Play), - contentDescription = stringResource( - if (playing) { - R.string.core_ui_file_uploader_pause_desc - } else { - R.string.core_ui_file_uploader_play_desc - }, - ), - tint = PrezelTheme.colors.iconRegular, - modifier = Modifier - .size(20.dp) - .noRippleClickable(onClick = if (playing) onPauseClick else onPlayClick), - ) + Box( + modifier = Modifier + .size(48.dp) + .noRippleClickable(onClick = if (playing) onPauseClick else onPlayClick), + contentAlignment = Alignment.Center, + ) { + Icon( + painter = painterResource(if (playing) PrezelIcons.Pause else PrezelIcons.Play), + contentDescription = stringResource( + if (playing) { + R.string.core_ui_file_uploader_pause_desc + } else { + R.string.core_ui_file_uploader_play_desc + }, + ), + tint = PrezelTheme.colors.iconRegular, + modifier = Modifier.size(20.dp), + ) + }Box( modifier = modifier + .size(48.dp) .clip(PrezelTheme.shapes.V1000) .noRippleClickable(onClick = onClick), contentAlignment = Alignment.Center, ) {Also applies to: 400-410
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt` around lines 244 - 257, The Icon's clickable hit target is too small: keep the visible icon at 20.dp but wrap or change the Icon's Modifier so the clickable area is at least 48.dp (e.g., use Modifier.size(48.dp).noRippleClickable(...).then(Modifier.size(20.dp)) or add padding to center the 20.dp icon inside a 48.dp clickable box) so taps hit reliably; update the Icon usage where the Modifier currently chains .size(20.dp).noRippleClickable(...) (and the similar occurrence around lines 400-410) to use a 48.dp clickable container with the 20.dp visual size inside.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt`:
- Around line 99-104: The multiline when block that computes isLoading violates
ktlint (missing trailing comma and newline before "->"); update the when entries
in FileUploader.kt so each multi-line branch list ends with a trailing comma and
place a newline before the arrow (e.g., for FileUploaderState.Script.Loading,
FileUploaderState.Audio.Loading, FileUploaderState.Script.Uploaded,
FileUploaderState.Audio.Paused, FileUploaderState.Audio.Playing) to satisfy
ktlint formatting rules and restore CI.
---
Outside diff comments:
In
`@Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt`:
- Line 415: The percent conversion in Float.toPercentValue() can round 99.5% up
to 100 and show completion prematurely; change the implementation to always
truncate (e.g., use toInt() or floor after multiplying by 100) instead of
roundToInt(), so progress values less than 100 remain below 100 while the real
completion is determined by state (update the Float.toPercentValue function
accordingly).
---
Duplicate comments:
In
`@Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt`:
- Around line 244-257: The Icon's clickable hit target is too small: keep the
visible icon at 20.dp but wrap or change the Icon's Modifier so the clickable
area is at least 48.dp (e.g., use
Modifier.size(48.dp).noRippleClickable(...).then(Modifier.size(20.dp)) or add
padding to center the 20.dp icon inside a 48.dp clickable box) so taps hit
reliably; update the Icon usage where the Modifier currently chains
.size(20.dp).noRippleClickable(...) (and the similar occurrence around lines
400-410) to use a 48.dp clickable container with the 20.dp visual size inside.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: cf032d07-5414-45f8-a246-b223bbdc326a
📒 Files selected for processing (1)
Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt
- `toPercentValue` 확장 함수에서 `roundToInt()` 대신 `toInt()`를 사용하여 소수점 버림 처리 - `isLoading` 변수의 `when` 문 분기 처리 로직에 trailing comma를 적용하여 가독성 개선
📌 작업 내용
core-ui모듈에FileUploader컴포넌트 추가SCRIPT,AUDIO)와 상태(LOADING,UPLOADED,PAUSED,PLAYING)에 따라 UI 분기디자인 시스템 아이콘 리소스 추가
🧩 관련 이슈
📸 스크린샷
Summary by CodeRabbit
릴리스 노트