Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.ruleup.android_ruleup.navigation

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.consumeWindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
Expand Down Expand Up @@ -96,7 +97,8 @@ fun RootComposable(
) { innerPadding ->
AppNavHost(
backStack = backStack,
modifier = Modifier.padding(innerPadding),
// 소비하지 않으면 화면의 statusBarsPadding·imePadding 이 시스템 바 높이를 한 번 더 더한다.
modifier = Modifier.padding(innerPadding).consumeWindowInsets(innerPadding),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ object RuleUpPalette {
val Kakao = Color(0xFFFEE500)
val KakaoLabel = Color(0xFF191919)

/** Google 로그인 버튼 색(브랜딩 가이드라인 라이트). */
val GoogleSurface = Color(0xFFFFFFFF)
val GoogleStroke = Color(0xFF747775)
/** Google 로그인 버튼 색(브랜딩 가이드라인 뉴트럴). 라이트 테마로 바꾸면 #747775 테두리가 필수다. */
val GoogleSurface = Color(0xFFF2F2F2)
val GoogleLabel = Color(0xFF1F1F1F)
}

Expand Down Expand Up @@ -94,6 +93,5 @@ object RuleUpColors {
val KakaoText = RuleUpPalette.KakaoLabel

val Google = RuleUpPalette.GoogleSurface
val GoogleBorder = RuleUpPalette.GoogleStroke
val GoogleText = RuleUpPalette.GoogleLabel
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
import com.ruleup.designsystem.singleClickable
import com.ruleup.designsystem.theme.RuleUpColors
import com.ruleup.designsystem.theme.RuleUpGradients
import com.ruleup.designsystem.theme.RuleUpTheme
import com.ruleup.onboarding.domain.auth.entity.OAuthProvider
import com.ruleup.onboarding.presentation.R
Expand Down Expand Up @@ -110,11 +106,16 @@ fun LoginContent(
Modifier
.size(80.dp)
.clip(RoundedCornerShape(22.dp))
.background(RuleUpGradients.Brand),
.background(Color.White)
.border(1.dp, RuleUpTheme.colors.border, RoundedCornerShape(22.dp)),
contentAlignment = Alignment.Center,
) {
// 브랜드 로크업.
Text("R", color = Color.White, fontSize = 40.sp, fontWeight = FontWeight.Bold)
// 스플래시·앱 아이콘과 같은 체크 링(시안 D).
Image(
painter = painterResource(com.ruleup.designsystem.R.drawable.ic_ruleup_mark),
contentDescription = "RuleUp",
modifier = Modifier.size(54.dp),
)
}
Column(
horizontalAlignment = Alignment.CenterHorizontally,
Expand Down Expand Up @@ -145,15 +146,6 @@ fun LoginContent(
onClick = { onIntent(LoginIntent.LoginClicked(OAuthProvider.GOOGLE)) },
)
}

Spacer(Modifier.height(4.dp))

Text(
"시작과 동시에 서비스 이용약관 및 개인정보 처리방침에 동의하게 됩니다",
color = RuleUpTheme.colors.textMuted,
style = RuleUpTheme.typography.caption,
textAlign = TextAlign.Center,
)
}
}
}
Expand Down Expand Up @@ -189,7 +181,6 @@ private fun GoogleLoginButton(onClick: () -> Unit) {
.aspectRatio(LOGIN_BUTTON_ASPECT_RATIO)
.clip(RuleUpTheme.shapes.medium)
.background(RuleUpColors.Google)
.border(1.dp, RuleUpColors.GoogleBorder, RuleUpTheme.shapes.medium)
.singleClickable(onClick = onClick)
.padding(horizontal = 12.dp),
horizontalArrangement = Arrangement.Center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,35 @@ fun PhotoContent(
)

Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) {
Box(
modifier =
Modifier
.size(140.dp)
.clip(RoundedCornerShape(70.dp))
.background(RuleUpGradients.Brand)
.border(5.dp, Color.White, RoundedCornerShape(70.dp)),
contentAlignment = Alignment.Center,
) {
if (imageUri.isNullOrEmpty()) {
Image(
painter = painterResource(com.ruleup.designsystem.R.drawable.ic_person),
contentDescription = null,
colorFilter = ColorFilter.tint(Color.White),
modifier = Modifier.size(61.dp),
)
} else {
val onImageSettled = rememberTtiLargeContent()
AsyncImage(
model = imageUri,
contentDescription = null,
contentScale = ContentScale.Crop,
onSuccess = { onImageSettled() },
onError = { onImageSettled() },
modifier = Modifier.matchParentSize().clip(RoundedCornerShape(70.dp)),
)
// 배지를 원 안에 두면 원형 클립에 모서리가 잘린다.
Box(modifier = Modifier.size(140.dp)) {
Box(
modifier =
Modifier
.matchParentSize()
.clip(RoundedCornerShape(70.dp))
.background(RuleUpGradients.Brand)
.border(5.dp, Color.White, RoundedCornerShape(70.dp)),
contentAlignment = Alignment.Center,
) {
if (imageUri.isNullOrEmpty()) {
Image(
painter = painterResource(com.ruleup.designsystem.R.drawable.ic_person),
contentDescription = null,
colorFilter = ColorFilter.tint(Color.White),
modifier = Modifier.size(61.dp),
)
} else {
val onImageSettled = rememberTtiLargeContent()
AsyncImage(
model = imageUri,
contentDescription = null,
contentScale = ContentScale.Crop,
onSuccess = { onImageSettled() },
onError = { onImageSettled() },
modifier = Modifier.matchParentSize().clip(RoundedCornerShape(70.dp)),
)
}
}

Box(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import com.ruleup.domain.entity.user.AgreementType
import com.ruleup.onboarding.domain.logging.OnboardingStep
import com.ruleup.onboarding.domain.navigation.TermsDocumentPage
import com.ruleup.onboarding.presentation.component.OnboardingScaffold
import com.ruleup.onboarding.presentation.onboarding.component.InfoBox
import com.ruleup.onboarding.presentation.onboarding.component.OnboardingFlowPreview
import com.ruleup.onboarding.presentation.onboarding.component.RequirementBadge
import com.ruleup.onboarding.presentation.onboarding.component.RowDivider
Expand Down Expand Up @@ -102,13 +101,6 @@ fun TermsContent(
if (index != AgreementType.SIGNUP.lastIndex) RowDivider()
}
}

InfoBox(
background = RuleUpTheme.colors.brandSoft,
emoji = "📄",
text = "필수 항목에 동의해야 가입을 완료할 수 있어요. 선택 항목은 알림 설정 기본값이 돼요",
textColor = RuleUpTheme.colors.brandStrong,
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ class LoginContentTest {
assertEquals(listOf<LoginIntent>(LoginIntent.LoginClicked(OAuthProvider.GOOGLE)), intents)
}

@Test
fun `약관 동의가 시작과 함께 이뤄진다는 것을 알린다`() {
// 별도 동의 화면이 없으므로 여기서 말하지 않으면 사용자가 모른 채 동의하게 된다.
compose.renderOnboarding { LoginContent(onIntent = {}) }

compose.onNodeWithText("시작과 동시에 서비스 이용약관 및 개인정보 처리방침에 동의하게 됩니다").assertExists()
}

@Test
fun `버튼을 누르기 전에는 아무 의도도 올라가지 않는다`() {
val intents = mutableListOf<LoginIntent>()
Expand Down
Loading