Skip to content

Commit

Permalink
[MERGE] #167 -> develop
Browse files Browse the repository at this point in the history
[FIX/#167] ํ‚ค๋ณด๋“œ ๋ฐ ์Šคํƒ ๊ด€๋ฆฌ
  • Loading branch information
leeeyubin authored Jul 19, 2024
2 parents 074396d + 9381d70 commit 802030a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ package com.terning.core.designsystem.component.textfield

import androidx.annotation.StringRes
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.ImeAction
import com.terning.core.designsystem.theme.Black
import com.terning.core.designsystem.theme.Grey300
import com.terning.core.designsystem.theme.Grey400
Expand All @@ -21,6 +25,9 @@ fun NameTextField(
helperColor: Color,
helperIcon: Int? = null,
) {
val focusManager = LocalFocusManager.current
val keyboardController = LocalSoftwareKeyboardController.current

TerningBasicTextField(
value = value,
onValueChange = onValueChange,
Expand All @@ -36,5 +43,10 @@ fun NameTextField(
helperMessage = stringResource(id = helperMessage),
helperIcon = helperIcon,
helperColor = helperColor,
imeAction = ImeAction.Done,
onDoneAction = {
focusManager.clearFocus()
keyboardController?.hide()
}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ fun SearchTextField(
readOnly = readOnly,
onSearchAction = {
if (text.isNotBlank()) {
keyboardController?.hide()
keyboardController?.hide()
focusManager.clearFocus()
onSearchAction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.terning.feature.filtering.starthome

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
Expand All @@ -11,7 +10,6 @@ import androidx.compose.foundation.layout.fillMaxSize
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.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
Expand All @@ -22,24 +20,21 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import androidx.navigation.NavOptions
import androidx.navigation.compose.rememberNavController
import com.airbnb.lottie.Lottie
import com.airbnb.lottie.compose.LottieAnimation
import com.airbnb.lottie.compose.LottieCompositionSpec
import com.airbnb.lottie.compose.LottieConstants
import com.airbnb.lottie.compose.rememberLottieAnimatable
import com.airbnb.lottie.compose.rememberLottieComposition
import com.terning.core.designsystem.component.button.RectangleButton
import com.terning.core.designsystem.theme.TerningPointTheme
import com.terning.core.designsystem.theme.TerningTheme
import com.terning.feature.R
import com.terning.feature.home.home.navigation.navigateHome
import com.terning.feature.onboarding.signin.navigation.SignIn
import kotlinx.coroutines.delay

@Composable
Expand Down Expand Up @@ -87,7 +82,14 @@ fun StartHomeScreen(
style = TerningTheme.typography.button0,
paddingVertical = 20.dp,
text = R.string.start_home_next_button,
onButtonClick = { navController.navigateHome() },
onButtonClick = {
navController.navigateHome(
navOptions = NavOptions.Builder().setPopUpTo(
route = SignIn,
inclusive = true
).build()
)
},
)
}
}
Expand All @@ -102,10 +104,14 @@ fun StartHomeLottieAnimation(
LottieAnimation(
modifier = modifier
.fillMaxWidth()
.aspectRatio((lottieComposition?.bounds?.width()?.toFloat()?:1f) / (lottieComposition?.bounds?.height()?:1))
.aspectRatio(
(lottieComposition?.bounds
?.width()
?.toFloat()
?: 1f) / (lottieComposition?.bounds?.height() ?: 1)
)
.padding(horizontal = 24.dp),
composition = lottieComposition,
iterations = LottieConstants.IterateForever
)
}

Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ class SignUpViewModel @Inject constructor(

outOfBoundName -> _state.value = _state.value.copy(
name = trimmedName,
drawLineColor = Grey500,
helper = R.string.sign_up_helper,
helperIcon = null,
helperColor = Grey400,
drawLineColor =WarningRed,
helper = R.string.sign_up_helper_out,
helperIcon = R.drawable.ic_sign_up_error,
helperColor = WarningRed,
isButtonValid = false
)

Expand Down Expand Up @@ -114,7 +114,7 @@ class SignUpViewModel @Inject constructor(
}

companion object {
const val NAME_ERROR = "[!@#\$%^&*(),.?\":{}|<>\\[\\]\\\\/]"
const val NAME_ERROR = "[!@#\$%^&*(),.?\":{}|<>\\[\\]\\\\/\\-=+~`\\p{S}\\p{P}]"
private const val MAX_LENGTH = 12
private const val KAKA0 = "KAKAO"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ fun SplashScreen(
inclusive = true
).build()
)
else navController.navigateSignIn()
else navController.navigateSignIn(
navOptions = NavOptions.Builder().setPopUpTo(
route = Splash,
inclusive = true
).build()
)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions feature/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<string name="sign_up_helper">12์ž๋ฆฌ ์ด๋‚ด, ๋ฌธ์ž/์ˆซ์ž ๊ฐ€๋Šฅ, ํŠน์ˆ˜๋ฌธ์ž/๊ธฐํ˜ธ ์ž…๋ ฅ๋ถˆ๊ฐ€</string>
<string name="sign_up_helper_error">์ด๋ฆ„์— ํŠน์ˆ˜๋ฌธ์ž๋Š” ์ž…๋ ฅํ•  ์ˆ˜ ์—†์–ด์š”</string>
<string name="sign_up_helper_available">์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ด๋ฆ„์ด์—์š”</string>
<string name="sign_up_helper_out">์ด๋ฆ„์€ 12์ž๋ฆฌ ์ด๋‚ด๋กœ ์„ค์ •ํ•ด ์ฃผ์„ธ์š”</string>

<!--Search-->
<string name="search_text_field_hint">๊ด€์‹ฌ์žˆ๋Š” ์ธํ„ด ๊ณต๊ณ  ํ‚ค์›Œ๋“œ๋ฅผ ๊ฒ€์ƒ‰ํ•ด ๋ณด์„ธ์š”</string>
Expand Down

0 comments on commit 802030a

Please sign in to comment.