From 34d4baf873179f1fd3943a1ee1a9c751afc3ac04 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 10 Dec 2024 02:14:35 +0900 Subject: [PATCH 01/10] =?UTF-8?q?[UI/#304]=20=ED=95=84=ED=84=B0=EB=A7=81?= =?UTF-8?q?=20=EC=8B=9C=EC=9E=91=20=EB=B2=84=ED=8A=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/button/RectangleButton.kt | 2 +- .../component/button/RoundButton.kt | 2 +- .../component/button/TerningBasicButton.kt | 4 +- .../startfiltering/StartFilteringRoute.kt | 96 +++++++++++-------- .../filtering/src/main/res/values/strings.xml | 1 + 5 files changed, 61 insertions(+), 44 deletions(-) diff --git a/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt index 32644e98..d373a28d 100644 --- a/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RectangleButton.kt @@ -44,7 +44,7 @@ fun RectangleButton( @Preview(showBackground = true) @Composable -fun RectangleButtonPreview() { +private fun RectangleButtonPreview() { TerningPointTheme { RectangleButton( style = TerningTheme.typography.button0, diff --git a/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt index d826947a..0b3db5e5 100644 --- a/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/RoundButton.kt @@ -46,7 +46,7 @@ fun RoundButton( @Preview(showBackground = true) @Composable -fun RoundButtonPreview() { +private fun RoundButtonPreview() { TerningPointTheme { RoundButton( style = TerningTheme.typography.button0, diff --git a/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt index e450d913..57d7ba76 100644 --- a/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt +++ b/core/designsystem/src/main/java/com/terning/core/designsystem/component/button/TerningBasicButton.kt @@ -57,7 +57,7 @@ fun TerningBasicButton( CompositionLocalProvider(LocalRippleTheme provides NoRippleTheme) { Button( - contentPadding = PaddingValues(paddingVertical), + contentPadding = PaddingValues(vertical = paddingVertical), modifier = modifier.fillMaxWidth(), interactionSource = interactionSource, enabled = isEnabled, @@ -80,7 +80,7 @@ fun TerningBasicButton( @Preview(showBackground = true) @Composable -fun TerningBasicButtonPreview() { +private fun TerningBasicButtonPreview() { TerningPointTheme { TerningBasicButton( text = R.string.button_preview, diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt index 0b68f45a..1c20624c 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt @@ -3,7 +3,6 @@ package com.terning.feature.filtering.startfiltering import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.fadeIn import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize @@ -21,17 +20,17 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle -import com.airbnb.lottie.compose.LottieCompositionSpec import com.airbnb.lottie.compose.LottieConstants -import com.airbnb.lottie.compose.rememberLottieComposition import com.terning.core.analytics.EventType import com.terning.core.analytics.LocalTracker -import com.terning.core.designsystem.component.button.RectangleButton +import com.terning.core.designsystem.component.button.RoundButton import com.terning.core.designsystem.component.item.TerningLottieAnimation +import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White @@ -66,7 +65,6 @@ fun StartFilteringRoute( buttonState = state.isButtonVisible, screenHeight = screenHeight, ) - } @Composable @@ -75,50 +73,68 @@ fun StartFilteringScreen( buttonState: Boolean, screenHeight: Float, ) { - Box( + Column( modifier = Modifier .fillMaxSize() .statusBarsPadding() .navigationBarsPadding() - .background(White) + .background(White), + horizontalAlignment = Alignment.CenterHorizontally + ) { + Spacer(modifier = Modifier.height((128 * screenHeight).dp)) + Text( + text = stringResource(id = R.string.start_filtering_title), + style = TerningTheme.typography.title1, + modifier = Modifier.padding(bottom = 36.dp), + textAlign = TextAlign.Center + ) + TerningLottieAnimation( + jsonFile = R.raw.terning_onboarding_start, + iterations = LottieConstants.IterateForever, + modifier = Modifier + .fillMaxWidth() + .height(372.dp) + .padding(horizontal = 24.dp) + ) + Spacer(modifier = Modifier.weight(2f)) + ButtonAnimation( + buttonState = buttonState, + onNextClick = onNextClick + ) + } +} + +@Composable +private fun ButtonAnimation( + buttonState: Boolean, + onNextClick: () -> Unit, + modifier: Modifier = Modifier, +) { + AnimatedVisibility( + visible = buttonState, + enter = fadeIn(initialAlpha = 0.3f), + modifier = Modifier.padding(bottom = 24.dp) ) { Column( - modifier = Modifier.fillMaxSize(), + modifier = modifier, horizontalAlignment = Alignment.CenterHorizontally ) { - Spacer(modifier = Modifier.height((128 * screenHeight).dp)) - Text( - text = stringResource(id = R.string.start_filtering_title), - style = TerningTheme.typography.title1, - modifier = Modifier.padding(bottom = 36.dp), - textAlign = TextAlign.Center + RoundButton( + style = TerningTheme.typography.button0, + paddingVertical = 17.dp, + text = R.string.start_filtering_button, + onButtonClick = onNextClick, + cornerRadius = 10.dp, + modifier = Modifier.padding(horizontal = 24.dp) ) - TerningLottieAnimation( - jsonFile = R.raw.terning_onboarding_start, - iterations = LottieConstants.IterateForever, - modifier = Modifier - .fillMaxWidth() - .height(372.dp) - .padding(horizontal = 24.dp) + Spacer(modifier = Modifier.height(12.dp)) + Text( + text = stringResource(R.string.start_filtering_later), + style = TerningTheme.typography.detail3.copy( + textDecoration = TextDecoration.Underline + ), + color = Grey500, ) - Spacer(modifier = Modifier.weight(2f)) - } - Box( - modifier = Modifier - .align(Alignment.BottomCenter) - .padding(bottom = 12.dp) - ) { - AnimatedVisibility( - visible = buttonState, - enter = fadeIn(initialAlpha = 0.3f), - ) { - RectangleButton( - style = TerningTheme.typography.button0, - paddingVertical = 20.dp, - text = R.string.start_filtering_button, - onButtonClick = onNextClick, - ) - } } } } @@ -127,7 +143,7 @@ private const val DELAY: Long = 1000 @Preview(showBackground = true) @Composable -fun StartFilteringScreenPreview() { +private fun StartFilteringScreenPreview() { TerningPointTheme { StartFilteringScreen( onNextClick = {}, diff --git a/feature/filtering/src/main/res/values/strings.xml b/feature/filtering/src/main/res/values/strings.xml index a3244602..858e1d62 100644 --- a/feature/filtering/src/main/res/values/strings.xml +++ b/feature/filtering/src/main/res/values/strings.xml @@ -7,6 +7,7 @@ 터닝에서 내 계획에 딱 맞는\n대학생 인턴 찾기를 도와드릴게요 시작화면 이미지 시작하기 + 계획 나중에 입력하기 나에게 딱 맞는 공고가 준비됐어요!\n터닝을 시작해 볼까요? From f498996f30abbff4df69ef975e535597a37b5bb3 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 10 Dec 2024 02:19:05 +0900 Subject: [PATCH 02/10] =?UTF-8?q?[UI/#304]=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EB=86=92=EC=9D=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/filtering/startfiltering/StartFilteringRoute.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt index 1c20624c..6f88c2f3 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt @@ -96,7 +96,7 @@ fun StartFilteringScreen( .height(372.dp) .padding(horizontal = 24.dp) ) - Spacer(modifier = Modifier.weight(2f)) + Spacer(modifier = Modifier.height((79 * screenHeight).dp)) ButtonAnimation( buttonState = buttonState, onNextClick = onNextClick From d212ca4ab0f266221491846d36e8838300f12412 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 10 Dec 2024 02:37:46 +0900 Subject: [PATCH 03/10] =?UTF-8?q?[UI/#304]=20=EB=84=A4=EB=B9=84=EA=B2=8C?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../startfiltering/StartFilteringRoute.kt | 24 ++++++++++++------- .../navigation/StartFilteringNavigation.kt | 10 ++++---- .../com/terning/feature/main/MainScreen.kt | 15 +++++++++++- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt index 6f88c2f3..99074b86 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt @@ -30,6 +30,7 @@ import com.terning.core.analytics.EventType import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.button.RoundButton import com.terning.core.designsystem.component.item.TerningLottieAnimation +import com.terning.core.designsystem.extension.noRippleClickable import com.terning.core.designsystem.theme.Grey500 import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme @@ -39,7 +40,8 @@ import kotlinx.coroutines.delay @Composable fun StartFilteringRoute( - onNextClick: () -> Unit, + onButtonClick: () -> Unit, + onTextClick: () -> Unit, viewModel: StartFilteringViewModel = hiltViewModel() ) { val state by viewModel.state.collectAsStateWithLifecycle() @@ -55,13 +57,14 @@ fun StartFilteringRoute( } StartFilteringScreen( - onNextClick = { - onNextClick() + onButtonClick = { + onButtonClick() amplitudeTracker.track( type = EventType.CLICK, name = "start_service" ) }, + onTextClick = onTextClick, buttonState = state.isButtonVisible, screenHeight = screenHeight, ) @@ -69,7 +72,8 @@ fun StartFilteringRoute( @Composable fun StartFilteringScreen( - onNextClick: () -> Unit, + onButtonClick: () -> Unit, + onTextClick: () -> Unit, buttonState: Boolean, screenHeight: Float, ) { @@ -99,7 +103,8 @@ fun StartFilteringScreen( Spacer(modifier = Modifier.height((79 * screenHeight).dp)) ButtonAnimation( buttonState = buttonState, - onNextClick = onNextClick + onButtonClick = onButtonClick, + onTextClick = onTextClick ) } } @@ -107,7 +112,8 @@ fun StartFilteringScreen( @Composable private fun ButtonAnimation( buttonState: Boolean, - onNextClick: () -> Unit, + onButtonClick: () -> Unit, + onTextClick: () -> Unit, modifier: Modifier = Modifier, ) { AnimatedVisibility( @@ -123,7 +129,7 @@ private fun ButtonAnimation( style = TerningTheme.typography.button0, paddingVertical = 17.dp, text = R.string.start_filtering_button, - onButtonClick = onNextClick, + onButtonClick = onButtonClick, cornerRadius = 10.dp, modifier = Modifier.padding(horizontal = 24.dp) ) @@ -134,6 +140,7 @@ private fun ButtonAnimation( textDecoration = TextDecoration.Underline ), color = Grey500, + modifier = Modifier.noRippleClickable { onTextClick() } ) } } @@ -146,7 +153,8 @@ private const val DELAY: Long = 1000 private fun StartFilteringScreenPreview() { TerningPointTheme { StartFilteringScreen( - onNextClick = {}, + onButtonClick = {}, + onTextClick = {}, buttonState = true, screenHeight = 1f ) diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt index 12b8a4cd..14e025d6 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt @@ -2,12 +2,10 @@ package com.terning.feature.filtering.startfiltering.navigation import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder -import androidx.navigation.NavHostController import androidx.navigation.NavOptions import androidx.navigation.compose.composable import androidx.navigation.toRoute import com.terning.core.navigation.Route -import com.terning.feature.filtering.filteringone.navigation.navigateFilteringOne import com.terning.feature.filtering.startfiltering.StartFilteringRoute import kotlinx.serialization.Serializable @@ -22,14 +20,14 @@ fun NavController.navigateStartFiltering( } fun NavGraphBuilder.startFilteringNavGraph( - navHostController: NavHostController + onButtonClick: (String) -> Unit, + onTextClick: () -> Unit ) { composable { val args = it.toRoute() StartFilteringRoute( - onNextClick = { - navHostController.navigateFilteringOne(args.name) - } + onButtonClick = { onButtonClick(args.name) }, + onTextClick = onTextClick ) } } diff --git a/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt index 2f28f4a4..f6a2010f 100644 --- a/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt @@ -45,6 +45,7 @@ import com.terning.core.designsystem.theme.White import com.terning.core.designsystem.util.NoRippleInteractionSource import com.terning.feature.calendar.calendar.navigation.calendarNavGraph import com.terning.feature.filtering.filteringone.navigation.filteringOneNavGraph +import com.terning.feature.filtering.filteringone.navigation.navigateFilteringOne import com.terning.feature.filtering.filteringthree.navigation.filteringThreeNavGraph import com.terning.feature.filtering.filteringtwo.navigation.filteringTwoNavGraph import com.terning.feature.filtering.startfiltering.navigation.navigateStartFiltering @@ -221,7 +222,19 @@ fun MainScreen( ) } ) - startFilteringNavGraph(navHostController = navigator.navController) + startFilteringNavGraph( + onButtonClick = { name -> + navigator.navController.navigateFilteringOne(name) + }, + onTextClick = { + val navOptions = navOptions { + popUpTo(id = navigator.navController.graph.id) { + inclusive = true + } + } + navigator.navController.navigateHome(navOptions) + } + ) startHomeNavGraph( navigateHome = { val navOptions = navOptions { From 369c8e267957e0f842d36d32beecb692d0d523d8 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 10 Dec 2024 03:02:14 +0900 Subject: [PATCH 04/10] =?UTF-8?q?[UI/#304]=20StartHome=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../filtering/starthome/StartHomeRoute.kt | 97 +++++++------------ 1 file changed, 36 insertions(+), 61 deletions(-) diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt index ba376511..02113fb9 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/starthome/StartHomeRoute.kt @@ -3,7 +3,6 @@ package com.terning.feature.filtering.starthome import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.fadeIn import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.aspectRatio @@ -26,11 +25,9 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle -import com.airbnb.lottie.compose.LottieAnimation -import com.airbnb.lottie.compose.LottieCompositionSpec import com.airbnb.lottie.compose.LottieConstants -import com.airbnb.lottie.compose.rememberLottieComposition -import com.terning.core.designsystem.component.button.RectangleButton +import com.terning.core.designsystem.component.button.RoundButton +import com.terning.core.designsystem.component.item.TerningLottieAnimation import com.terning.core.designsystem.theme.TerningPointTheme import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White @@ -53,7 +50,7 @@ fun StartHomeRoute( } StartHomeScreen( - navigateToHome = navigateToHome, + onClick = navigateToHome, buttonState = state.isButtonVisible, screenHeight = screenHeight, ) @@ -61,81 +58,59 @@ fun StartHomeRoute( @Composable fun StartHomeScreen( - navigateToHome: () -> Unit, + onClick: () -> Unit, buttonState: Boolean, screenHeight: Float, ) { - Box( + Column( modifier = Modifier .fillMaxSize() - .background(White) .statusBarsPadding() .navigationBarsPadding() + .background(White), + horizontalAlignment = Alignment.CenterHorizontally ) { - Column( - modifier = Modifier.fillMaxSize(), - horizontalAlignment = Alignment.CenterHorizontally - ) { - Spacer(modifier = Modifier.height((128 * screenHeight).dp)) - Text( - text = stringResource(id = R.string.start_home_title), - style = TerningTheme.typography.title1, - textAlign = TextAlign.Center, - modifier = Modifier.padding(bottom = 30.dp) - ) - StartHomeLottieAnimation() - } - Box( + Spacer(modifier = Modifier.height((128 * screenHeight).dp)) + Text( + text = stringResource(id = R.string.start_home_title), + style = TerningTheme.typography.title1, + textAlign = TextAlign.Center, + modifier = Modifier.padding(bottom = 52.dp) + ) + TerningLottieAnimation( + jsonFile = R.raw.terning_start_home, modifier = Modifier - .fillMaxSize() - .padding(bottom = 12.dp), - contentAlignment = Alignment.BottomCenter + .fillMaxWidth() + .padding(horizontal = 24.dp) + .aspectRatio(1f), + iterations = LottieConstants.IterateForever + ) + Spacer(modifier = Modifier.height((88 * screenHeight).dp)) + AnimatedVisibility( + visible = buttonState, + enter = fadeIn(initialAlpha = 0.3f), ) { - AnimatedVisibility( - visible = buttonState, - enter = fadeIn(initialAlpha = 0.3f), - ) { - RectangleButton( - style = TerningTheme.typography.button0, - paddingVertical = 20.dp, - text = R.string.start_home_next_button, - onButtonClick = navigateToHome, - ) - } + RoundButton( + style = TerningTheme.typography.button0, + paddingVertical = 17.dp, + text = R.string.start_home_next_button, + onButtonClick = onClick, + cornerRadius = 10.dp, + modifier = Modifier.padding(horizontal = 24.dp) + ) } + Spacer(modifier = Modifier.height((49 * screenHeight).dp)) } } private const val DELAY: Long = 1000 -@Composable -fun StartHomeLottieAnimation( - modifier: Modifier = Modifier -) { - val lottieComposition by rememberLottieComposition( - LottieCompositionSpec.RawRes(R.raw.terning_start_home) - ) - LottieAnimation( - modifier = modifier - .fillMaxWidth() - .aspectRatio( - (lottieComposition?.bounds - ?.width() - ?.toFloat() - ?: 1f) / (lottieComposition?.bounds?.height() ?: 1) - ) - .padding(horizontal = 24.dp), - composition = lottieComposition, - iterations = LottieConstants.IterateForever - ) -} - @Preview(showBackground = true) @Composable -fun StartHomeScreenPreview() { +private fun StartHomeScreenPreview() { TerningPointTheme { StartHomeScreen( - navigateToHome = {}, + onClick = {}, buttonState = true, screenHeight = 1f ) From 08fc1226031f66a478cea7624a93fdf8c32ae086 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 10 Dec 2024 03:07:18 +0900 Subject: [PATCH 05/10] =?UTF-8?q?[UI/#304]=20=EB=86=92=EC=9D=B4=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../filtering/startfiltering/StartFilteringRoute.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt index 99074b86..2188fe0b 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt @@ -5,6 +5,7 @@ import androidx.compose.animation.fadeIn import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -85,11 +86,10 @@ fun StartFilteringScreen( .background(White), horizontalAlignment = Alignment.CenterHorizontally ) { - Spacer(modifier = Modifier.height((128 * screenHeight).dp)) + Spacer(modifier = Modifier.height((138 * screenHeight).dp)) Text( text = stringResource(id = R.string.start_filtering_title), style = TerningTheme.typography.title1, - modifier = Modifier.padding(bottom = 36.dp), textAlign = TextAlign.Center ) TerningLottieAnimation( @@ -97,7 +97,7 @@ fun StartFilteringScreen( iterations = LottieConstants.IterateForever, modifier = Modifier .fillMaxWidth() - .height(372.dp) + .aspectRatio(1f) .padding(horizontal = 24.dp) ) Spacer(modifier = Modifier.height((79 * screenHeight).dp)) @@ -106,6 +106,7 @@ fun StartFilteringScreen( onButtonClick = onButtonClick, onTextClick = onTextClick ) + Spacer(modifier = Modifier.height((24 * screenHeight).dp)) } } @@ -119,7 +120,6 @@ private fun ButtonAnimation( AnimatedVisibility( visible = buttonState, enter = fadeIn(initialAlpha = 0.3f), - modifier = Modifier.padding(bottom = 24.dp) ) { Column( modifier = modifier, From cd284db4765a2b06bd0b8665b8f82412e57bb76c Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 10 Dec 2024 03:11:31 +0900 Subject: [PATCH 06/10] =?UTF-8?q?[UI/#304]=20docs.md=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/designsystem/docs.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/designsystem/docs.md b/core/designsystem/docs.md index be01e684..aff6290b 100644 --- a/core/designsystem/docs.md +++ b/core/designsystem/docs.md @@ -16,6 +16,9 @@ contentDescription을 사용하지 않는 Image가 담긴 패키지입니다. # Package com.terning.core.designsystem.component.item 여러 화면에서 쓰이는 아이템들이 들어있는 패키지입니다. +# Package com.terning.core.designsystem.component.snackbar +스낵바가 들어있는 패키지입니다. + # Package com.terning.core.designsystem.component.textfield 텍스트 필드가 있는 패키지입니다. @@ -23,7 +26,7 @@ contentDescription을 사용하지 않는 Image가 담긴 패키지입니다. 탑바가 있는 패키지입니다. # Package com.terning.core.designsystem.theme -의 theme가 있는 패키지입니다. +terning의 theme가 있는 패키지입니다. # Package com.terning.core.designsystem.type 여러 가지 타입을 나타내는 패키지입니다. From b79241ac1e4c481c5a43b8336b16600127de4516 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 10 Dec 2024 03:14:22 +0900 Subject: [PATCH 07/10] =?UTF-8?q?[DEL/#304]=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EB=9D=BC=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle/libs.versions.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ba743bca..ac290325 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -167,7 +167,6 @@ androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espres material = { group = "com.google.android.material", name = "material", version.ref = "material" } timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" } -ossLicense = { group = "com.google.android.gms", name = "play-services-oss-licenses", version.ref = "ossVersion" } lottie = { group = "com.airbnb.android", name = "lottie-compose", version.ref = "lottieVersion" } kakao-user = { group = "com.kakao.sdk", name = "v2-user", version.ref = "kakaoVersion" } From 2e38437e52a5ea106042bdcd993bd9a6277acc58 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 10 Dec 2024 03:26:15 +0900 Subject: [PATCH 08/10] =?UTF-8?q?[FEAT/#304]=20immutable=20=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-logic/src/main/java/terning.android.feature.gradle.kts | 1 + gradle/libs.versions.toml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/build-logic/src/main/java/terning.android.feature.gradle.kts b/build-logic/src/main/java/terning.android.feature.gradle.kts index 1793f9dc..9575403d 100644 --- a/build-logic/src/main/java/terning.android.feature.gradle.kts +++ b/build-logic/src/main/java/terning.android.feature.gradle.kts @@ -36,4 +36,5 @@ dependencies { implementation(libs.findLibrary("lottie").get()) implementation(libs.findLibrary("accompanist.systemuicontroller").get()) implementation(libs.findLibrary("androidx.browser").get()) + implementation(libs.findLibrary("kotlin.collections.immutable").get()) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ac290325..78642c01 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -46,6 +46,7 @@ kotlinxImmutable = "0.3.7" kotlinxSerializationJsonVersion = "1.5.1" serialization = "1.6.3" kotlinParcelize = "1.8.20" +kotlinx-collections-immutable = "0.3.8" ## Coroutine coroutine = "1.8.1" @@ -158,6 +159,7 @@ coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutin coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutine" } kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" } kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +kotlin-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version.ref = "kotlinx-collections-immutable" } coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coilCompose" } coil-network-okhttp = { module = "io.coil-kt.coil3:coil-network-okhttp", version.ref = "coilCompose" } From 488328568d930db8b2c84a3a2e8a6411172ee459 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 10 Dec 2024 03:30:37 +0900 Subject: [PATCH 09/10] =?UTF-8?q?[FEAT/#304]=20immutableList=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/terning/feature/main/MainScreen.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt index f6a2010f..d3bc4453 100644 --- a/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt @@ -66,6 +66,8 @@ import com.terning.feature.onboarding.splash.navigation.splashNavGraph import com.terning.feature.search.search.navigation.searchNavGraph import com.terning.feature.search.searchprocess.navigation.navigateSearchProcess import com.terning.feature.search.searchprocess.navigation.searchProcessNavGraph +import kotlinx.collections.immutable.ImmutableList +import kotlinx.collections.immutable.toImmutableList import kotlinx.coroutines.launch @Composable @@ -113,7 +115,7 @@ fun MainScreen( bottomBar = { MainBottomBar( isVisible = navigator.showBottomBar(), - tabs = MainTab.entries.toList(), + tabs = MainTab.entries.toImmutableList(), currentTab = navigator.currentTab, onTabSelected = { navigation -> amplitudeTracker.track( @@ -278,7 +280,7 @@ fun MainScreen( @Composable private fun MainBottomBar( isVisible: Boolean, - tabs: List, + tabs: ImmutableList, currentTab: MainTab?, onTabSelected: (MainTab) -> Unit, ) { From c388c49605a29943681cdc96650309bb53486c38 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 17 Dec 2024 20:57:36 +0900 Subject: [PATCH 10/10] =?UTF-8?q?[MOD/#304]=20=EC=9D=B4=EB=B2=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=9D=B4=EB=A6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../startfiltering/StartFilteringRoute.kt | 30 +++++++++---------- .../navigation/StartFilteringNavigation.kt | 8 ++--- .../com/terning/feature/main/MainScreen.kt | 4 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt index 2188fe0b..b3b68134 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt @@ -41,8 +41,8 @@ import kotlinx.coroutines.delay @Composable fun StartFilteringRoute( - onButtonClick: () -> Unit, - onTextClick: () -> Unit, + onStartClick: () -> Unit, + onLaterClick: () -> Unit, viewModel: StartFilteringViewModel = hiltViewModel() ) { val state by viewModel.state.collectAsStateWithLifecycle() @@ -58,14 +58,14 @@ fun StartFilteringRoute( } StartFilteringScreen( - onButtonClick = { - onButtonClick() + onStartClick = { + onStartClick() amplitudeTracker.track( type = EventType.CLICK, name = "start_service" ) }, - onTextClick = onTextClick, + onLaterClick = onLaterClick, buttonState = state.isButtonVisible, screenHeight = screenHeight, ) @@ -73,8 +73,8 @@ fun StartFilteringRoute( @Composable fun StartFilteringScreen( - onButtonClick: () -> Unit, - onTextClick: () -> Unit, + onStartClick: () -> Unit, + onLaterClick: () -> Unit, buttonState: Boolean, screenHeight: Float, ) { @@ -103,8 +103,8 @@ fun StartFilteringScreen( Spacer(modifier = Modifier.height((79 * screenHeight).dp)) ButtonAnimation( buttonState = buttonState, - onButtonClick = onButtonClick, - onTextClick = onTextClick + onStartClick = onStartClick, + onLaterClick = onLaterClick ) Spacer(modifier = Modifier.height((24 * screenHeight).dp)) } @@ -113,8 +113,8 @@ fun StartFilteringScreen( @Composable private fun ButtonAnimation( buttonState: Boolean, - onButtonClick: () -> Unit, - onTextClick: () -> Unit, + onStartClick: () -> Unit, + onLaterClick: () -> Unit, modifier: Modifier = Modifier, ) { AnimatedVisibility( @@ -129,7 +129,7 @@ private fun ButtonAnimation( style = TerningTheme.typography.button0, paddingVertical = 17.dp, text = R.string.start_filtering_button, - onButtonClick = onButtonClick, + onButtonClick = onStartClick, cornerRadius = 10.dp, modifier = Modifier.padding(horizontal = 24.dp) ) @@ -140,7 +140,7 @@ private fun ButtonAnimation( textDecoration = TextDecoration.Underline ), color = Grey500, - modifier = Modifier.noRippleClickable { onTextClick() } + modifier = Modifier.noRippleClickable { onLaterClick() } ) } } @@ -153,8 +153,8 @@ private const val DELAY: Long = 1000 private fun StartFilteringScreenPreview() { TerningPointTheme { StartFilteringScreen( - onButtonClick = {}, - onTextClick = {}, + onStartClick = {}, + onLaterClick = {}, buttonState = true, screenHeight = 1f ) diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt index 14e025d6..f6e79b5d 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt @@ -20,14 +20,14 @@ fun NavController.navigateStartFiltering( } fun NavGraphBuilder.startFilteringNavGraph( - onButtonClick: (String) -> Unit, - onTextClick: () -> Unit + onStartClick: (String) -> Unit, + onLaterClick: () -> Unit ) { composable { val args = it.toRoute() StartFilteringRoute( - onButtonClick = { onButtonClick(args.name) }, - onTextClick = onTextClick + onStartClick = { onStartClick(args.name) }, + onLaterClick = onLaterClick ) } } diff --git a/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt index d3bc4453..e51797e7 100644 --- a/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt @@ -225,10 +225,10 @@ fun MainScreen( } ) startFilteringNavGraph( - onButtonClick = { name -> + onStartClick = { name -> navigator.navController.navigateFilteringOne(name) }, - onTextClick = { + onLaterClick = { val navOptions = navOptions { popUpTo(id = navigator.navController.graph.id) { inclusive = true