From ad611656c7f0337ab70e136a7316940b8bffe8ef Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Tue, 13 Jan 2026 23:56:32 +0900 Subject: [PATCH 01/14] [feat/#25] state-guide implement --- .../history/component/PotiStateGuide.kt | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt diff --git a/app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt b/app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt new file mode 100644 index 00000000..0cbef7fc --- /dev/null +++ b/app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt @@ -0,0 +1,47 @@ +package com.poti.android.presentation.history.component + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.poti.android.core.designsystem.theme.PotiTheme +import com.poti.android.core.designsystem.theme.PotiTheme.colors +import com.poti.android.core.designsystem.theme.PotiTheme.typography + +@Composable +fun PotiStateGuide( + text: String, + modifier: Modifier = Modifier +) { + 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) + ) + } +} + +@Preview +@Composable +private fun PotiStateGuidePreview() { + PotiTheme { + PotiStateGuide(text = "상태 메세지를 입력하세요", + modifier = Modifier.width(343.dp)) + } +} From 865caa6de6a9669ebda2b343f47731134577acde Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 00:57:34 +0900 Subject: [PATCH 02/14] [feat/#25] callout-info implement --- .../history/component/PotiCalloutInfo.kt | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt diff --git a/app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt b/app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt new file mode 100644 index 00000000..9bd62ca6 --- /dev/null +++ b/app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt @@ -0,0 +1,106 @@ +package com.poti.android.presentation.history.component + +import android.content.ClipData +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.material3.TextField +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.platform.ClipEntry +import androidx.compose.ui.platform.LocalClipboard +import androidx.compose.ui.platform.LocalClipboardManager +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.poti.android.core.common.extension.noRippleClickable +import com.poti.android.core.designsystem.theme.PotiTheme +import com.poti.android.core.designsystem.theme.PotiTheme.colors +import kotlinx.coroutines.launch + +@Composable +fun PotiCalloutInfo( + text: String, + modifier: Modifier = Modifier, + copyable: Boolean = true, +) { + val clipboardManager = LocalClipboard.current + val localScope = rememberCoroutineScope() + + Box( + modifier = modifier + .fillMaxWidth() + .clip(RoundedCornerShape(8.dp)) + .background(colors.gray100) + ) { + Row( + modifier = Modifier + .padding(horizontal = 16.dp, vertical = 12.dp) + .fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text( + text = text, + style = PotiTheme.typography.body14m, + color = colors.black, + modifier = Modifier.weight(1f) + ) + + if (copyable) { + Text( + text = "복사", + style = PotiTheme.typography.body14m.copy(textDecoration = TextDecoration.Underline), + color = colors.gray700, + modifier = Modifier + .noRippleClickable { + val clipData = ClipData.newPlainText("", text) + val clipEntry = ClipEntry(clipData) + localScope.launch { + clipboardManager.setClipEntry(clipEntry) + } + } + .padding(start = 12.dp) + ) + } + } + } +} + +@Preview +@Composable +private fun PotiCalloutInfoPreview() { + PotiTheme { + PotiCalloutInfo( + text = "정보", + copyable = true, + ) + } +} + +@Preview +@Composable +private fun PotiCalloutInfoNoCopyPreview() { + PotiTheme { + PotiCalloutInfo( + text = "정보 (복사 불가능)", + copyable = false + ) + } +} From 40d6b4efedf0dc6bd1ec6ad3cec1c51209bec649 Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 01:21:19 +0900 Subject: [PATCH 03/14] [feat/#25] participant-state implement --- .../component/PotiParticipantStateLabel.kt | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt diff --git a/app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt new file mode 100644 index 00000000..138f9276 --- /dev/null +++ b/app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt @@ -0,0 +1,78 @@ +package com.poti.android.presentation.history.component + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.poti.android.core.designsystem.theme.PotiTheme +import com.poti.android.core.designsystem.theme.PotiTheme.colors +import com.poti.android.core.designsystem.theme.PotiTheme.typography + +enum class ParticipantStateLabelColor { + RED, BLUE, GRAY; +} + +val ParticipantStateLabelColor.color: Color + @Composable get() = when (this) { + ParticipantStateLabelColor.RED -> colors.sementicRed + ParticipantStateLabelColor.BLUE -> colors.poti600 + ParticipantStateLabelColor.GRAY -> colors.gray700 + } + +enum class ParticipantStateLabelSize { + LARGE, + SMALL +} + +val ParticipantStateLabelSize.style: TextStyle + @Composable get() = when (this) { + ParticipantStateLabelSize.LARGE -> typography.body16sb + ParticipantStateLabelSize.SMALL -> typography.body14sb + } + +@Composable +fun PotiParticipantStateLabel( + text: String, + sizeType: ParticipantStateLabelSize, + colorType: ParticipantStateLabelColor, + modifier: Modifier = Modifier +) { + Text( + text = text, + style = sizeType.style, + color = colorType.color, + modifier = modifier + ) +} + +@Preview(showBackground = true) +@Composable +private fun PotiParticipantStateLabelPreview() { + PotiTheme { + Column( + verticalArrangement = Arrangement.spacedBy(10.dp) + ) { + PotiParticipantStateLabel( + text = "입금 대기", + sizeType = ParticipantStateLabelSize.LARGE, + colorType = ParticipantStateLabelColor.RED + ) + PotiParticipantStateLabel( + text = "입금 완료", + sizeType = ParticipantStateLabelSize.SMALL, + colorType = ParticipantStateLabelColor.GRAY + ) + PotiParticipantStateLabel( + text = "모집 완료", + sizeType = ParticipantStateLabelSize.SMALL, + colorType = ParticipantStateLabelColor.BLUE + ) + } + } +} From 9779a9ab05e2114353a45288962f389144b39e09 Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 01:44:10 +0900 Subject: [PATCH 04/14] [fix/#25] apply ktlint --- .../history/component/PotiCalloutInfo.kt | 18 +++++------------- .../component/PotiParticipantStateLabel.kt | 19 ++++++++++--------- .../history/component/PotiStateGuide.kt | 10 ++++++---- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt b/app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt index 9bd62ca6..3bd3a076 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt @@ -4,20 +4,13 @@ import android.content.ClipData import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.Surface import androidx.compose.material3.Text -import androidx.compose.material3.TextField import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment @@ -25,7 +18,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.ClipEntry import androidx.compose.ui.platform.LocalClipboard -import androidx.compose.ui.platform.LocalClipboardManager import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -47,20 +39,20 @@ fun PotiCalloutInfo( modifier = modifier .fillMaxWidth() .clip(RoundedCornerShape(8.dp)) - .background(colors.gray100) + .background(colors.gray100), ) { Row( modifier = Modifier .padding(horizontal = 16.dp, vertical = 12.dp) .fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically + verticalAlignment = Alignment.CenterVertically, ) { Text( text = text, style = PotiTheme.typography.body14m, color = colors.black, - modifier = Modifier.weight(1f) + modifier = Modifier.weight(1f), ) if (copyable) { @@ -76,7 +68,7 @@ fun PotiCalloutInfo( clipboardManager.setClipEntry(clipEntry) } } - .padding(start = 12.dp) + .padding(start = 12.dp), ) } } @@ -100,7 +92,7 @@ private fun PotiCalloutInfoNoCopyPreview() { PotiTheme { PotiCalloutInfo( text = "정보 (복사 불가능)", - copyable = false + copyable = false, ) } } diff --git a/app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt index 138f9276..84798969 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt @@ -2,7 +2,6 @@ package com.poti.android.presentation.history.component import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -15,7 +14,9 @@ import com.poti.android.core.designsystem.theme.PotiTheme.colors import com.poti.android.core.designsystem.theme.PotiTheme.typography enum class ParticipantStateLabelColor { - RED, BLUE, GRAY; + RED, + BLUE, + GRAY, } val ParticipantStateLabelColor.color: Color @@ -27,7 +28,7 @@ val ParticipantStateLabelColor.color: Color enum class ParticipantStateLabelSize { LARGE, - SMALL + SMALL, } val ParticipantStateLabelSize.style: TextStyle @@ -41,13 +42,13 @@ fun PotiParticipantStateLabel( text: String, sizeType: ParticipantStateLabelSize, colorType: ParticipantStateLabelColor, - modifier: Modifier = Modifier + modifier: Modifier = Modifier, ) { Text( text = text, style = sizeType.style, color = colorType.color, - modifier = modifier + modifier = modifier, ) } @@ -56,22 +57,22 @@ fun PotiParticipantStateLabel( private fun PotiParticipantStateLabelPreview() { PotiTheme { Column( - verticalArrangement = Arrangement.spacedBy(10.dp) + verticalArrangement = Arrangement.spacedBy(10.dp), ) { PotiParticipantStateLabel( text = "입금 대기", sizeType = ParticipantStateLabelSize.LARGE, - colorType = ParticipantStateLabelColor.RED + colorType = ParticipantStateLabelColor.RED, ) PotiParticipantStateLabel( text = "입금 완료", sizeType = ParticipantStateLabelSize.SMALL, - colorType = ParticipantStateLabelColor.GRAY + colorType = ParticipantStateLabelColor.GRAY, ) PotiParticipantStateLabel( text = "모집 완료", sizeType = ParticipantStateLabelSize.SMALL, - colorType = ParticipantStateLabelColor.BLUE + colorType = ParticipantStateLabelColor.BLUE, ) } } diff --git a/app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt b/app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt index 0cbef7fc..39ab06db 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt @@ -19,7 +19,7 @@ import com.poti.android.core.designsystem.theme.PotiTheme.typography @Composable fun PotiStateGuide( text: String, - modifier: Modifier = Modifier + modifier: Modifier = Modifier, ) { Box( modifier = modifier @@ -32,7 +32,7 @@ fun PotiStateGuide( style = typography.body14sb, color = colors.poti600, modifier = Modifier - .padding(vertical = 12.dp) + .padding(vertical = 12.dp), ) } } @@ -41,7 +41,9 @@ fun PotiStateGuide( @Composable private fun PotiStateGuidePreview() { PotiTheme { - PotiStateGuide(text = "상태 메세지를 입력하세요", - modifier = Modifier.width(343.dp)) + PotiStateGuide( + text = "상태 메세지를 입력하세요", + modifier = Modifier.width(343.dp), + ) } } From 2e0b495d60843a543339804e41ce013908334d80 Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 16:14:30 +0900 Subject: [PATCH 05/14] =?UTF-8?q?[fix/#25]=20=EC=BD=94=EB=A6=AC=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tiCalloutInfo.kt => HistoryCalloutInfo.kt} | 12 +++---- ...bel.kt => HistoryParticipantStateLabel.kt} | 33 ++++++++++++------- ...PotiStateGuide.kt => HistoryStateGuide.kt} | 27 +++++++-------- 3 files changed, 39 insertions(+), 33 deletions(-) rename app/src/main/java/com/poti/android/presentation/history/component/{PotiCalloutInfo.kt => HistoryCalloutInfo.kt} (92%) rename app/src/main/java/com/poti/android/presentation/history/component/{PotiParticipantStateLabel.kt => HistoryParticipantStateLabel.kt} (74%) rename app/src/main/java/com/poti/android/presentation/history/component/{PotiStateGuide.kt => HistoryStateGuide.kt} (73%) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt similarity index 92% rename from app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt rename to app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt index 3bd3a076..7ed8947a 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/PotiCalloutInfo.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt @@ -10,9 +10,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Text 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 import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip @@ -27,7 +25,7 @@ import com.poti.android.core.designsystem.theme.PotiTheme.colors import kotlinx.coroutines.launch @Composable -fun PotiCalloutInfo( +fun HistoryCalloutInfo( text: String, modifier: Modifier = Modifier, copyable: Boolean = true, @@ -77,9 +75,9 @@ fun PotiCalloutInfo( @Preview @Composable -private fun PotiCalloutInfoPreview() { +private fun HistoryCalloutInfoPreview() { PotiTheme { - PotiCalloutInfo( + HistoryCalloutInfo( text = "정보", copyable = true, ) @@ -88,9 +86,9 @@ private fun PotiCalloutInfoPreview() { @Preview @Composable -private fun PotiCalloutInfoNoCopyPreview() { +private fun HistoryCalloutInfoNoCopyPreview() { PotiTheme { - PotiCalloutInfo( + HistoryCalloutInfo( text = "정보 (복사 불가능)", copyable = false, ) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt similarity index 74% rename from app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt rename to app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt index 84798969..fe91db33 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/PotiParticipantStateLabel.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt @@ -2,11 +2,16 @@ package com.poti.android.presentation.history.component import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.style.LineHeightStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.poti.android.core.designsystem.theme.PotiTheme @@ -38,38 +43,44 @@ val ParticipantStateLabelSize.style: TextStyle } @Composable -fun PotiParticipantStateLabel( +fun HistoryParticipantStateLabel( text: String, sizeType: ParticipantStateLabelSize, colorType: ParticipantStateLabelColor, modifier: Modifier = Modifier, ) { - Text( - text = text, - style = sizeType.style, - color = colorType.color, - modifier = modifier, - ) + Row( + modifier = Modifier + .height(24.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Text( + text = text, + style = sizeType.style, + color = colorType.color, + modifier = modifier, + ) + } } @Preview(showBackground = true) @Composable -private fun PotiParticipantStateLabelPreview() { +private fun HistoryParticipantStateLabelPreview() { PotiTheme { Column( verticalArrangement = Arrangement.spacedBy(10.dp), ) { - PotiParticipantStateLabel( + HistoryParticipantStateLabel( text = "입금 대기", sizeType = ParticipantStateLabelSize.LARGE, colorType = ParticipantStateLabelColor.RED, ) - PotiParticipantStateLabel( + HistoryParticipantStateLabel( text = "입금 완료", sizeType = ParticipantStateLabelSize.SMALL, colorType = ParticipantStateLabelColor.GRAY, ) - PotiParticipantStateLabel( + HistoryParticipantStateLabel( text = "모집 완료", sizeType = ParticipantStateLabelSize.SMALL, colorType = ParticipantStateLabelColor.BLUE, diff --git a/app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt similarity index 73% rename from app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt rename to app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt index 39ab06db..2f65b2b1 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/PotiStateGuide.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt @@ -10,6 +10,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.poti.android.core.designsystem.theme.PotiTheme @@ -17,31 +18,27 @@ import com.poti.android.core.designsystem.theme.PotiTheme.colors import com.poti.android.core.designsystem.theme.PotiTheme.typography @Composable -fun PotiStateGuide( +fun HistoryStateGuide( text: String, modifier: Modifier = Modifier, ) { - Box( + Text( + text = text, + style = typography.body14sb, + color = colors.poti600, + textAlign = TextAlign.Center, 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), - ) - } + .background(colors.poti200) + .padding(vertical = 12.dp), + ) } @Preview @Composable -private fun PotiStateGuidePreview() { +private fun HistoryStateGuidePreview() { PotiTheme { - PotiStateGuide( + HistoryStateGuide( text = "상태 메세지를 입력하세요", modifier = Modifier.width(343.dp), ) From 88db02f54760b45904a9f9343c0eaa0b76b07077 Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 16:15:33 +0900 Subject: [PATCH 06/14] [feat/#25] apply ktlint --- .../history/component/HistoryParticipantStateLabel.kt | 2 -- .../android/presentation/history/component/HistoryStateGuide.kt | 2 -- 2 files changed, 4 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt index fe91db33..b90421d1 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt @@ -4,14 +4,12 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.style.LineHeightStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.poti.android.core.designsystem.theme.PotiTheme diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt index 2f65b2b1..d6341f61 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryStateGuide.kt @@ -1,13 +1,11 @@ package com.poti.android.presentation.history.component import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.text.style.TextAlign From 591c861c175b9f6eedd891597554369bb4d2cc0c Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 21:37:57 +0900 Subject: [PATCH 07/14] =?UTF-8?q?[feat/#25]=20participant-state=20?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lg = 24dp, sm=21dp --- .../component/HistoryParticipantStateLabel.kt | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt index b90421d1..853f88c5 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt @@ -47,18 +47,12 @@ fun HistoryParticipantStateLabel( 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, - ) - } + Text( + text = text, + style = sizeType.style, + color = colorType.color, + modifier = modifier, + ) } @Preview(showBackground = true) From ebd6eaec7d690f9022b9e84940b9e80dab3a60d6 Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 21:47:44 +0900 Subject: [PATCH 08/14] [chore/#25] apply ktlint --- .../history/component/HistoryParticipantStateLabel.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt index 853f88c5..bd3599b5 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt @@ -2,11 +2,8 @@ package com.poti.android.presentation.history.component import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.height import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.TextStyle From cce3def06f171ad4ff75689651bc7ca8134e4b12 Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 23:05:23 +0900 Subject: [PATCH 09/14] =?UTF-8?q?[refactor/#25]=20participant-state=20?= =?UTF-8?q?=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit text, style, color -> size, stage, status --- .../component/HistoryParticipantStateLabel.kt | 123 +++++++++++++----- app/src/main/res/values/strings.xml | 9 ++ 2 files changed, 101 insertions(+), 31 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt index bd3599b5..6302a28c 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt @@ -6,52 +6,103 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.poti.android.R import com.poti.android.core.designsystem.theme.PotiTheme import com.poti.android.core.designsystem.theme.PotiTheme.colors -import com.poti.android.core.designsystem.theme.PotiTheme.typography - -enum class ParticipantStateLabelColor { - RED, - BLUE, - GRAY, -} - -val ParticipantStateLabelColor.color: Color - @Composable get() = when (this) { - ParticipantStateLabelColor.RED -> colors.sementicRed - ParticipantStateLabelColor.BLUE -> colors.poti600 - ParticipantStateLabelColor.GRAY -> colors.gray700 - } enum class ParticipantStateLabelSize { LARGE, SMALL, } -val ParticipantStateLabelSize.style: TextStyle - @Composable get() = when (this) { - ParticipantStateLabelSize.LARGE -> typography.body16sb - ParticipantStateLabelSize.SMALL -> typography.body14sb - } +enum class ParticipantStateLabelStage(val text: Int) { + DEPOSIT(R.string.history_participant_stage_deposit), + DELIVERY(R.string.history_participant_stage_delivery), + RECRUIT(R.string.history_participant_stage_recruit) +} +enum class ParticipantStateLabelStatus(val text: Int) { + WAIT(R.string.history_participant_stage_wait), + CHECK(R.string.history_participant_stage_check), + START(R.string.history_participant_stage_start), + DONE(R.string.history_participant_stage_done) +} @Composable fun HistoryParticipantStateLabel( - text: String, sizeType: ParticipantStateLabelSize, - colorType: ParticipantStateLabelColor, + stageType: ParticipantStateLabelStage, + statusType: ParticipantStateLabelStatus, modifier: Modifier = Modifier, ) { + val (text, style, color) = + getTextInfo(sizeType, stageType, statusType) + Text( text = text, - style = sizeType.style, - color = colorType.color, + style = style, + color = color, modifier = modifier, ) } +@Composable +private fun getTextInfo( + sizeType: ParticipantStateLabelSize, + stageType: ParticipantStateLabelStage, + statusType: ParticipantStateLabelStatus +): Triple { + + val text = stringResource(stageType.text) + " " + stringResource(statusType.text) + + val style = when (sizeType) { + ParticipantStateLabelSize.LARGE -> PotiTheme.typography.body16sb + ParticipantStateLabelSize.SMALL -> PotiTheme.typography.body14sb + } + + val color = getStateColor(stageType, statusType, sizeType) + + return Triple(text, style, color) +} + +@Composable +private fun getStateColor( + stage: ParticipantStateLabelStage, + status: ParticipantStateLabelStatus, + size: ParticipantStateLabelSize +): Color { + val isLarge = size == ParticipantStateLabelSize.LARGE + val defaultColor = colors.gray700 + + return when (stage to status) { + // DEPOSIT 단계 + ParticipantStateLabelStage.DEPOSIT to ParticipantStateLabelStatus.WAIT -> + if (isLarge) colors.sementicRed else defaultColor + + ParticipantStateLabelStage.DEPOSIT to ParticipantStateLabelStatus.CHECK -> + if (isLarge) colors.poti600 else colors.sementicRed + + ParticipantStateLabelStage.DEPOSIT to ParticipantStateLabelStatus.DONE -> + if (isLarge) defaultColor else colors.poti600 + + // DELIVERY 단계 + ParticipantStateLabelStage.DELIVERY to ParticipantStateLabelStatus.WAIT -> + if (isLarge) colors.sementicRed else defaultColor + + ParticipantStateLabelStage.DELIVERY to ParticipantStateLabelStatus.START -> colors.poti600 + ParticipantStateLabelStage.DELIVERY to ParticipantStateLabelStatus.DONE -> defaultColor + + // RECRUIT 단계 + ParticipantStateLabelStage.RECRUIT to ParticipantStateLabelStatus.WAIT -> colors.sementicRed + ParticipantStateLabelStage.RECRUIT to ParticipantStateLabelStatus.DONE -> colors.poti600 + + else -> defaultColor + } +} + @Preview(showBackground = true) @Composable private fun HistoryParticipantStateLabelPreview() { @@ -60,19 +111,29 @@ private fun HistoryParticipantStateLabelPreview() { verticalArrangement = Arrangement.spacedBy(10.dp), ) { HistoryParticipantStateLabel( - text = "입금 대기", - sizeType = ParticipantStateLabelSize.LARGE, - colorType = ParticipantStateLabelColor.RED, + sizeType = ParticipantStateLabelSize.SMALL, + stageType = ParticipantStateLabelStage.DEPOSIT, + statusType = ParticipantStateLabelStatus.WAIT ) HistoryParticipantStateLabel( - text = "입금 완료", sizeType = ParticipantStateLabelSize.SMALL, - colorType = ParticipantStateLabelColor.GRAY, + stageType = ParticipantStateLabelStage.DEPOSIT, + statusType = ParticipantStateLabelStatus.CHECK ) HistoryParticipantStateLabel( - text = "모집 완료", - sizeType = ParticipantStateLabelSize.SMALL, - colorType = ParticipantStateLabelColor.BLUE, + sizeType = ParticipantStateLabelSize.LARGE, + stageType = ParticipantStateLabelStage.DEPOSIT, + statusType = ParticipantStateLabelStatus.CHECK + ) + HistoryParticipantStateLabel( + sizeType = ParticipantStateLabelSize.LARGE, + stageType = ParticipantStateLabelStage.DEPOSIT, + statusType = ParticipantStateLabelStatus.WAIT + ) + HistoryParticipantStateLabel( + sizeType = ParticipantStateLabelSize.LARGE, + stageType = ParticipantStateLabelStage.DELIVERY, + statusType = ParticipantStateLabelStatus.WAIT, ) } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 93ed9e21..cd5ead5b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -7,4 +7,13 @@ 진행 중 종료 + + 입금 + 배송 + 모집 + + 대기 + 확인 중 + 시작 + 완료 From eaf0db3e58b13be52fd7f474101cfca0f0b073d5 Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 23:12:21 +0900 Subject: [PATCH 10/14] =?UTF-8?q?[fix/#25]=20callout=20text=20strings.sml?= =?UTF-8?q?=20=EB=A1=9C=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../history/component/HistoryCalloutInfo.kt | 4 +- .../history/component/HistoryCardHistory.kt | 174 ++++++++++++++++++ app/src/main/res/values/strings.xml | 2 + 3 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt index 7ed8947a..5ac4794c 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryCalloutInfo.kt @@ -16,9 +16,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.ClipEntry import androidx.compose.ui.platform.LocalClipboard +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.poti.android.R import com.poti.android.core.common.extension.noRippleClickable import com.poti.android.core.designsystem.theme.PotiTheme import com.poti.android.core.designsystem.theme.PotiTheme.colors @@ -55,7 +57,7 @@ fun HistoryCalloutInfo( if (copyable) { Text( - text = "복사", + text = stringResource(R.string.history_callout_copy), style = PotiTheme.typography.body14m.copy(textDecoration = TextDecoration.Underline), color = colors.gray700, modifier = Modifier diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt new file mode 100644 index 00000000..958ed279 --- /dev/null +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt @@ -0,0 +1,174 @@ +package com.poti.android.presentation.history.component + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsPressedAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import coil.compose.AsyncImage +import com.poti.android.R +import com.poti.android.core.common.extension.noRippleClickable +import com.poti.android.core.designsystem.theme.PotiTheme +import com.poti.android.core.designsystem.theme.PotiTheme.colors +import com.poti.android.core.designsystem.theme.PotiTheme.typography + +enum class CardHistorySize( + val imageSize: Dp, +) { + SMALL(imageSize = 81.dp), + LARGE(imageSize = 96.dp), +} + +val CardHistorySize.artistStyle: TextStyle + @Composable get() = when (this) { + CardHistorySize.SMALL -> typography.caption12m + CardHistorySize.LARGE -> typography.body14m + } + +val CardHistorySize.titleStyle: TextStyle + @Composable get() = when (this) { + CardHistorySize.SMALL -> typography.body14m + CardHistorySize.LARGE -> typography.body16m + } + +@Composable +fun HistoryCardHistory( + sizeType: CardHistorySize, + imageUrl: String, + artist: String, + title: String, + participantState: String, + onClick: () -> Unit, + modifier: Modifier = Modifier, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, +) { + val isPressed by interactionSource.collectIsPressedAsState() + + Row( + modifier = modifier + .fillMaxWidth() + .clip(RoundedCornerShape(12.dp)) + .background(if (isPressed) colors.gray100 else colors.white) + .clickable( + interactionSource = interactionSource, + indication = null, + onClick = onClick, + ) + .padding(8.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + AsyncImage( + model = imageUrl, + contentDescription = null, + modifier = Modifier + .size(sizeType.imageSize) + .clip(RoundedCornerShape(8.dp)), + contentScale = ContentScale.Crop, + ) + + Column( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(2.dp), + ) { + Text( + text = artist, + style = sizeType.artistStyle, + color = colors.gray800, + ) + + Text( + text = title, + style = sizeType.titleStyle, + color = colors.black, + ) + + Spacer(modifier = Modifier.height(12.dp)) + + // TODO: [천민재] 임시 컴포넌트 + ParticipantState(state = participantState) + } + + Icon( + painter = painterResource(id = R.drawable.ic_arrow_right_lg), + contentDescription = null, + tint = colors.gray700, + ) + } +} + +@Composable +fun ParticipantState( + modifier: Modifier = Modifier, + state: String, +) { + val (text, color) = when (state) { + "done" -> "모집 완료" to colors.poti600 + "wait" -> "입금 대기" to colors.sementicRed + else -> "상태" to colors.gray800 + } + + Text( + text = text, + modifier = modifier, + style = typography.body14sb, + color = color, + ) +} + +@Preview +@Composable +private fun HistoryCardHistoryPreview() { + var status by remember { mutableStateOf("done") } + + PotiTheme { + Column( + verticalArrangement = Arrangement.spacedBy(10.dp), + ) { + HistoryCardHistory( + modifier = Modifier.width(344.dp), + sizeType = CardHistorySize.LARGE, + imageUrl = "", + artist = "ive(아이브)", + title = "러브다이브 위드뮤", + participantState = status, + onClick = { status = if (status == "done") "wait" else "done" }, + ) + + HistoryCardHistory( + modifier = Modifier.width(344.dp), + sizeType = CardHistorySize.SMALL, + imageUrl = "", + artist = "ive(아이브)", + title = "러브다이브 위드뮤", + participantState = status, + onClick = { status = if (status == "done") "wait" else "done" }, + ) + } + } +} diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cd5ead5b..2d803c22 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -16,4 +16,6 @@ 확인 중 시작 완료 + + 복사 From ab2293689c5830ddae1fe19abde7524f007fe5ee Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Wed, 14 Jan 2026 23:13:22 +0900 Subject: [PATCH 11/14] [fix/#25] apply ktlint --- .../history/component/HistoryCardHistory.kt | 1 - .../component/HistoryParticipantStateLabel.kt | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt index 958ed279..2a004b9a 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt @@ -32,7 +32,6 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import coil.compose.AsyncImage import com.poti.android.R -import com.poti.android.core.common.extension.noRippleClickable import com.poti.android.core.designsystem.theme.PotiTheme import com.poti.android.core.designsystem.theme.PotiTheme.colors import com.poti.android.core.designsystem.theme.PotiTheme.typography diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt index 6302a28c..904d2c88 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt @@ -22,13 +22,14 @@ enum class ParticipantStateLabelSize { enum class ParticipantStateLabelStage(val text: Int) { DEPOSIT(R.string.history_participant_stage_deposit), DELIVERY(R.string.history_participant_stage_delivery), - RECRUIT(R.string.history_participant_stage_recruit) + RECRUIT(R.string.history_participant_stage_recruit), } + enum class ParticipantStateLabelStatus(val text: Int) { WAIT(R.string.history_participant_stage_wait), CHECK(R.string.history_participant_stage_check), START(R.string.history_participant_stage_start), - DONE(R.string.history_participant_stage_done) + DONE(R.string.history_participant_stage_done), } @Composable @@ -53,9 +54,8 @@ fun HistoryParticipantStateLabel( private fun getTextInfo( sizeType: ParticipantStateLabelSize, stageType: ParticipantStateLabelStage, - statusType: ParticipantStateLabelStatus + statusType: ParticipantStateLabelStatus, ): Triple { - val text = stringResource(stageType.text) + " " + stringResource(statusType.text) val style = when (sizeType) { @@ -72,7 +72,7 @@ private fun getTextInfo( private fun getStateColor( stage: ParticipantStateLabelStage, status: ParticipantStateLabelStatus, - size: ParticipantStateLabelSize + size: ParticipantStateLabelSize, ): Color { val isLarge = size == ParticipantStateLabelSize.LARGE val defaultColor = colors.gray700 @@ -113,22 +113,22 @@ private fun HistoryParticipantStateLabelPreview() { HistoryParticipantStateLabel( sizeType = ParticipantStateLabelSize.SMALL, stageType = ParticipantStateLabelStage.DEPOSIT, - statusType = ParticipantStateLabelStatus.WAIT + statusType = ParticipantStateLabelStatus.WAIT, ) HistoryParticipantStateLabel( sizeType = ParticipantStateLabelSize.SMALL, stageType = ParticipantStateLabelStage.DEPOSIT, - statusType = ParticipantStateLabelStatus.CHECK + statusType = ParticipantStateLabelStatus.CHECK, ) HistoryParticipantStateLabel( sizeType = ParticipantStateLabelSize.LARGE, stageType = ParticipantStateLabelStage.DEPOSIT, - statusType = ParticipantStateLabelStatus.CHECK + statusType = ParticipantStateLabelStatus.CHECK, ) HistoryParticipantStateLabel( sizeType = ParticipantStateLabelSize.LARGE, stageType = ParticipantStateLabelStage.DEPOSIT, - statusType = ParticipantStateLabelStatus.WAIT + statusType = ParticipantStateLabelStatus.WAIT, ) HistoryParticipantStateLabel( sizeType = ParticipantStateLabelSize.LARGE, From bfb0b946528e3aefaa5cbee145926beb9e4089fc Mon Sep 17 00:00:00 2001 From: Open_Mind <127363360+cmj7271@users.noreply.github.com> Date: Wed, 14 Jan 2026 23:16:02 +0900 Subject: [PATCH 12/14] =?UTF-8?q?[fix/#25]=20=EB=8B=A4=EB=A5=B8=20?= =?UTF-8?q?=EB=B8=8C=EB=A0=8C=EC=B9=98=20=EC=9E=91=EC=97=85=EB=AC=BC=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../history/component/HistoryCardHistory.kt | 173 ------------------ 1 file changed, 173 deletions(-) delete mode 100644 app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt deleted file mode 100644 index 2a004b9a..00000000 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryCardHistory.kt +++ /dev/null @@ -1,173 +0,0 @@ -package com.poti.android.presentation.history.component - -import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.interaction.MutableInteractionSource -import androidx.compose.foundation.interaction.collectIsPressedAsState -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.Icon -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip -import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import coil.compose.AsyncImage -import com.poti.android.R -import com.poti.android.core.designsystem.theme.PotiTheme -import com.poti.android.core.designsystem.theme.PotiTheme.colors -import com.poti.android.core.designsystem.theme.PotiTheme.typography - -enum class CardHistorySize( - val imageSize: Dp, -) { - SMALL(imageSize = 81.dp), - LARGE(imageSize = 96.dp), -} - -val CardHistorySize.artistStyle: TextStyle - @Composable get() = when (this) { - CardHistorySize.SMALL -> typography.caption12m - CardHistorySize.LARGE -> typography.body14m - } - -val CardHistorySize.titleStyle: TextStyle - @Composable get() = when (this) { - CardHistorySize.SMALL -> typography.body14m - CardHistorySize.LARGE -> typography.body16m - } - -@Composable -fun HistoryCardHistory( - sizeType: CardHistorySize, - imageUrl: String, - artist: String, - title: String, - participantState: String, - onClick: () -> Unit, - modifier: Modifier = Modifier, - interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, -) { - val isPressed by interactionSource.collectIsPressedAsState() - - Row( - modifier = modifier - .fillMaxWidth() - .clip(RoundedCornerShape(12.dp)) - .background(if (isPressed) colors.gray100 else colors.white) - .clickable( - interactionSource = interactionSource, - indication = null, - onClick = onClick, - ) - .padding(8.dp), - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(12.dp), - ) { - AsyncImage( - model = imageUrl, - contentDescription = null, - modifier = Modifier - .size(sizeType.imageSize) - .clip(RoundedCornerShape(8.dp)), - contentScale = ContentScale.Crop, - ) - - Column( - modifier = Modifier.weight(1f), - verticalArrangement = Arrangement.spacedBy(2.dp), - ) { - Text( - text = artist, - style = sizeType.artistStyle, - color = colors.gray800, - ) - - Text( - text = title, - style = sizeType.titleStyle, - color = colors.black, - ) - - Spacer(modifier = Modifier.height(12.dp)) - - // TODO: [천민재] 임시 컴포넌트 - ParticipantState(state = participantState) - } - - Icon( - painter = painterResource(id = R.drawable.ic_arrow_right_lg), - contentDescription = null, - tint = colors.gray700, - ) - } -} - -@Composable -fun ParticipantState( - modifier: Modifier = Modifier, - state: String, -) { - val (text, color) = when (state) { - "done" -> "모집 완료" to colors.poti600 - "wait" -> "입금 대기" to colors.sementicRed - else -> "상태" to colors.gray800 - } - - Text( - text = text, - modifier = modifier, - style = typography.body14sb, - color = color, - ) -} - -@Preview -@Composable -private fun HistoryCardHistoryPreview() { - var status by remember { mutableStateOf("done") } - - PotiTheme { - Column( - verticalArrangement = Arrangement.spacedBy(10.dp), - ) { - HistoryCardHistory( - modifier = Modifier.width(344.dp), - sizeType = CardHistorySize.LARGE, - imageUrl = "", - artist = "ive(아이브)", - title = "러브다이브 위드뮤", - participantState = status, - onClick = { status = if (status == "done") "wait" else "done" }, - ) - - HistoryCardHistory( - modifier = Modifier.width(344.dp), - sizeType = CardHistorySize.SMALL, - imageUrl = "", - artist = "ive(아이브)", - title = "러브다이브 위드뮤", - participantState = status, - onClick = { status = if (status == "done") "wait" else "done" }, - ) - } - } -} From 4ab0fb3ca678d977c07dbddaa2bd29d8f14da27e Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Thu, 15 Jan 2026 01:42:30 +0900 Subject: [PATCH 13/14] =?UTF-8?q?[fix/#25]=20=EC=BD=94=EB=93=9C=EB=A6=AC?= =?UTF-8?q?=EB=B7=B0=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../history/component/HistoryParticipantStateLabel.kt | 11 ++++++++--- app/src/main/res/values/strings.xml | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt index 904d2c88..b9a6088a 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt @@ -1,5 +1,6 @@ package com.poti.android.presentation.history.component +import androidx.annotation.StringRes import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.material3.Text @@ -19,13 +20,13 @@ enum class ParticipantStateLabelSize { SMALL, } -enum class ParticipantStateLabelStage(val text: Int) { +enum class ParticipantStateLabelStage(@StringRes val text: Int) { DEPOSIT(R.string.history_participant_stage_deposit), DELIVERY(R.string.history_participant_stage_delivery), RECRUIT(R.string.history_participant_stage_recruit), } -enum class ParticipantStateLabelStatus(val text: Int) { +enum class ParticipantStateLabelStatus(@StringRes val text: Int) { WAIT(R.string.history_participant_stage_wait), CHECK(R.string.history_participant_stage_check), START(R.string.history_participant_stage_start), @@ -56,7 +57,11 @@ private fun getTextInfo( stageType: ParticipantStateLabelStage, statusType: ParticipantStateLabelStatus, ): Triple { - val text = stringResource(stageType.text) + " " + stringResource(statusType.text) + val text = stringResource( + id = R.string.history_participant_stage_and_status_format, + stringResource(stageType.text), + stringResource(statusType.text), + ) val style = when (sizeType) { ParticipantStateLabelSize.LARGE -> PotiTheme.typography.body16sb diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2d803c22..924f752e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -8,6 +8,7 @@ 진행 중 종료 + 입금 배송 모집 @@ -17,5 +18,7 @@ 시작 완료 + %1$s %2$s + 복사 From 523d83daa03ed5684e59e03975f8cf937c1eb530 Mon Sep 17 00:00:00 2001 From: CheonMinJae Date: Thu, 15 Jan 2026 01:43:19 +0900 Subject: [PATCH 14/14] [fix/#25] apply ktlint --- .../history/component/HistoryParticipantStateLabel.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt index b9a6088a..8a1d3023 100644 --- a/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt +++ b/app/src/main/java/com/poti/android/presentation/history/component/HistoryParticipantStateLabel.kt @@ -20,13 +20,17 @@ enum class ParticipantStateLabelSize { SMALL, } -enum class ParticipantStateLabelStage(@StringRes val text: Int) { +enum class ParticipantStateLabelStage( + @StringRes val text: Int, +) { DEPOSIT(R.string.history_participant_stage_deposit), DELIVERY(R.string.history_participant_stage_delivery), RECRUIT(R.string.history_participant_stage_recruit), } -enum class ParticipantStateLabelStatus(@StringRes val text: Int) { +enum class ParticipantStateLabelStatus( + @StringRes val text: Int, +) { WAIT(R.string.history_participant_stage_wait), CHECK(R.string.history_participant_stage_check), START(R.string.history_participant_stage_start),