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

[Feature] LoginScreen UI 로직 구현 #22

Merged
merged 20 commits into from
Jan 29, 2024
Merged

[Feature] LoginScreen UI 로직 구현 #22

merged 20 commits into from
Jan 29, 2024

Conversation

jinuemong
Copy link
Collaborator

@jinuemong jinuemong commented Jan 27, 2024

설명

  • LoginScreen UI를 구체화 하였습니다.
  • 카카오 로그인 버튼을 svg 아이콘으로 추가하였습니다.
  • SampleComponent를 생성해서 임시 아이콘을 넣었습니다.
  • UseCase를 연결하고 기존 Sample Code(Screen,ViewModel)을 제거하였습니다.
  • [1/29 업데이트]
  • 에러처리 메시지 수정과 분기별 기능을 구현하였습니다.
  • isNew에 따른 기능 분기, navigation을 연결하였습니다.
  • onBoarding으로 진입 시 유저 데이터 전달 기능을 구현하였습니다.
  • 로그인 실패 모달을 추가하였습니다.
  • 네비게이션으로 유저 데이터 전달을 구현하였습니다.

참고

  • 디자인 쪽에서 제작 중인 아이콘이 있어서 임시로 SampleComponent로 넣어두었습니당
  • [1/29 업데이트]
  • 카카오 -> 로그인 api 테스트, 기능 구현하였습니다.
  • 로그인 실패 모달 추가
    Screenshot_20240129_125034

체크리스트

  • : 빌드 테스트를 진행하셨나요?
  • : 실제 기기에서 테스트를 진행하셨나요?

Copy link
Collaborator

@ajou4095 ajou4095 left a comment

Choose a reason for hiding this comment

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

화이팅~

import kotlinx.parcelize.Parcelize

@Parcelize
data class KakaoUserInformationModel(
Copy link
Collaborator

Choose a reason for hiding this comment

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

default value 여기 적으면 mapping 할 때 빠트리기 쉬워요 (경험담)

fontSize = 20.sp,
color = Color.White,
modifier = Modifier.align(Alignment.Center)
text = "서비스 이름",
Copy link
Collaborator

Choose a reason for hiding this comment

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

R.string 에 있어요

}

private fun loginKakao() = launch {
loginKakaoUseCase.invoke()
Copy link
Collaborator

Choose a reason for hiding this comment

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

invoke 생략가능

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

!!

// TODO : Implement Success Case
// TODO : Check user is New ?
// isNew True -> navigateToOnBoarding() + with kakaoUserInfoModel
// isNew False -> navigateToHome()
}

is LoginMainEvent.Login.Error -> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

에러에 모달 띄우기로 고고

카카오 로그인에 실패했다고 대충 적으면 될듯

Comment on lines 94 to 109
private fun submitError(error: Throwable) = launch {
_event.emit(LoginMainEvent.Login.Error(error))
_state.emit(LoginMainState.Init)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fail 이랑 Error 의 차이

Fail : 사용자의 잘못
Error : 사용자와 무관하게 오류

이부분 고려된거 맞을까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

! 사용자가 로그인을 취소한 경우를 빼먹었네요
고려하겠습니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

적용했습니더🙇‍♂️

Copy link
Collaborator

@ajou4095 ajou4095 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 NavHostController.sendKakaoUserModel(kakaoUserModel: KakaoUserInformationModel) {
currentBackStackEntry?.savedStateHandle?.apply {
set(
"kakaoUserModel",
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거는 LoginOnBoardingConstant 에 추가해서 연결해주세요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넹 밥먹고 수정할께요

@@ -101,6 +144,47 @@ fun LoginMainScreen(
}
}

@Composable
private fun SampleComponent() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 왜 Sample 이에요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

요거 디자인 수정 있을거라하셔서
일단 위치만 그려서 넣었습니다
디테일할 때 image로 넣으려구용

Copy link
Collaborator

@ajou4095 ajou4095 left a comment

Choose a reason for hiding this comment

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

ㄱㄱ

@jinuemong jinuemong merged commit 3bbf036 into main Jan 29, 2024
1 check passed
@jinuemong jinuemong deleted the feat-#22 branch January 29, 2024 12:31
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.

2 participants