[Feat] Spoiler 구현#75
Conversation
📝 Walkthrough워크스루새로운 Spoiler UI 컴포넌트를 구현했습니다. 흐릿한 콘텐츠 영역에 그라데이션 잠금 아이콘, 한국어 스포일러 알림, "보기" 버튼이 있는 오버레이 카드를 표시하며, 버튼 클릭 시 spoil 콜백을 실행합니다. FlintTheme 테마를 적용하고 미리보기 함수와 파라미터 제공자를 포함합니다. 변경사항
예상 코드 리뷰 노력🎯 2 (Simple) | ⏱️ ~12분 시
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
app/src/main/java/com/flint/core/designsystem/component/collection/Spoiler.kt (3)
60-64: 하드코딩된 문자열을 string resource로 추출하는 것을 권장합니다.
"스포일러가 포함된 내용이에요"와"보기"문자열이 하드코딩되어 있습니다. 향후 다국어 지원(i18n)을 고려하여strings.xml로 추출하는 것이 좋습니다.♻️ 제안하는 변경사항
strings.xml에 추가:<string name="spoiler_warning_message">스포일러가 포함된 내용이에요</string> <string name="spoiler_view_button">보기</string>코드 변경:
Text( - text = "스포일러가 포함된 내용이에요", + text = stringResource(R.string.spoiler_warning_message), color = FlintTheme.colors.white, style = FlintTheme.typography.head3Sb18, )Text( - text = "보기", + text = stringResource(R.string.spoiler_view_button), color = FlintTheme.colors.primary300, style = FlintTheme.typography.head3Sb18, )import 추가 필요:
import androidx.compose.ui.res.stringResource
54-58: 접근성 개선을 위해 contentDescription 추가를 고려해보세요.잠금 아이콘이 "스포일러가 숨겨져 있음"이라는 의미를 전달하므로, 스크린 리더 사용자를 위해
contentDescription을 제공하면 좋습니다.♻️ 제안하는 변경사항
Image( painter = painterResource(R.drawable.ic_gradient_lock), - contentDescription = null, + contentDescription = "스포일러 잠금", // 또는 stringResource 사용 modifier = Modifier.size(64.dp), )
104-137: Preview provider 클래스의 가시성을private으로 변경하는 것을 권장합니다.
SpoilerPreviewParameterProvider는 이 파일 내의 preview에서만 사용되므로, 불필요한 API 노출을 방지하기 위해private으로 선언하는 것이 좋습니다.♻️ 제안하는 변경사항
-class SpoilerPreviewParameterProvider : PreviewParameterProvider<String> { +private class SpoilerPreviewParameterProvider : PreviewParameterProvider<String> {
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/src/main/java/com/flint/core/designsystem/component/collection/Spoiler.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 (2)
app/src/main/java/com/flint/core/designsystem/component/collection/Spoiler.kt (2)
1-27: LGTM!패키지 선언과 import 구문이 적절하게 구성되어 있습니다.
85-102: LGTM!Preview 함수가 적절하게 구성되어 있습니다.
FlintTheme으로 감싸고PreviewParameter를 활용한 점이 좋습니다.
| style = FlintTheme.typography.head3Sb18, | ||
| ) | ||
|
|
||
| TextButton(onClick = spoil) { |
📮 관련 이슈
📌 작업 내용
📸 스크린샷
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.