Skip to content

Commit

Permalink
[Merge] #218 -> develop
Browse files Browse the repository at this point in the history
[Fix/#218] 2nd my qa
  • Loading branch information
chattymin authored Aug 24, 2024
2 parents ec2cd86 + b74d998 commit 7b6f599
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.hankki.core.common.extension.bounceClick
import com.hankki.core.common.extension.noRippleClickable
import com.hankki.core.designsystem.theme.Gray800
import com.hankki.core.designsystem.theme.HankkijogboTheme
import com.hankki.core.designsystem.theme.Red500
import com.hankki.core.designsystem.theme.Red400
import com.hankki.core.designsystem.theme.Red500
import com.hankki.core.designsystem.theme.White

@Composable
Expand Down Expand Up @@ -101,7 +100,7 @@ fun HankkiMediumButton(
}
.clip(RoundedCornerShape(16.dp))
.background(backgroundColor)
.padding(vertical = 13.dp, horizontal = 38.dp)
.padding(vertical = 15.dp, horizontal = 36.dp)
) {
Text(
text = text,
Expand All @@ -118,6 +117,7 @@ fun HankkiButtonPreview() {
Column {
HankkiButton(text = "로그아웃", onClick = {})
HankkiTextButton(text = "돌아가기", onClick = {})
HankkiMediumButton(text = "확인", onClick = {})
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import com.hankki.core.designsystem.component.button.HankkiButton
import com.hankki.core.designsystem.component.button.HankkiMediumButton
import com.hankki.core.designsystem.theme.Gray500
import com.hankki.core.designsystem.theme.Gray900
import com.hankki.core.designsystem.theme.HankkiTheme
Expand Down Expand Up @@ -65,7 +65,7 @@ fun SingleButtonDialog(

Spacer(modifier = Modifier.height(16.dp))

HankkiButton(
HankkiMediumButton(
text = buttonTitle,
onClick = onConfirmation,
enabled = true,
Expand Down
20 changes: 10 additions & 10 deletions core/designsystem/src/main/res/drawable/ic_my_store.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
android:viewportWidth="45"
android:viewportHeight="45">
<path
android:fillColor="#FDDA86"
android:pathData="M12.046,16L32.954,16A2.046,2.046 0,0 1,35 18.046L35,32.954A2.046,2.046 0,0 1,32.954 35L12.046,35A2.046,2.046 0,0 1,10 32.954L10,18.046A2.046,2.046 0,0 1,12.046 16z" />
android:pathData="M10,18.046C10,16.916 10.916,16 12.046,16H32.954C34.084,16 35,16.916 35,18.046V30C35,32.761 32.761,35 30,35H15C12.239,35 10,32.761 10,30V18.046Z"
android:fillColor="#FDDA86"/>
<path
android:fillColor="#FEC06D"
android:pathData="M9,11.833C9,10.821 9.821,10 10.833,10H18V16.5C18,18.985 15.985,21 13.5,21C11.015,21 9,18.985 9,16.5V11.833Z" />
android:pathData="M9,14.827C9,12.161 11.161,10 13.827,10H18V16.5C18,18.985 15.985,21 13.5,21C11.015,21 9,18.985 9,16.5V14.827Z"
android:fillColor="#FEC06D"/>
<path
android:fillColor="#FEC06D"
android:pathData="M18,10H28V16C28,18.761 25.761,21 23,21C20.239,21 18,18.761 18,16V10Z" />
android:pathData="M18,10H28V16C28,18.761 25.761,21 23,21C20.239,21 18,18.761 18,16V10Z"
android:fillColor="#FEC06D"/>
<path
android:fillColor="#FEC06D"
android:pathData="M28,10H34.167C35.179,10 36,10.821 36,11.833V17C36,19.209 34.209,21 32,21C29.791,21 28,19.209 28,17V10Z" />
android:pathData="M28,10H31.173C33.839,10 36,12.161 36,14.827V17C36,19.209 34.209,21 32,21C29.791,21 28,19.209 28,17V10Z"
android:fillColor="#FEC06D"/>
<path
android:fillColor="#F3833B"
android:pathData="M19,29.5C19,27.567 20.567,26 22.5,26C24.433,26 26,27.567 26,29.5V35H19V29.5Z" />
android:pathData="M19,29.5C19,27.567 20.567,26 22.5,26C24.433,26 26,27.567 26,29.5V35H19V29.5Z"
android:fillColor="#F3833B"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fun MyJogboRoute(
navigateToNewJogbo: () -> Unit,
myJogboViewModel: MyJogboViewModel = hiltViewModel(),
) {
val myJogboState by myJogboViewModel.myJogboState.collectAsStateWithLifecycle()
val state by myJogboViewModel.myJogboState.collectAsStateWithLifecycle()

LaunchedEffect(true) {
myJogboViewModel.getMyJogboList()
Expand All @@ -62,18 +62,18 @@ fun MyJogboRoute(
navigateUp = navigateUp,
navigateToJogboDetail = navigateToJogboDetail,
navigateToNewJogbo = navigateToNewJogbo,
state = myJogboState.uiState,
editModeState = myJogboState.editModeState,
state = state.uiState,
editModeState = state.editModeState,
updateEditModeState = myJogboViewModel::updateEditModeState,
updateJogboSelectedState = myJogboViewModel::updateJogboSeleted,
resetEditModeState = myJogboViewModel::resetEditModeState,
deleteDialogState = myJogboState.dialogState,
deleteDialogState = state.dialogState,
updateDeleteDialogState = myJogboViewModel::updateDeleteDialogState,
deleteSelectedJogbo = myJogboViewModel::deleteSelectedJogbo
)

BackOnPressed(
editMode = myJogboState.editModeState,
editMode = state.editModeState,
resetJogboState = myJogboViewModel::resetEditModeState,
navigateUp = navigateUp,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fun MyJogboDetailRoute(
myJogboDetailViewModel: MyJogboDetailViewModel = hiltViewModel()
) {
val lifecycleOwner = LocalLifecycleOwner.current
val myJogboDetailState by myJogboDetailViewModel.myJogboDetailState.collectAsStateWithLifecycle()
val state by myJogboDetailViewModel.myJogboDetailState.collectAsStateWithLifecycle()

LaunchedEffect(true) {
myJogboDetailViewModel.getJogboDetail(favoriteId)
Expand All @@ -80,25 +80,16 @@ fun MyJogboDetailRoute(

MyJogboDetailScreen(
navigateUp = navigateUp,
jogboTitle = myJogboDetailState.myStoreItems.title,
jogboChips = myJogboDetailState.myStoreItems.chips.toPersistentList(),
state = myJogboDetailState.uiState,
deleteDialogState = myJogboDetailState.deleteDialogState,
shareDialogState = myJogboDetailState.shareDialogState,
userNickname = myJogboDetailState.userInformation.nickname,
updateShareDialogState = { myJogboDetailViewModel.updateShareDialogState(myJogboDetailState.shareDialogState) },
updateDeleteDialogState = {
myJogboDetailViewModel.updateDeleteDialogState(
myJogboDetailState.deleteDialogState
)
},
deleteSelectedStore = { storeId ->
myJogboDetailViewModel.deleteSelectedStore(
favoriteId,
storeId
)
},
selectedStoreId = myJogboDetailState.selectedStoreId,
jogboTitle = state.myStoreItems.title,
jogboChips = state.myStoreItems.chips.toPersistentList(),
state = state.uiState,
deleteDialogState = state.deleteDialogState,
shareDialogState = state.shareDialogState,
userNickname = state.userInformation.nickname,
updateShareDialogState = { myJogboDetailViewModel.updateShareDialogState(state.shareDialogState) },
updateDeleteDialogState = { myJogboDetailViewModel.updateDeleteDialogState(state.deleteDialogState) },
deleteSelectedStore = { storeId -> myJogboDetailViewModel.deleteSelectedStore(favoriteId, storeId) },
selectedStoreId = state.selectedStoreId,
updateSelectedStoreId = myJogboDetailViewModel::updateSelectedStoreId,
navigateToStoreDetail = myJogboDetailViewModel::navigateToStoreDetail,
navigateToHome = myJogboDetailViewModel::navigateToHome
Expand Down Expand Up @@ -195,7 +186,7 @@ fun MyJogboDetailScreen(
title = jogboTitle,
chips = jogboChips,
userNickname = userNickname,
shareJogbo = updateShareDialogState
shareJogboDialogState = updateShareDialogState
)

LazyColumn(
Expand Down Expand Up @@ -251,7 +242,7 @@ fun MyJogboDetailScreen(
title = jogboTitle,
chips = jogboChips,
userNickname = userNickname,
shareJogbo = updateShareDialogState
shareJogboDialogState = updateShareDialogState
)

EmptyViewWithButton(
Expand All @@ -276,5 +267,11 @@ fun MyJogboDetailScreen(
@Composable
fun MyJogboDetailScreenPreview() {
HankkijogboTheme {
MyJogboDetailRoute(
favoriteId = 1,
navigateUp = {},
navigateToDetail = {},
navigateToHome = {}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ 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.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyRow
Expand Down Expand Up @@ -37,7 +36,7 @@ fun JogboFolder(
title: String,
chips: PersistentList<String>,
userNickname: String,
shareJogbo: () -> Unit,
shareJogboDialogState: () -> Unit,
) {
Box(
modifier = Modifier
Expand All @@ -50,7 +49,9 @@ fun JogboFolder(
contentScale = ContentScale.FillWidth
)
) {
Column {
Column(
modifier = Modifier.matchParentSize()
) {
Image(
painter = painterResource(id = com.hankki.core.designsystem.R.drawable.ic_my_store),
contentDescription = "store image",
Expand Down Expand Up @@ -82,7 +83,7 @@ fun JogboFolder(
}
}

Spacer(modifier = Modifier.height(34.dp))
Spacer(modifier = Modifier.weight(1f))

Row(
modifier = Modifier
Expand All @@ -107,7 +108,7 @@ fun JogboFolder(
modifier = Modifier.padding(start = 8.dp)
)
}
JogboShareButton(showShareDialog = shareJogbo)
JogboShareButton(showShareDialog = shareJogboDialogState)
}
}
}
Expand All @@ -121,7 +122,7 @@ fun JogboFolderPreview() {
title = "족보 이름",
chips = persistentListOf("태그1","태그2"),
userNickname = "사용자 이름",
shareJogbo = {}
shareJogboDialogState = {}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fun MoveToHomeButton(
Text(
text = stringResource(R.string.go_to_store),
color = Gray500,
style = HankkiTheme.typography.body2,
style = HankkiTheme.typography.body3,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fun MyRoute(
myViewModel: MyViewModel = hiltViewModel(),
) {
val lifecycleOwner = LocalLifecycleOwner.current
val myState by myViewModel.myState.collectAsStateWithLifecycle()
val state by myViewModel.myState.collectAsStateWithLifecycle()
val context = LocalContext.current

LaunchedEffect(true) {
Expand Down Expand Up @@ -105,8 +105,8 @@ fun MyRoute(
paddingValues = paddingValues,
navigateToMyJogbo = navigateToJogbo,
navigateToMyStore = navigateToStore,
userName = myState.myModel.nickname,
showDialog = myState.dialogSate,
userName = state.myModel.nickname,
showDialog = state.dialogSate,
showWebView = myViewModel::showWebView,
updateDialog = myViewModel::updateDialogState,
onLogout = myViewModel::logout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fun MyStoreRoute(
myStoreViewModel: MyStoreViewModel = hiltViewModel(),
) {
val lifecycleOwner = LocalLifecycleOwner.current
val myStoreState by myStoreViewModel.myStoreState.collectAsStateWithLifecycle()
val state by myStoreViewModel.myStoreState.collectAsStateWithLifecycle()

LaunchedEffect(type) {
if (type == "like") {
Expand All @@ -72,7 +72,7 @@ fun MyStoreRoute(
MyStoreScreen(
navigateUp = navigateUp,
type = type,
state = myStoreState.uiState,
state = state.uiState,
updateStoreSelected = myStoreViewModel::updateStoreSelected,
navigateToStoreDetail = myStoreViewModel::navigateToStoreDetail,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fun NewJogboRoute(
navigateUp: () -> Unit,
newJogboViewModel: NewJogboViewModel = hiltViewModel()
) {
val newJogboState by newJogboViewModel.newJogboState.collectAsStateWithLifecycle()
val state by newJogboViewModel.newJogboState.collectAsStateWithLifecycle()
val lifecycleOwner = LocalLifecycleOwner.current

LaunchedEffect(newJogboViewModel.newJogboSideEffect, lifecycleOwner) {
Expand All @@ -52,7 +52,7 @@ fun NewJogboRoute(
when (sideEffect) {
is NewJogboSideEffect.NavigateToNewJogbo -> navigateUp()
is NewJogboSideEffect.ShowErrorDialog -> {
newJogboViewModel.updateErrorDialog(newJogboState.errorDialogState)
newJogboViewModel.updateErrorDialog(state.errorDialogState)
newJogboViewModel.resetTitle()
}
}
Expand All @@ -61,15 +61,15 @@ fun NewJogboRoute(

NewJogboScreen(
navigateUp = navigateUp,
title = newJogboState.title,
title = state.title,
onTitleChange = newJogboViewModel::setTitle,
tags = newJogboState.tags,
tags = state.tags,
onTagsChange = newJogboViewModel::setTags,
buttonEnabled = newJogboState.isButtonEnabled,
buttonEnabled = state.isButtonEnabled,
editTagsLength = newJogboViewModel::editTagsLength,
createNewJogbo = newJogboViewModel::createNewJogbo,
errorDialogState = newJogboState.errorDialogState,
updateErrorDialogState = { newJogboViewModel.updateErrorDialog(newJogboState.errorDialogState) }
errorDialogState = state.errorDialogState,
updateErrorDialogState = { newJogboViewModel.updateErrorDialog(state.errorDialogState) }
)
}

Expand Down

0 comments on commit 7b6f599

Please sign in to comment.