Skip to content

[Feat/#25] participant-state, state-guide, callout-info 컴포넌트 구현#30

Merged
cmj7271 merged 15 commits intodevelopfrom
feat/#25-history-component
Jan 14, 2026
Merged

[Feat/#25] participant-state, state-guide, callout-info 컴포넌트 구현#30
cmj7271 merged 15 commits intodevelopfrom
feat/#25-history-component

Conversation

@cmj7271
Copy link
Copy Markdown
Contributor

@cmj7271 cmj7271 commented Jan 13, 2026

Related issue 🛠️

Work Description ✏️

상대적으로 가벼운 컴포넌트를 묶어서 구현했습니다

  • participant-state
  • state-guide
  • callout-info

Screenshot 📸

스크린샷
스크린샷 2026-01-14 오전 1 23 46
스크린샷 2026-01-14 오전 1 24 18
스크린샷 2026-01-14 오전 1 24 34

Uncompleted Tasks 😅

To Reviewers 📢

PotiCalloutInfo 에서

  1. textOverflow 대처
    UI 를 보면 말줄임표로 생략되기엔 중요한 정보같지만,
    UI 상에서 은행계좌, 날짜, 우편번호 정도라 넘칠 것 같진 않아서 냅두었습니다.
    따로 좋은 대처가 있을까요

  2. text copy 기능
    당장은 외부로 hoisting 하기엔 오버엔지니어링 같아서 컴포저블 내부에 작성했습니다만..
    복사 버튼 누르고, snackBar 로 복사완료 안내 문구가 필요해지면 또 onClick 으로 처리해야해서 뺄지 고민했습니다

Summary by CodeRabbit

  • 새로운 기능

    • 히스토리 화면에 전체 너비 둥근 회색 콜아웃이 추가되어 텍스트 표시 및 선택 시 복사 버튼으로 내용을 클립보드에 복사할 수 있습니다.
    • 참가자 상태 레이블이 추가되어 크기(대/소), 단계 및 상태에 따라 자동으로 텍스트와 색상을 표시합니다.
    • 강조형 안내 가이드 메시지 컴포넌트가 추가되어 가독성이 향상됩니다.
  • 지역화

    • 히스토리 관련 문자열(단계명, 상태 포맷, 복사 버튼 텍스트 등)이 추가되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

히스토리 화면용 세 가지 Jetpack Compose 컴포저블을 추가합니다: 클립보드 복사 가능한 HistoryCalloutInfo, 크기·단계·상태 기반 HistoryParticipantStateLabel, 그리고 배경을 가진 HistoryStateGuide.

Changes

Cohort / File(s) 요약
히스토리 컴포넌트 - Callout
app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt
전체 너비 라운드 박스 내부에 텍스트와 선택적 복사 액션(리소스 문자열) 렌더링. 복사 시 LocalClipboard + ClipData/ClipEntry를 이용해 코루틴 내에서 클립보드에 텍스트를 설정하는 비동기 로직 포함. 프리뷰 2종 포함.
히스토리 컴포넌트 - Participant Label
app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt
ParticipantStateLabelSize, ParticipantStateLabelStage, ParticipantStateLabelStatus 열거형 추가 및 이들에 따라 텍스트/타이포그래피/색상을 결정하는 HistoryParticipantStateLabel 컴포저블 추가(내부 헬퍼와 프리뷰 포함).
히스토리 컴포넌트 - State Guide
app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt
pill 스타일 배경(poti200), 8.dp 라운드, 수직 패딩(12.dp), 중앙 정렬 텍스트를 렌더링하는 HistoryStateGuide 컴포저블 및 프리뷰 추가.
리소스 - 문자열 추가
app/src/main/res/values/strings.xml
참여자 단계/상태 관련 문자열 7개(history_participant_stage_*) 및 복사 버튼 문자열 history_callout_copy 추가.

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: 완료 반환
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

✨ 지현

Suggested reviewers

  • sonyerim
  • doyeon0307
🚥 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 제목이 구현된 세 개의 컴포넌트(participant-state, state-guide, callout-info)를 명확하게 명시하고 있어 PR의 주요 변경사항을 잘 요약하고 있습니다.
Description check ✅ Passed PR 설명이 이슈 연결, 작업 내용, 스크린샷, 리뷰 요청사항을 포함하여 템플릿의 주요 섹션을 충실히 작성했습니다.
Linked Issues check ✅ Passed PR이 이슈 #25의 모든 코딩 요구사항을 충족합니다: 세 컴포넌트 구현, 크기/색/텍스트 조합 지원, 텍스트 복사 기능 포함.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #25의 세 컴포넌트 구현 범위 내에 있으며, 관련 리소스 추가도 필요한 범위입니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.



📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 523d83d and 9fd42dc.

📒 Files selected for processing (1)
  • app/src/main/res/values/strings.xml
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/res/values/strings.xml

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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

Copy link
Copy Markdown

@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: 0

🧹 Nitpick comments (4)
app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt (1)

30-36: 수평 패딩 누락으로 텍스트가 박스 가장자리에 닿을 수 있음

현재 Textvertical 패딩만 적용되어 있어, 텍스트가 길어질 경우 박스의 좌우 가장자리에 닿거나 잘릴 수 있습니다. 수평 패딩을 추가하는 것이 좋습니다.

♻️ 수평 패딩 추가 제안
         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를 사용하거나 RowColumn을 조합하여 매트릭스 형태로 프리뷰를 구성할 수 있습니다.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 33318ea and 40d6b4e.

📒 Files selected for processing (3)
  • app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt
  • app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt
  • 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/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!

열거형과 확장 프로퍼티를 활용한 색상 매핑이 깔끔합니다. @Composable getter를 사용하여 테마 색상에 접근하는 방식이 적절합니다.


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 설명에서 언급하신 텍스트 오버플로우 관련하여, 예상되는 데이터(계좌번호, 날짜, 우편번호 등)가 길지 않다면 현재 구현으로 충분해 보입니다.

Copy link
Copy Markdown

@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

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 40d6b4e and 9779a9a.

📒 Files selected for processing (3)
  • app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt
  • app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt
  • app/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과 @Composable getter를 활용한 extension property 패턴이 테마 값 접근에 적절하게 사용되었습니다. 색상과 크기를 별도의 enum으로 분리하여 조합 가능하게 한 설계가 좋습니다.


40-53: LGTM!

단순하고 명확한 구현입니다. 파라미터 순서가 Compose 컨벤션을 따르고, extension property를 통해 스타일과 색상을 깔끔하게 적용하고 있습니다.


55-79: LGTM!

다양한 크기/색상 조합을 보여주는 프리뷰가 잘 구성되어 있습니다.

Comment on lines +13 to +15
import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

사용되지 않는 import 제거 필요

getValuesetValue가 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.

Copy link
Copy Markdown
Contributor

@doyeon0307 doyeon0307 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셧습니다!!

textOverflow 대처
UI 를 보면 말줄임표로 생략되기엔 중요한 정보같지만,
UI 상에서 은행계좌, 날짜, 우편번호 정도라 넘칠 것 같진 않아서 냅두었습니다.
따로 좋은 대처가 있을까요

말씀하신 대로 넘치는 케이스가 많지 않을 것 같고, 현재 weight(1f) 적용되어 있어 넘치더라도 정보 잘림 없이 노출되어 지금도 잘 구현 된 것 같습니당

text copy 기능
당장은 외부로 hoisting 하기엔 오버엔지니어링 같아서 컴포저블 내부에 작성했습니다만..
복사 버튼 누르고, snackBar 로 복사완료 안내 문구가 필요해지면 또 onClick 으로 처리해야해서 뺄지 고민했습니다

기디쌤들께 질문 드리면 좋을듯요

리뷰어 달아조

import kotlinx.coroutines.launch

@Composable
fun PotiCalloutInfo(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p2: 공통 컴포일 때 Poti 접미사 사용했어서, 본 컴포넌트가 공통인지 헷갈려용.. CalloutInfo나 패키지명 따라서 HistoryCalloutInfo 정도가 좋을 것 같은데 어떻게 생각하시나요?!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

패키지명 따르는게 좋을거 같아요 앞으로도 그렇게 작성할게용

) {
Row(
modifier = Modifier
.padding(horizontal = 16.dp, vertical = 12.dp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1: 기기 대응 확장함수 써주심 좋습니다!

}

@Composable
fun PotiParticipantStateLabel(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1: Small 타입일 때 패딩이 있어요~! heightIn 24dp 해주시면 될 듯!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 1.5.dp 로 중앙배열이 어긋나서 디자인측에 문의드렸어용
확정나면 업데이트할게요

Comment on lines +24 to +38
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),
)
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1: Box 없이 구현이 가능해요~!!

Suggested change
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),
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요고 자꾸 까먹네,, 감사합니다

@cmj7271 cmj7271 requested a review from a team January 14, 2026 05:51
Copy link
Copy Markdown

@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

🤖 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 체인 순서(clipbackgroundpadding)가 올바르며, 테마 색상과 타이포그래피를 적절히 활용하고 있습니다.

한 가지 고려사항: 현재 수직 패딩(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

📥 Commits

Reviewing files that changed from the base of the PR and between 9779a9a and 88db02f.

📒 Files selected for processing (3)
  • app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt
  • app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt
  • app/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 = truecopyable = false 두 가지 상태에 대한 프리뷰가 잘 제공되어 있습니다.


27-74: 구현이 올바르게 되어 있으며 버전 호환성도 확인되었습니다.

클립보드 복사 기능이 올바르게 구현되어 있으며, copyable 파라미터를 통한 조건부 렌더링도 적절합니다. 프로젝트에서 사용 중인 Compose BOM 2024.09.00 (Compose 1.7.1)은 ClipEntryLocalClipboard API를 지원합니다.

PR 설명에서 언급하신 두 가지 고려사항:

  1. textOverflow 처리: 현재 maxLinesoverflow 설정이 없어 긴 텍스트는 여러 줄로 표시됩니다. 중요 정보는 말줄임 없이 전체 표시하는 현재 접근이 합리적입니다.

  2. 복사 후 피드백: 외부에서 스낵바 등을 처리해야 한다면 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과 확장 프로퍼티 설계가 좋습니다.

@Composable getter를 사용하여 테마 색상과 타이포그래피를 매핑하는 패턴이 깔끔합니다. 크기와 색상 변형을 타입 안전하게 처리할 수 있습니다.


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.

Comment on lines +43 to +62
@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,
)
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
@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.

@cmj7271
Copy link
Copy Markdown
Contributor Author

cmj7271 commented Jan 14, 2026

participant-state 컴포넌트에서 소수점 dp 관련 이슈가 있어서, 디자인측에 요청드린 상태입니다.
디스코드

@cmj7271
Copy link
Copy Markdown
Contributor Author

cmj7271 commented Jan 14, 2026

HistoryParticipantStateLabel 리팩토링 진행중입니다.

figma 에 있는 size, stage-1, stage-2(가칭) 을 파라미터로 수정하려고 합니다
기존의 text, style, color 조합은 private 로 감추겠습니다
ex) sm, deposit, done -> 입금완료, body-14sb, poti-600

Copy link
Copy Markdown
Contributor

@jyvnee jyvnee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿 잘햇어!!!


if (copyable) {
Text(
text = "복사",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: String 추출 해주세요

text, style, color -> size, stage, status
Copy link
Copy Markdown

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between ebd6eae and cce3def.

📒 Files selected for processing (2)
  • app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt
  • app/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!

컴포저블 구조가 깔끔하고, modifierText에 올바르게 적용되어 있습니다. 이전 리뷰에서 지적된 Row 관련 modifier 문제는 현재 구조에서 해결되었습니다.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 14, 2026

Ktlint check passed.

Run: https://github.com/team-poti/POTI-ANDROID/actions/runs/21002248422

@cmj7271 cmj7271 self-assigned this Jan 14, 2026
Copy link
Copy Markdown
Contributor

@doyeon0307 doyeon0307 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생티티

Copy link
Copy Markdown
Contributor

@jyvnee jyvnee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코리 반영하고 알려주세요!!!!

SMALL,
}

enum class ParticipantStateLabelStage(val text: Int) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: 여기에 StringRes 붙여주세용

RECRUIT(R.string.history_participant_stage_recruit),
}

enum class ParticipantStateLabelStatus(val text: Int) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: 여기도 StringRes!!

stageType: ParticipantStateLabelStage,
statusType: ParticipantStateLabelStatus,
): Triple<String, TextStyle, Color> {
val text = stringResource(stageType.text) + " " + stringResource(statusType.text)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
)

이런 식으로 합칠 수 있습니다

Copy link
Copy Markdown
Contributor

@jyvnee jyvnee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿굿 머지하장~

@cmj7271 cmj7271 merged commit bdc6c07 into develop Jan 14, 2026
2 checks passed
@github-project-automation github-project-automation bot moved this from To-do to Done in POTI-ANDROID Jan 14, 2026
@jyvnee jyvnee deleted the feat/#25-history-component branch January 16, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feat] 내역 participant-state, state-guide, callout-info 컴포넌트 구현

3 participants