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

feat: 7주차 필수 과제 구현 #12

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

feat: 7주차 필수 과제 구현 #12

wants to merge 9 commits into from

Conversation

wjdrjs00
Copy link
Contributor

Related issue 🛠

Work Description ✏️

  • mvvm -> mvi 마이그레이션

Screenshot 📸

week7.mp4

Uncompleted Tasks 😅

  • mvi 패턴 적용이 필수 과제여서 우선 구현했고, 이외 이전까지의 리뷰 반영하면서 변경이 필요한 부분들 차근차근 수정해서 커밋 올려보겠습니다!

To Reviewers 📢

  • mvi 패턴 처음 적용해봤는데 잘 적용했는지 확인 부탁드립니다!
  • 여러 글 참고해봤는데 진짜 사람마다 전부 다 달라서 제가 이해가능한 부분만 참고해서 구현해봤습니다!(세미나 자료가 젤 이해하기 좋았습니다 ㅎ)
  • 심화과제 도전하려고 Layout Inspector 사용했는데,, 리컴포지션,,ㅋㅋ 넘 많이 증가해서 다시 ui 구성하는 방법부터 배우고 오겠습니다,,

Copy link

@MinseoSONG MinseoSONG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7차 과제도 수고하셨습니다 !!

Comment on lines +16 to +19
data class OnUserNameChanged(val name: String) : Event()
data class OnUserPasswordChanged(val password: String) : Event()
data object TogglePasswordVisibility : Event()
data object OnSignInClick : Event()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네이밍하실 때 앞에 On은 왜 붙는걸까요 ?!

viewModel.clearSnackbarMessage()
}
}
LaunchedEffect(viewModel.uiSideEffect, lifecycleOwner) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit이 아닌 viewmodel.uiSideEffect를 쓰신 이유가 있을까요 ??

) {

val uiState by viewModel.uiState.collectAsStateWithLifecycle()
val lifecycleOwner = LocalLifecycleOwner.current

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오오 .. 이건 뭔지 설명해주실 수 있을까요 ?? lifecycle을 관리하는 또다른 방법인걸까유

Copy link

@Hyobeen-Park Hyobeen-Park left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MVI 적용 수고하셨습니다~~~

Comment on lines +8 to +10
fun isNotBlank(): Boolean =
name.isNotBlank() && password.isNotBlank() && hobby.isNotBlank()
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 validation 체크하는 부분 맞죠?!?? data class에서 구현하신 이유가 궁금해요!!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추가로 서버 명세에는 8글자 이하 글자제한도 있는데 Blank만 체크하시는 이유가 궁금합니다!

onSignInClick = {
viewModel.setEvent(SignInContract.Event.OnSignInClick)
},
onSignUpClick = navigationToSignUp,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onSignUpClick은 sideEffect를 사용하지 않고 바로 화면 전환을 해주었는데 따로 이유가 있으신건지 궁금합니다!

Comment on lines +27 to +28
private fun updateLogin(update: Login.() -> Login) =
setState { copy(login = login.update()) }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Login 네이밍을 수정해보는 것도 좋을 것 같아요! 저는 Login 이라는 이름을 처음 들었을 때는 모델보다는 함수가 더 먼저 떠올라서요!!

Copy link
Contributor

@jihyunniiii jihyunniiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

}
}

private fun updateLogin(update: Login.() -> Login) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

함수로 따로 분리하신 이유가 있는지 궁금해요!

private fun updateLogin(update: Login.() -> Login) =
setState { copy(login = login.update()) }

private fun togglePasswordVisibility() =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘두 ㅎ.ㅎ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: 7주차 필수 과제
4 participants