[Feat/#25] participant-state, state-guide, callout-info 컴포넌트 구현#30
[Feat/#25] participant-state, state-guide, callout-info 컴포넌트 구현#30
Conversation
📝 WalkthroughWalkthrough히스토리 화면용 세 가지 Jetpack Compose 컴포저블을 추가합니다: 클립보드 복사 가능한 Changes
Sequence Diagram(s)sequenceDiagram
participant User as 사용자
participant UI as HistoryCalloutInfo
participant Scope as CoroutineScope
participant Clipboard as ClipboardManager
User->>UI: 복사 버튼 탭
UI->>Scope: launch { 코루틴 시작 }
Scope->>Clipboard: setPrimaryClip(ClipData(텍스트))
Clipboard-->>Scope: 복사 완료
Scope-->>UI: 완료 반환
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
🚥 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. 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✏️ Tip: You can disable this entire section by setting Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt (1)
30-36: 수평 패딩 누락으로 텍스트가 박스 가장자리에 닿을 수 있음현재
Text에vertical패딩만 적용되어 있어, 텍스트가 길어질 경우 박스의 좌우 가장자리에 닿거나 잘릴 수 있습니다. 수평 패딩을 추가하는 것이 좋습니다.♻️ 수평 패딩 추가 제안
Text( text = text, style = typography.body14sb, color = colors.poti600, modifier = Modifier - .padding(vertical = 12.dp) + .padding(horizontal = 16.dp, vertical = 12.dp) )app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt (1)
54-78: LGTM!프리뷰가
PotiTheme으로 적절히 감싸져 있고 주요 변형들을 보여주고 있습니다.선택적으로, 모든 색상/사이즈 조합을 확인하고 싶다면
@PreviewParameter를 사용하거나Row와Column을 조합하여 매트릭스 형태로 프리뷰를 구성할 수 있습니다.app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt (2)
66-81: 복사 완료 피드백 처리를 위한 콜백 추가 고려PR 설명에서 언급하신 것처럼, 복사 성공 시 사용자에게 피드백(예: Snackbar)을 제공하려면 외부에서 처리할 수 있도록 콜백 파라미터를 추가하는 것이 좋습니다. 현재 구조에서는 복사 완료 여부를 외부에서 알 수 없습니다.
♻️ 콜백 파라미터 추가 제안
@Composable fun PotiCalloutInfo( text: String, modifier: Modifier = Modifier, copyable: Boolean = true, + onCopyClick: (() -> Unit)? = null, ) { val clipboardManager = LocalClipboard.current val localScope = rememberCoroutineScope() // ... .noRippleClickable { val clipData = ClipData.newPlainText("", text) val clipEntry = ClipEntry(clipData) localScope.launch { clipboardManager.setClipEntry(clipEntry) + onCopyClick?.invoke() } }
68-74: 하드코딩된 문자열 및 ClipData 라벨 개선
- Line 68:
"복사"문자열을 string resource로 분리하면 다국어 지원에 용이합니다.- Line 73:
ClipData.newPlainText의 첫 번째 파라미터(label)가 빈 문자열입니다. 디버깅이나 접근성을 위해 의미 있는 라벨(예:"callout_text")을 사용하는 것을 고려해 주세요.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.ktapp/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.ktapp/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt
🧰 Additional context used
🧬 Code graph analysis (2)
app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt (1)
app/src/main/java/com/poti/android/core/designsystem/theme/Theme.kt (1)
PotiTheme(48-71)
app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt (1)
app/src/main/java/com/poti/android/core/designsystem/theme/Theme.kt (1)
PotiTheme(48-71)
⏰ 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). (1)
- GitHub Check: PR CI Check (Lint & Build)
🔇 Additional comments (6)
app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt (1)
40-47: LGTM!Preview가
PotiTheme으로 올바르게 감싸져 있고, 컴포넌트를 적절히 시연하고 있습니다.app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt (3)
17-26: LGTM!열거형과 확장 프로퍼티를 활용한 색상 매핑이 깔끔합니다.
@Composablegetter를 사용하여 테마 색상에 접근하는 방식이 적절합니다.
28-37: LGTM!사이즈 타입과 텍스트 스타일 매핑이 색상 열거형과 일관된 패턴으로 구현되어 있어 유지보수성이 좋습니다.
39-52: LGTM!컴포저블이 단일 책임 원칙을 잘 따르고 있으며, Compose API 가이드라인에 맞게
modifier가 마지막 파라미터로 기본값과 함께 배치되어 있습니다.app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt (2)
86-106: LGTM!Preview 함수들이
copyable파라미터의 두 가지 상태를 모두 보여주고 있으며,PotiTheme으로 올바르게 감싸져 있습니다.
46-64: 레이아웃 구조 LGTM!
Modifier.weight(1f)를 사용하여 텍스트가 복사 버튼과 겹치지 않도록 처리한 부분이 좋습니다. PR 설명에서 언급하신 텍스트 오버플로우 관련하여, 예상되는 데이터(계좌번호, 날짜, 우편번호 등)가 길지 않다면 현재 구현으로 충분해 보입니다.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
@app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt:
- Around line 13-15: Remove the unused imports getValue and setValue from
PotiCalloutInfo.kt: locate the import lines referencing
androidx.compose.runtime.getValue and androidx.compose.runtime.setValue and
delete them (keep rememberCoroutineScope if used) to eliminate unused-import
warnings and clean up the imports.
🧹 Nitpick comments (1)
app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt (1)
29-76: 구현이 깔끔합니다.클립보드 복사 기능과 레이아웃 구조가 잘 구현되어 있습니다. PR 설명에서 언급한 대로 복사 기능을 내부에서 처리하는 현재 접근 방식은 적절합니다. 추후 스낵바 등 외부 피드백이 필요해지면 그때
onClick람다로 분리하는 것이 합리적입니다.선택적으로, Line 65의
ClipData.newPlainText("", text)에서 빈 문자열 대신 의미 있는 레이블(예:"PotiCalloutInfo")을 사용하면 디버깅 시 유용할 수 있습니다.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.ktapp/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.ktapp/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt
🚧 Files skipped from review as they are similar to previous changes (1)
- app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt
🧰 Additional context used
🧬 Code graph analysis (2)
app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt (1)
app/src/main/java/com/poti/android/core/designsystem/theme/Theme.kt (1)
PotiTheme(48-71)
app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt (1)
app/src/main/java/com/poti/android/core/designsystem/theme/Theme.kt (1)
PotiTheme(48-71)
⏰ 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). (1)
- GitHub Check: PR CI Check (Lint & Build)
🔇 Additional comments (4)
app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt (1)
78-98: LGTM!
copyable파라미터의 두 가지 상태를 모두 커버하는 프리뷰가 잘 구성되어 있습니다.app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt (3)
16-38: LGTM!Enum과
@Composablegetter를 활용한 extension property 패턴이 테마 값 접근에 적절하게 사용되었습니다. 색상과 크기를 별도의 enum으로 분리하여 조합 가능하게 한 설계가 좋습니다.
40-53: LGTM!단순하고 명확한 구현입니다. 파라미터 순서가 Compose 컨벤션을 따르고, extension property를 통해 스타일과 색상을 깔끔하게 적용하고 있습니다.
55-79: LGTM!다양한 크기/색상 조합을 보여주는 프리뷰가 잘 구성되어 있습니다.
| import androidx.compose.runtime.getValue | ||
| import androidx.compose.runtime.rememberCoroutineScope | ||
| import androidx.compose.runtime.setValue |
There was a problem hiding this comment.
사용되지 않는 import 제거 필요
getValue와 setValue가 import되어 있지만 코드에서 사용되지 않습니다.
🔧 제안하는 수정
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberCoroutineScope
-import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment🤖 Prompt for AI Agents
In
@app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt
around lines 13 - 15, Remove the unused imports getValue and setValue from
PotiCalloutInfo.kt: locate the import lines referencing
androidx.compose.runtime.getValue and androidx.compose.runtime.setValue and
delete them (keep rememberCoroutineScope if used) to eliminate unused-import
warnings and clean up the imports.
There was a problem hiding this comment.
고생하셧습니다!!
textOverflow 대처
UI 를 보면 말줄임표로 생략되기엔 중요한 정보같지만,
UI 상에서 은행계좌, 날짜, 우편번호 정도라 넘칠 것 같진 않아서 냅두었습니다.
따로 좋은 대처가 있을까요
말씀하신 대로 넘치는 케이스가 많지 않을 것 같고, 현재 weight(1f) 적용되어 있어 넘치더라도 정보 잘림 없이 노출되어 지금도 잘 구현 된 것 같습니당
text copy 기능
당장은 외부로 hoisting 하기엔 오버엔지니어링 같아서 컴포저블 내부에 작성했습니다만..
복사 버튼 누르고, snackBar 로 복사완료 안내 문구가 필요해지면 또 onClick 으로 처리해야해서 뺄지 고민했습니다
기디쌤들께 질문 드리면 좋을듯요
리뷰어 달아조
| import kotlinx.coroutines.launch | ||
|
|
||
| @Composable | ||
| fun PotiCalloutInfo( |
There was a problem hiding this comment.
p2: 공통 컴포일 때 Poti 접미사 사용했어서, 본 컴포넌트가 공통인지 헷갈려용.. CalloutInfo나 패키지명 따라서 HistoryCalloutInfo 정도가 좋을 것 같은데 어떻게 생각하시나요?!
There was a problem hiding this comment.
패키지명 따르는게 좋을거 같아요 앞으로도 그렇게 작성할게용
| ) { | ||
| Row( | ||
| modifier = Modifier | ||
| .padding(horizontal = 16.dp, vertical = 12.dp) |
There was a problem hiding this comment.
p1: 기기 대응 확장함수 써주심 좋습니다!
| } | ||
|
|
||
| @Composable | ||
| fun PotiParticipantStateLabel( |
There was a problem hiding this comment.
p1: Small 타입일 때 패딩이 있어요~! heightIn 24dp 해주시면 될 듯!
There was a problem hiding this comment.
현재 1.5.dp 로 중앙배열이 어긋나서 디자인측에 문의드렸어용
확정나면 업데이트할게요
| Box( | ||
| modifier = modifier | ||
| .clip(RoundedCornerShape(8.dp)) | ||
| .background(colors.poti200), | ||
| contentAlignment = Alignment.Center, | ||
| ) { | ||
| Text( | ||
| text = text, | ||
| style = typography.body14sb, | ||
| color = colors.poti600, | ||
| modifier = Modifier | ||
| .padding(vertical = 12.dp), | ||
| ) | ||
| } | ||
| } |
There was a problem hiding this comment.
p1: Box 없이 구현이 가능해요~!!
| Box( | |
| modifier = modifier | |
| .clip(RoundedCornerShape(8.dp)) | |
| .background(colors.poti200), | |
| contentAlignment = Alignment.Center, | |
| ) { | |
| Text( | |
| text = text, | |
| style = typography.body14sb, | |
| color = colors.poti600, | |
| modifier = Modifier | |
| .padding(vertical = 12.dp), | |
| ) | |
| } | |
| } | |
| Text( | |
| text = text, | |
| style = typography.body14sb, | |
| color = colors.poti600, | |
| textAlign = TextAlign.Center, | |
| modifier = modifier | |
| .clip(RoundedCornerShape(8.dp)) | |
| .background(colors.poti200) | |
| .padding(vertical = 12.dp), | |
| ) |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt`:
- Around line 43-62: HistoryParticipantStateLabel applies the incoming modifier
to the inner Text instead of the outer Row, preventing callers from controlling
the container (padding, click, etc.); move the modifier onto the Row by
combining it with the fixed height (e.g., use modifier.height(24.dp) for the
Row) and replace the Text's modifier with Modifier (or omit it) so the passed-in
modifier controls the outer container.
🧹 Nitpick comments (1)
app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt (1)
18-33: 깔끔하게 구현되었습니다.Modifier 체인 순서(
clip→background→padding)가 올바르며, 테마 색상과 타이포그래피를 적절히 활용하고 있습니다.한 가지 고려사항: 현재 수직 패딩(
vertical = 12.dp)만 있고 수평 패딩이 없습니다. 텍스트가 배경의 좌우 가장자리에 닿을 수 있는데, 의도된 디자인인지 확인해주세요. 필요하다면 아래와 같이 수정할 수 있습니다:♻️ 수평 패딩 추가 제안
modifier = modifier .clip(RoundedCornerShape(8.dp)) .background(colors.poti200) - .padding(vertical = 12.dp), + .padding(horizontal = 16.dp, vertical = 12.dp),
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.ktapp/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.ktapp/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt
🧰 Additional context used
🧬 Code graph analysis (3)
app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt (1)
app/src/main/java/com/poti/android/core/designsystem/theme/Theme.kt (1)
PotiTheme(48-71)
app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt (1)
app/src/main/java/com/poti/android/core/designsystem/theme/Theme.kt (1)
PotiTheme(48-71)
app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt (1)
app/src/main/java/com/poti/android/core/designsystem/theme/Theme.kt (1)
PotiTheme(48-71)
🔇 Additional comments (5)
app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt (2)
76-96: 프리뷰 함수가 적절히 구성되어 있습니다.
copyable = true와copyable = false두 가지 상태에 대한 프리뷰가 잘 제공되어 있습니다.
27-74: 구현이 올바르게 되어 있으며 버전 호환성도 확인되었습니다.클립보드 복사 기능이 올바르게 구현되어 있으며,
copyable파라미터를 통한 조건부 렌더링도 적절합니다. 프로젝트에서 사용 중인 Compose BOM 2024.09.00 (Compose 1.7.1)은ClipEntry와LocalClipboardAPI를 지원합니다.PR 설명에서 언급하신 두 가지 고려사항:
textOverflow 처리: 현재
maxLines와overflow설정이 없어 긴 텍스트는 여러 줄로 표시됩니다. 중요 정보는 말줄임 없이 전체 표시하는 현재 접근이 합리적입니다.복사 후 피드백: 외부에서 스낵바 등을 처리해야 한다면
onCopyClick: (() -> Unit)?콜백을 추가하는 것을 고려해보세요.예시: 외부 피드백 처리가 필요한 경우
fun HistoryCalloutInfo( text: String, modifier: Modifier = Modifier, copyable: Boolean = true, onCopyClick: (() -> Unit)? = null, // 복사 완료 콜백 )app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt (1)
35-44: 프리뷰 구성이 적절합니다.
PotiTheme으로 감싸고 고정 너비로 테스트하는 방식이 좋습니다.app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt (2)
19-41: Enum과 확장 프로퍼티 설계가 좋습니다.
@Composablegetter를 사용하여 테마 색상과 타이포그래피를 매핑하는 패턴이 깔끔합니다. 크기와 색상 변형을 타입 안전하게 처리할 수 있습니다.
64-88: 프리뷰가 세 가지 변형을 잘 보여줍니다.LARGE/RED, SMALL/GRAY, SMALL/BLUE 조합을 통해 다양한 상태를 확인할 수 있습니다.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| @Composable | ||
| fun HistoryParticipantStateLabel( | ||
| text: String, | ||
| sizeType: ParticipantStateLabelSize, | ||
| colorType: ParticipantStateLabelColor, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| Row( | ||
| modifier = Modifier | ||
| .height(24.dp), | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| ) { | ||
| Text( | ||
| text = text, | ||
| style = sizeType.style, | ||
| color = colorType.color, | ||
| modifier = modifier, | ||
| ) | ||
| } | ||
| } |
There was a problem hiding this comment.
modifier 파라미터가 잘못된 위치에 적용되었습니다.
현재 modifier가 내부 Text에 적용되고, 외부 Row는 하드코딩된 Modifier.height(24.dp)를 사용합니다. 일반적으로 외부에서 전달된 modifier는 가장 바깥쪽 컨테이너에 적용해야 호출자가 패딩, 클릭 핸들러 등을 예상대로 제어할 수 있습니다.
🐛 수정 제안
`@Composable`
fun HistoryParticipantStateLabel(
text: String,
sizeType: ParticipantStateLabelSize,
colorType: ParticipantStateLabelColor,
modifier: Modifier = Modifier,
) {
Row(
- modifier = Modifier
+ modifier = modifier
.height(24.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = text,
style = sizeType.style,
color = colorType.color,
- modifier = modifier,
)
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @Composable | |
| fun HistoryParticipantStateLabel( | |
| text: String, | |
| sizeType: ParticipantStateLabelSize, | |
| colorType: ParticipantStateLabelColor, | |
| modifier: Modifier = Modifier, | |
| ) { | |
| Row( | |
| modifier = Modifier | |
| .height(24.dp), | |
| verticalAlignment = Alignment.CenterVertically, | |
| ) { | |
| Text( | |
| text = text, | |
| style = sizeType.style, | |
| color = colorType.color, | |
| modifier = modifier, | |
| ) | |
| } | |
| } | |
| `@Composable` | |
| fun HistoryParticipantStateLabel( | |
| text: String, | |
| sizeType: ParticipantStateLabelSize, | |
| colorType: ParticipantStateLabelColor, | |
| modifier: Modifier = Modifier, | |
| ) { | |
| Row( | |
| modifier = modifier | |
| .height(24.dp), | |
| verticalAlignment = Alignment.CenterVertically, | |
| ) { | |
| Text( | |
| text = text, | |
| style = sizeType.style, | |
| color = colorType.color, | |
| ) | |
| } | |
| } |
🤖 Prompt for AI Agents
In
`@app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt`
around lines 43 - 62, HistoryParticipantStateLabel applies the incoming modifier
to the inner Text instead of the outer Row, preventing callers from controlling
the container (padding, click, etc.); move the modifier onto the Row by
combining it with the fixed height (e.g., use modifier.height(24.dp) for the
Row) and replace the Text's modifier with Modifier (or omit it) so the passed-in
modifier controls the outer container.
|
|
lg = 24dp, sm=21dp
|
figma 에 있는 size, stage-1, stage-2(가칭) 을 파라미터로 수정하려고 합니다 |
text, style, color -> size, stage, status
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In
`@app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt`:
- Around line 52-69: The getTextInfo function has lint issues: add a trailing
comma after the last parameter in the parameter list (after statusType:
ParticipantStateLabelStatus,) and remove the blank empty line immediately after
the function opening brace so the first statement (val text = ...) sits directly
on the next line; keep the function signature and body otherwise unchanged and
use the existing symbols getTextInfo, ParticipantStateLabelSize,
ParticipantStateLabelStage, and ParticipantStateLabelStatus to locate the code.
- Around line 22-32: Add the missing blank line between the two enum
declarations and ensure each enum's last entry has a trailing comma: update
ParticipantStateLabelStage so RECRUIT ends with a comma, and update
ParticipantStateLabelStatus so DONE ends with a comma, and insert one empty line
before the ParticipantStateLabelStatus declaration.
- Around line 106-140: In HistoryParticipantStateLabelPreview, several
HistoryParticipantStateLabel invocations are missing trailing commas on the
final argument which triggers the CI lint error; update each offending call (the
SMALL size calls with statusType = WAIT and = CHECK, and the LARGE size calls
with statusType = CHECK and = WAIT) to add a trailing comma after the statusType
argument so each function call ends with a comma (refer to the
HistoryParticipantStateLabel composable and its parameters sizeType, stageType,
statusType).
🧹 Nitpick comments (1)
app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt (1)
71-104: 린팅 오류 수정 및 유효하지 않은 조합에 대한 고려Line 75에 trailing comma가 누락되어 있습니다.
현재
else -> defaultColor로 처리되지 않은 stage/status 조합을 기본값으로 처리하고 있습니다. 이는 방어적 코딩으로 괜찮지만, 유효한 조합만 허용하려면 sealed class나 타입 안전한 빌더 패턴을 고려해볼 수 있습니다.🔧 trailing comma 수정
`@Composable` private fun getStateColor( stage: ParticipantStateLabelStage, status: ParticipantStateLabelStatus, - size: ParticipantStateLabelSize + size: ParticipantStateLabelSize, ): Color {
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.ktapp/src/main/res/values/strings.xml
🧰 Additional context used
🧬 Code graph analysis (1)
app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt (1)
app/src/main/java/com/poti/android/core/designsystem/theme/Theme.kt (1)
PotiTheme(48-71)
🪛 GitHub Actions: PR CI Check
app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt
[error] 25-25: Missing trailing comma before } (standard: trailing-comma-on-declaration-site)
[error] 27-27: Expected a blank line for this declaration (standard: blank-line-before-declaration)
[error] 31-31: Missing trailing comma before } (standard: trailing-comma-on-declaration-site)
[error] 56-56: Missing trailing comma before ) (standard: trailing-comma-on-declaration-site)
[error] 58-58: First line in a method block should not be empty (standard:no-empty-first-line-in-method-block)
[error] 75-75: Missing trailing comma before ) (standard: trailing-comma-on-declaration-site)
[error] 116-116: Missing trailing comma before ) (standard: trailing-comma-on-call-site)
[error] 121-121: Missing trailing comma before ) (standard: trailing-comma-on-call-site)
[error] 126-126: Missing trailing comma before ) (standard: trailing-comma-on-call-site)
[error] 131-131: Missing trailing comma before ) (standard: trailing-comma-on-call-site)
🔇 Additional comments (2)
app/src/main/res/values/strings.xml (1)
10-18: LGTM!히스토리 참가자 상태 라벨에 필요한 문자열 리소스가 올바르게 추가되었습니다. 네이밍 컨벤션이 일관적이며, Stage와 Status 열거형에서 사용되는 모든 값이 포함되어 있습니다.
app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt (1)
34-50: LGTM!컴포저블 구조가 깔끔하고,
modifier가Text에 올바르게 적용되어 있습니다. 이전 리뷰에서 지적된 Row 관련 modifier 문제는 현재 구조에서 해결되었습니다.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
...rc/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt
Show resolved
Hide resolved
...rc/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt
Show resolved
Hide resolved
|
✅ Ktlint check passed. Run: https://github.com/team-poti/POTI-ANDROID/actions/runs/21002248422 |
| SMALL, | ||
| } | ||
|
|
||
| enum class ParticipantStateLabelStage(val text: Int) { |
| RECRUIT(R.string.history_participant_stage_recruit), | ||
| } | ||
|
|
||
| enum class ParticipantStateLabelStatus(val text: Int) { |
| stageType: ParticipantStateLabelStage, | ||
| statusType: ParticipantStateLabelStatus, | ||
| ): Triple<String, TextStyle, Color> { | ||
| val text = stringResource(stageType.text) + " " + stringResource(statusType.text) |
There was a problem hiding this comment.
P1: 이거 stringResource에 인자로 넘길 수 있어요
예를 들어서 <string name="history_participant_stage_and_status_format">%1$s %2$s</string> 이렇게 하면,
val text = stringResource(
id = R.string.history_participant_stage_and_status_format,
stringResource(stageType.text),
stringResource(statusType.text)
)이런 식으로 합칠 수 있습니다
Related issue 🛠️
Work Description ✏️
상대적으로 가벼운 컴포넌트를 묶어서 구현했습니다
Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢
PotiCalloutInfo 에서
textOverflow 대처
UI 를 보면 말줄임표로 생략되기엔 중요한 정보같지만,
UI 상에서 은행계좌, 날짜, 우편번호 정도라 넘칠 것 같진 않아서 냅두었습니다.
따로 좋은 대처가 있을까요
text copy 기능
당장은 외부로 hoisting 하기엔 오버엔지니어링 같아서 컴포저블 내부에 작성했습니다만..
복사 버튼 누르고, snackBar 로 복사완료 안내 문구가 필요해지면 또 onClick 으로 처리해야해서 뺄지 고민했습니다
Summary by CodeRabbit
새로운 기능
지역화
✏️ Tip: You can customize this high-level summary in your review settings.