Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refctor/#148 qa design #149

Merged
merged 8 commits into from
Jan 1, 2025
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
Expand Up @@ -38,8 +38,8 @@ fun RecordyLocationBadge(
modifier = Modifier
.padding(
start = 8.dp,
top = 8.dp,
bottom = 8.dp,
top = 5.dp,
bottom = 5.dp,
end = 4.dp,
),
painter = painterResource(id = R.drawable.ic_cursor_16),
Expand All @@ -49,11 +49,15 @@ fun RecordyLocationBadge(
if (location != null) {
Text(
modifier = Modifier
.padding(end = 12.dp),
.padding(
top = 4.dp,
bottom = 4.dp,
end = 12.dp,
),
text = location,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = RecordyTheme.typography.caption1R,
style = RecordyTheme.typography.caption2M,
color = RecordyTheme.colors.white,
textAlign = TextAlign.Center,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fun TopNavigationBar(
title: String = "",
enableGradation: Boolean = false,
popBackStackEnable: Boolean = false,
showCloseButton: Boolean = false,
popBackStack: () -> Unit = {},
) {
Box(
Expand All @@ -50,6 +51,20 @@ fun TopNavigationBar(
},
)
}

if (showCloseButton) {
Icon(
ImageVector.vectorResource(id = com.record.designsystem.R.drawable.ic_cancelled_30),
contentDescription = "๋‹ซ๊ธฐ",
tint = RecordyTheme.colors.gray01,
modifier = Modifier
.align(Alignment.CenterStart)
.customClickable {
popBackStack()
},
)
}

Text(
modifier = Modifier.align(Alignment.Center),
text = title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ fun RecordyBasicTextField(
keyboardActions: KeyboardActions = KeyboardActions.Default,
visualTransformation: VisualTransformation = VisualTransformation.None,
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
highlightOnFocus: Boolean = true,
) {
val isFocused by interactionSource.collectIsFocusedAsState()

val borderLineColor = when {
isError -> Alert01
isFocused -> ViskitYellow500
isFocused && highlightOnFocus -> Color.Transparent
value.isEmpty() -> Color.Transparent
else -> Color.Transparent
}
Expand Down Expand Up @@ -166,12 +167,13 @@ fun RecordyBasicTextField2(
keyboardActions: KeyboardActions = KeyboardActions.Default,
visualTransformation: VisualTransformation = VisualTransformation.None,
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
highlightOnFocus: Boolean = true,
) {
val isFocused by interactionSource.collectIsFocusedAsState()

val borderLineColor = when {
isError -> Alert01
isFocused -> ViskitYellow500
isFocused && highlightOnFocus -> ViskitYellow500
value.isEmpty() -> Color.Transparent
else -> Color.Transparent
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -37,17 +38,29 @@ fun EmptyDataScreen(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier.fillMaxSize(),
) {
val messages = message.split("\n")
Text(
text = message,
text = messages.getOrNull(0) ?: "",
style = RecordyTheme.typography.title3SB,
color = RecordyTheme.colors.gray02,
textAlign = TextAlign.Center,
)
if (messages.size > 1) {
Spacer(modifier = Modifier.height(5.dp))
Text(
text = messages[1],
style = RecordyTheme.typography.title3SB,
color = RecordyTheme.colors.gray02,
textAlign = TextAlign.Center,
)
}

Spacer(modifier = Modifier.height(24.dp))
if (showButton) {
BasicButton(
modifier = Modifier
.height(44.dp),
.height(44.dp)
.wrapContentWidth(),
text = "์˜์ƒ ์—…๋กœ๋“œํ•˜๊ธฐ",
textStyle = RecordyTheme.typography.body2B,
textColor = RecordyTheme.colors.background,
Expand Down
6 changes: 4 additions & 2 deletions feature/login/src/main/java/com/record/login/LoginScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ fun SplashScreen(
painterResource(id = R.drawable.img_viskit_logo),
null,
modifier = Modifier
.fillMaxWidth(0.3f)
.fillMaxWidth()
.padding(horizontal = 80.dp)
.aspectRatio(1f)
.alpha(alpha),

Expand Down Expand Up @@ -199,7 +200,8 @@ fun LoginScreen(
painterResource(id = R.drawable.img_viskit_logo),
null,
modifier = Modifier
.fillMaxWidth(0.28f)
.fillMaxWidth()
.padding(horizontal = 80.dp)
.aspectRatio(1f),
)
Spacer(modifier = Modifier.height(36.dp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class SignUpViewModel @Inject constructor(
companion object {
val NICKNAME_PATTERN = Regex("^[๊ฐ€-ํžฃใ…-ใ…ฃ0-9_]+$")
const val TITLE_POLICY_NAME = "์ด์šฉ์•ฝ๊ด€"
const val TITLE_NAMING_NAME = "๋‹‰๋„ค์ž„ ์„ค๋ช…"
const val TITLE_NAMING_NAME = "๋‹‰๋„ค์ž„ ์„ค์ •"
const val TITLE_SIGNUP_NAME = "ํšŒ์›๊ฐ€์ž… ์™„๋ฃŒ"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fun EmptyFollowerScreen() {
Row {
Spacer(modifier = Modifier.weight(13f))
Image(
painter = painterResource(com.record.designsystem.R.drawable.img_no_follower),
painter = painterResource(com.record.designsystem.R.drawable.img_viskit_noresult),
contentDescription = null,
modifier = Modifier
.weight(10f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ fun BookmarkScreen(
Text(
text = buildRecordCountText(recordCount),
style = RecordyTheme.typography.caption1R,
modifier = Modifier.padding(bottom = 6.dp),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ internal fun MainScreen(
popBackStack = navigator::popBackStackIfNotHome,
navigateToLogin = navigator::navigateLogin,
navigateToProfileEdit = navigator::navigateProfileEdit,
navigateToProfile = navigator::navigateProfile,
)

searchNavGraph(
Expand Down Expand Up @@ -220,8 +221,8 @@ private fun MainBottomNavigationBar(
) {
Column {
HorizontalDivider(
thickness = 1.dp,
color = RecordyTheme.colors.gray05,
thickness = 0.5.dp,
color = RecordyTheme.colors.gray06,
)
Row(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ fun VideoPickerScreen(
focusManager.clearFocus()
},
) {
TopNavigationBar(modifier = Modifier, title = "๋‚ด์šฉ ์ž‘์„ฑ", enableGradation = true)
TopNavigationBar(modifier = Modifier, title = "์˜์ƒ ์—…๋กœ๋“œ", showCloseButton = true, enableGradation = true)
Text(
text = "โ“˜ ์ฃผ์ œ์™€ ๋ฌด๊ด€ํ•œ ๊ธฐ๋ก์€ ๋ฌดํ†ต๋ณด๋กœ ์‚ญ์ œ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค",
color = RecordyTheme.colors.gray03,
Expand Down Expand Up @@ -314,6 +314,7 @@ fun VideoPickerScreen(
.padding(top = 24.dp)
.focusRequester(contentFocusRequester),
onValueChange = updateContentTextField,
highlightOnFocus = false,
)
RecordyImgButton(
modifier = Modifier.padding(16.dp),
Expand All @@ -335,6 +336,7 @@ fun VideoPickerScreen(
value = state.locationTextValue,
onValueChange = updateLocationTextField,
keyboardOptions = KeyboardOptions.Default.copy(imeAction = ImeAction.Done),
highlightOnFocus = false,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ fun ReportBottomSheet(
var inputValidation by remember { mutableStateOf(false) }
var textValue by remember { mutableStateOf("") }
var selectedReason by remember { mutableStateOf("") }

LaunchedEffectWithLifecycle {
if (isShowBottomSheet) {
coroutineScope.launch {
Expand Down Expand Up @@ -254,19 +255,21 @@ fun ReportBottomSheet(
Text(
text = "์™„๋ฃŒ",
style = RecordyTheme.typography.subtitle,
color = RecordyTheme.colors.gray01,
color = if (inputValidation) RecordyTheme.colors.gray01 else RecordyTheme.colors.gray08,
modifier = Modifier
.align(Alignment.CenterEnd)
.customClickable {
val reasonEnum = ReportReason.fromReasonText(selectedReason)
onClickReport(id, reasonEnum.name, textValue)
coroutineScope.launch {
sheetState.hide()
}.invokeOnCompletion {
onDismiss()
currentState = BottomSheetNavigation.DEFAULT
textValue = ""
selectedReason = ""
if (inputValidation) {
val reasonEnum = ReportReason.fromReasonText(selectedReason)
onClickReport(id, reasonEnum.name, textValue)
coroutineScope.launch {
sheetState.hide()
}.invokeOnCompletion {
onDismiss()
currentState = BottomSheetNavigation.DEFAULT
textValue = ""
selectedReason = ""
}
}
}
.padding(vertical = 15.dp)
Expand All @@ -276,11 +279,7 @@ fun ReportBottomSheet(

ReportTextField(textValue = textValue, isValidate = inputValidation) {
textValue = it
if (it.isNotEmpty()) {
inputValidation = true
} else {
inputValidation = false
}
inputValidation = it.isNotEmpty()
}
}
}
Expand Down
Loading