Skip to content

File Uploader UI 컴포넌트 추가, PrezelIcons 추가#136

Merged
HamBeomJoon merged 6 commits into
developfrom
feat/#135-file-uploader-component
May 21, 2026
Merged

File Uploader UI 컴포넌트 추가, PrezelIcons 추가#136
HamBeomJoon merged 6 commits into
developfrom
feat/#135-file-uploader-component

Conversation

@HamBeomJoon
Copy link
Copy Markdown
Contributor

@HamBeomJoon HamBeomJoon commented May 19, 2026

📌 작업 내용

  • core-ui 모듈에 FileUploader 컴포넌트 추가

    • 파일 종류(SCRIPT, AUDIO)와 상태(LOADING, UPLOADED, PAUSED, PLAYING)에 따라 UI 분기
    • 업로드 진행률, 업로드 완료, 오디오 일시정지/재생 상태 표시
    • 취소, 재생, 일시정지, seek 콜백을 외부에서 주입받는 controlled UI 형태로 구현
  • 디자인 시스템 아이콘 리소스 추가

    • ic_arrow_top_right, ic_crown, ic_speed, ic_star_filled, ic_star_outlined, ic_start_circle 아이콘 추가

🧩 관련 이슈


📸 스크린샷

스크린샷 2026-05-19 16 42 49

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능
    • 파일 업로드 UI 추가 — 스크립트 및 오디오 지원, 재생/일시정지 제어, 시크(탭/드래그) 및 진행률/시간 표시, 접근성(스크린리더) 지원 포함
    • 디자인 아이콘 6종 추가 — 화살표, 왕관, 속도, 채워진 별, 윤곽별, 시작 원형 아이콘 및 관련 문자열 리소스 추가

Review Change Stack

- 속도(`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` 및 관련 컴포넌트의 파라미터 구조 정리 및 미리보기 데이터 업데이트
@HamBeomJoon HamBeomJoon self-assigned this May 19, 2026
@HamBeomJoon HamBeomJoon requested a review from moondev03 as a code owner May 19, 2026 07:46
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Warning

Rate limit exceeded

@HamBeomJoon has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 48 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ebb4a017-bfab-4307-ad14-048dce692bf7

📥 Commits

Reviewing files that changed from the base of the PR and between 5bcfbfb and 7f465ae.

📒 Files selected for processing (1)
  • Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt
📝 Walkthrough

Walkthrough

파일 업로더 Jetpack Compose 컴포넌트와 6개의 디자인 시스템 아이콘 자산이 추가됩니다. FileUploader는 스크립트 및 오디오 파일을 지원하며, 로딩/업로드/재생/일시정지 상태를 표시하고, 오디오의 경우 대화형 시크바 제어와 접근성 semantics를 포함합니다.

Changes

FileUploader 컴포넌트 및 디자인 시스템 아이콘

Layer / File(s) Summary
디자인 시스템 아이콘 자산
Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_arrow_top_right.xml, Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_crown.xml, Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_speed.xml, Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_star_filled.xml, Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_star_outlined.xml, Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_start_circle.xml
6개의 벡터 드로어블(24dp, viewport 24)이 추가되어 각각 path로 아이콘을 정의합니다.
FileUploader 상태 계약
Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt (1-81줄)
FileUploaderState를 sealed interface 계층으로 재구성하여 Script/Audio 및 상태(Loading/Uploaded/Paused/Playing)를 캡슐화합니다.
FileUploader 메인 컴포넌트 및 콘텐츠 분기
Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt (83-182줄)
진행률을 [0f,1f]로 보정하고 상태에 따라 오디오 제어 또는 파일명+업로드 진행 행으로 분기하는 메인 컴포저블과 FileUploaderContent를 구현합니다.
업로드 진행 표시 및 보조 컴포저블
Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt (199-229줄, 395-416줄)
PrezelProgressBar 기반 업로드 진행 표시, 파일명 텍스트, CancelButton 및 Float.toPercentValue 헬퍼를 제공합니다.
오디오 헤더·시간·진행 표시
Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt (231-314줄)
AudioFileHeader, AudioProgressRow, AudioTimeText를 통해 재생/일시정지 아이콘과 시간 표시를 렌더링합니다.
오디오 시크바 및 상호작용
Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt (316-393줄)
AudioSeekBar는 트랙 너비 측정, 탭/드래그 제스처 처리, semantics(setProgress/ProgressBarRangeInfo) 노출을 구현하며, AudioSeekTrack/AudioSeekHandle은 트랙 채움과 핸들 위치를 그립니다.
미리보기 및 대화형 데모
Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt (417-499줄)
FileUploaderPreview와 FileUploaderInteractivePreview로 고정 상태와 재생 시뮬레이션을 제공합니다.
FileUploader 지역화 문자열
Prezel/core/ui/src/main/res/values/strings.xml (25-33줄)
취소, 재생, 일시정지, 진행률, 시크 설명, 진행률 퍼센트 포맷, 시간 구분자 등 문자열 리소스 7개가 추가됩니다.

Suggested labels

✨ feat

🚥 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의 주요 변경 사항(FileUploader UI 컴포넌트 및 PrezelIcons 추가)을 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿의 필수 섹션(작업 내용, 관련 이슈, 스크린샷)을 모두 포함하고 있으며 상세하게 작성되었습니다.
Linked Issues check ✅ Passed FileUploader 컴포넌트 구현, 상태 관리 구조화, 오디오 컨트롤 제공, 디자인 시스템 아이콘 추가 등 이슈 #135의 모든 요구사항을 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 FileUploader 컴포넌트 및 디자인 시스템 아이콘 추가라는 이슈 #135의 범위 내에 있습니다.

✏️ 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.

❤️ Share

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

@HamBeomJoon HamBeomJoon added the ✨ feat 새로운 기능 추가 또는 기존 기능 확장 label May 19, 2026
Copy link
Copy Markdown
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

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9885fe8 and 3afc8ca.

📒 Files selected for processing (8)
  • Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_arrow_top_right.xml
  • Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_crown.xml
  • Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_speed.xml
  • Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_star_filled.xml
  • Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_star_outlined.xml
  • Prezel/core/designsystem/src/main/res/drawable/core_designsystem_ic_start_circle.xml
  • Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt
  • Prezel/core/ui/src/main/res/values/strings.xml

Comment thread Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt Outdated
- `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 컴포저블의 로직 및 프리뷰 코드 업데이트
Copy link
Copy Markdown
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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3afc8ca and 5bcfbfb.

📒 Files selected for processing (1)
  • Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt

Comment thread Prezel/core/ui/src/main/java/com/team/prezel/core/ui/component/FileUploader.kt Outdated
- `toPercentValue` 확장 함수에서 `roundToInt()` 대신 `toInt()`를 사용하여 소수점 버림 처리
- `isLoading` 변수의 `when` 문 분기 처리 로직에 trailing comma를 적용하여 가독성 개선
@HamBeomJoon HamBeomJoon merged commit c4e2455 into develop May 21, 2026
2 checks passed
@HamBeomJoon HamBeomJoon deleted the feat/#135-file-uploader-component branch May 21, 2026 15:09
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.

File Uploader UI 컴포넌트 추가, PrezelIcons 추가

2 participants