From 5e2a6b405097a99f1e625ddc7f916d0fad47e1b4 Mon Sep 17 00:00:00 2001 From: leeseokchan00 <112953135+leeseokchan00@users.noreply.github.com> Date: Thu, 9 Jan 2025 22:32:54 +0900 Subject: [PATCH 1/3] refactor: Edit gender screen typography --- .../feature/auth/presentation/component/GenderHintButton.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/GenderHintButton.kt b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/GenderHintButton.kt index 35af0431..cb4d63b3 100644 --- a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/GenderHintButton.kt +++ b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/GenderHintButton.kt @@ -18,6 +18,7 @@ import com.teamoffroad.core.designsystem.theme.Gray100 import com.teamoffroad.core.designsystem.theme.Gray300 import com.teamoffroad.core.designsystem.theme.Main3 import com.teamoffroad.core.designsystem.theme.NametagInactive +import com.teamoffroad.core.designsystem.theme.OffroadTheme import com.teamoffroad.core.designsystem.theme.Sub @Composable @@ -47,6 +48,7 @@ fun GenderHintButton( .padding(vertical = 18.dp), text = value, color = contentColor, + style = OffroadTheme.typography.textAuto, textAlign = TextAlign.Center, ) } From 4911f1b35f18ffeb852d196a0e03569acc8c99ac Mon Sep 17 00:00:00 2001 From: leeseokchan00 <112953135+leeseokchan00@users.noreply.github.com> Date: Fri, 10 Jan 2025 00:12:28 +0900 Subject: [PATCH 2/3] refactor: edit textfield padding dp to ratio --- .../component/BirthDateTextField.kt | 36 ++++++++----------- .../presentation/signup/BirthDateScreen.kt | 6 ++-- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/BirthDateTextField.kt b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/BirthDateTextField.kt index 2bd693ba..942d1a1e 100644 --- a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/BirthDateTextField.kt +++ b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/BirthDateTextField.kt @@ -5,10 +5,9 @@ import androidx.compose.foundation.border import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.collectIsFocusedAsState 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.padding -import androidx.compose.foundation.layout.wrapContentWidth import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.BasicTextField import androidx.compose.foundation.text.KeyboardActions @@ -24,7 +23,6 @@ import androidx.compose.ui.graphics.Shape import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.input.VisualTransformation -import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.teamoffroad.core.designsystem.theme.ErrorNew import com.teamoffroad.core.designsystem.theme.Gray100 @@ -40,7 +38,7 @@ fun BirthDateTextField( placeholder: String = "", value: String = "", onValueChange: (String) -> Unit = { _ -> }, - innerPadding: Dp, + innerPadding: Float, maxLines: Int = 1, minLines: Int = 1, maxLength: Int, @@ -91,8 +89,9 @@ fun BirthDateTextField( keyboardActions = keyboardActions, visualTransformation = visualTransformation, decorationBox = { innerText -> - Column( + Row( modifier = Modifier + .fillMaxWidth() .background( color = White, shape = shape @@ -101,13 +100,14 @@ fun BirthDateTextField( width = 1.dp, color = borderLineColor.value, shape = shape, - ) - .wrapContentWidth() - .padding(vertical = 12.dp), + ), + verticalAlignment = Alignment.CenterVertically ) { + Spacer(modifier = Modifier.weight(innerPadding)) Box( - modifier = Modifier, - contentAlignment = Alignment.CenterStart, + modifier = Modifier + .weight(0.4f), + contentAlignment = Alignment.CenterStart ) { if (value.isEmpty()) { Text( @@ -115,20 +115,12 @@ fun BirthDateTextField( color = Gray300, style = textStyle, maxLines = 1, - modifier = Modifier - .align(Alignment.Center) - .wrapContentWidth(), ) } - Box( - modifier = Modifier - .fillMaxWidth() - .padding(horizontal = innerPadding) - ) { - innerText() - } + innerText() } + Spacer(modifier = Modifier.weight(0.6f - innerPadding)) } }, ) -} +} \ No newline at end of file diff --git a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/signup/BirthDateScreen.kt b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/signup/BirthDateScreen.kt index 0da8354c..4d57bcde 100644 --- a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/signup/BirthDateScreen.kt +++ b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/signup/BirthDateScreen.kt @@ -84,7 +84,7 @@ internal fun BirthDateScreen( updateYear(it) } }, - innerPadding = 30.dp, + innerPadding = 0.3f, maxLength = 4, isError = uiState.yearValidateResult == DateValidateResult.Error, keyboardOptions = KeyboardOptions.Default.copy( @@ -117,7 +117,7 @@ internal fun BirthDateScreen( updateMonth(it) } }, - innerPadding = 23.dp, + innerPadding = 0.34f, maxLength = 2, isError = uiState.monthValidateResult == DateValidateResult.Error, keyboardOptions = KeyboardOptions.Default.copy( @@ -150,7 +150,7 @@ internal fun BirthDateScreen( updateDate(it) } }, - innerPadding = 23.dp, + innerPadding = 0.34f, maxLength = 2, isError = uiState.dayValidateResult == DateValidateResult.Error, keyboardOptions = KeyboardOptions.Default.copy( From 24381dbbfc247f5ee6ba2ffa657c7adf0030826d Mon Sep 17 00:00:00 2001 From: leeseokchan00 <112953135+leeseokchan00@users.noreply.github.com> Date: Mon, 13 Jan 2025 19:29:50 +0900 Subject: [PATCH 3/3] refactor: Edit textfield padding detail --- .../auth/presentation/component/BirthDateTextField.kt | 6 +++--- .../feature/auth/presentation/signup/BirthDateScreen.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/BirthDateTextField.kt b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/BirthDateTextField.kt index 942d1a1e..e8a7d406 100644 --- a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/BirthDateTextField.kt +++ b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/component/BirthDateTextField.kt @@ -103,10 +103,10 @@ fun BirthDateTextField( ), verticalAlignment = Alignment.CenterVertically ) { - Spacer(modifier = Modifier.weight(innerPadding)) + Spacer(modifier = Modifier.weight(innerPadding + 0.02f)) Box( modifier = Modifier - .weight(0.4f), + .weight(1f - 2 * innerPadding + 0.04f), contentAlignment = Alignment.CenterStart ) { if (value.isEmpty()) { @@ -119,7 +119,7 @@ fun BirthDateTextField( } innerText() } - Spacer(modifier = Modifier.weight(0.6f - innerPadding)) + Spacer(modifier = Modifier.weight(innerPadding - 0.02f)) } }, ) diff --git a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/signup/BirthDateScreen.kt b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/signup/BirthDateScreen.kt index 4d57bcde..66d5d16a 100644 --- a/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/signup/BirthDateScreen.kt +++ b/feature/auth/src/main/java/com/teamoffroad/feature/auth/presentation/signup/BirthDateScreen.kt @@ -84,7 +84,7 @@ internal fun BirthDateScreen( updateYear(it) } }, - innerPadding = 0.3f, + innerPadding = 0.28f, maxLength = 4, isError = uiState.yearValidateResult == DateValidateResult.Error, keyboardOptions = KeyboardOptions.Default.copy( @@ -117,7 +117,7 @@ internal fun BirthDateScreen( updateMonth(it) } }, - innerPadding = 0.34f, + innerPadding = 0.32f, maxLength = 2, isError = uiState.monthValidateResult == DateValidateResult.Error, keyboardOptions = KeyboardOptions.Default.copy(