-
Notifications
You must be signed in to change notification settings - Fork 0
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
[mod] 둘러보기 추가 및 로그인 유도 바텀 시트 추가 #225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니둥 !!
android:layout_height="wrap_content" | ||
android:layout_marginStart="24dp" | ||
android:layout_marginTop="76dp" | ||
android:padding="5dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 상하 패딩은 4구 좌우는 5인 것 같습니다만?
android:layout_marginStart="24dp" | ||
android:layout_marginTop="76dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
android:layout_marginStart="24dp" | |
android:layout_marginTop="76dp" | |
android:layout_marginStart="24dp" | |
android:layout_marginTop="76dp" |
android:layout_marginStart="24dp" | |
android:layout_marginTop="76dp" | |
android:layout_marginStart="19dp" | |
android:layout_marginTop="44dp" |
인 것 같습니당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
계산 감사합니다 최공
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 모든 로그인 관련 바텀시트가 가운데 문구 (별사탕님 맞춤 건빵을 추천하려면, 별사탕님의 페이지를 만들려면 등등)만 다른 것 같은데 하나의 xml만 만들어놓고 타입으로 관리해도 좋을 듯 합니다요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 아이디어 감사합니다 🤍
android:id="@+id/tv_login_needed" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/spacing16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
24,,?
<LinearLayout | ||
android:id="@+id/layout_login_needed" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintEnd_toEndOf="@id/gl_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_start" | ||
app:layout_constraintTop_toBottomOf="@id/tv_login_needed"> | ||
|
||
<TextView | ||
android:id="@+id/tv_login" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/login_text_phrase" | ||
android:textAlignment="center" | ||
android:textAppearance="@style/TextAppearance.Title2" | ||
android:textColor="@color/main_2" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_need" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/login_need" | ||
android:textAlignment="center" | ||
android:textAppearance="@style/TextAppearance.Title2" | ||
android:textColor="@color/gray_500" /> | ||
</LinearLayout> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
체인 쓰면 굳이 Linear로 안 묶어도 될 것 같숨다 !!
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
가이드 라인 만들어둔 거 쓰면 좋을 듯 합니당 !
android:id="@+id/layout_start_with_email" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="24dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
18,,?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋ ㅜㅜ 지현아 고맙다
…CTED_MEMBER 로 저장
로그인 유도 바텀시트로 로그인 했을 경우에도 자동로그인이 되어야 함
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
일단 여기까지하고,,, 코드 보겠습니다.
binding.includeMyPageSpeechBubble.ivSpeechBubble.setBackgroundResource(R.drawable.background_left_speech_bubble) | ||
binding.tvMyPageAppVersion.text = getString(R.string.tv_my_page_app_version, APP_VERSION) | ||
} | ||
|
||
// 이렇게 함수를 만들어서 매번 호출하는게 좋은 것인지 | ||
// BakeryListFragment 처럼 버튼을 누를 때마다 해당 뷰의 context를 전달하는게 맞는지 고민 | ||
private fun getUserRole(): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 함수가 여기저기서 쓰이는데 외부로 빼서 사용하는것도 고려해보면 좋을 거 같습니당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이걸 그리고 함수가 아니라 변수로 받아서 전역적으로 (파일내에서) 쓰는 것도 좋을 거 같습니당. 아래서 똑같은 이유로 똑같은 함수를 계속 호출하는거 같네요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
함수 말고 변수로 ! 알겠습니다
@@ -26,6 +29,8 @@ class MainPurposeTypeFilterFragment : | |||
|
|||
private fun addListeners() { | |||
binding.layoutMainPurposeTypeFilterSkip.setOnClickListener { | |||
gpDataSource = GPDataSource(it.context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
건너띄기 전에 회원가입이 완료되면 unselected로 지정해줬기 때문에 여기서 다시 한번 지정해주지 않아도 될 거 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정확한 이유는 모르겠는데(다른 프래그먼트에서 로그인 로직을 타서 그런가..)여기서 설정을 해주지 않으면 회원가입까지는 되는데 건너띄기를 하면 NONE_MEMBER 로 넘어갑니다 ,,
@@ -30,6 +30,8 @@ class FilterSettingViewModel @Inject constructor( | |||
private val _selectedFilterState = | |||
MutableStateFlow<UiState<AmplitudeFilterSettingInfo>>(UiState.Loading) | |||
val selectedFilterState get() = _selectedFilterState.asStateFlow() | |||
private val _filterStatus = MutableStateFlow<Boolean?>(null) | |||
val filterStatus get() = _filterStatus.asStateFlow() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 어디에 쓰이나요>??
@@ -38,7 +43,11 @@ class DetailReviewAdapter( | |||
|
|||
binding.tvItemDetailReviewReport.setOnSingleClickListener { | |||
AmplitudeUtils.trackEvent(START_REVIEW_REPORT) | |||
moveToReport(detailReview.reviewId) | |||
gpDataSource = GPDataSource(it.context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 로직 어뎁터 외부로 뺄 수는 없을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
물론,,, 로컬디비를 프레젠테이션 레이어에서 계속 접근하고 있는 것부터 말이 안되지만,,,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나중에 클린 적용하면서 좀 더 고민해봐야 할 거 같네욤~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고민해보겠습니다 계속 저런식으로 호출하는게 ,, 찜찜
private fun collectData() { | ||
gpDataSource = GPDataSource(requireContext()) | ||
// 카카오 회원 가입, 로그인 | ||
authViewModel.authRoleType.flowWithLifecycle(lifecycle).onEach { role -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
라이프싸이클, 라이프싸이클스코프 수정해주세욤. 프래그먼트에 해당 사항있으면 보이는대로 수정해주십쇼~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 넵 알겠습니당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
authViewModel.authRoleType.flowWithLifecycle(lifecycle).onEach { role -> | |
authViewModel.authRoleType.flowWithLifecycle(viewLifecycleOwner.lifecycle).onEach { role -> |
이런식으로 수정해야하는게 맞나염..?..?
// 카카오 로그인인 경우 홈으로 이동 | ||
AuthRoleType.ROLE_MEMBER -> { | ||
AmplitudeUtils.trackEvent(SignActivity.LOGIN_APP) | ||
if (filterViewModel.filterStatus.value == true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 이거 때문이군여 이거도 동일하게 로그인 이후 홈에서 필터 선택 / 비선택 여부를 가져오고 있기 때문에(아마도?) 설정해주지 않아도 괜찮을겁니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기서도 마찬가지로 설정을 해주지 않으면 NONE_MEMEBER 로 넘어갑니다 ,,
|
||
@AndroidEntryPoint | ||
class LoginNeededDialog( | ||
private val loginNeededType: LoginNeededType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Android에서 프래그먼트를 사용할 때, 프래그먼트의 인스턴스를 생성할 때 직접 생성자에 파라미터를 전달하는 방식은 권장되지 않는걸로 알고 있습니다! 이는 구성 변경(예: 기기 회전)이 발생할 때 Android 시스템이 프래그먼트를 자동으로 재생성할 때, 생성자에 전달했던 파라미터가 유지되지 않는 문제 때문입니다~. 이를 해결하기 위해, 프래그먼트에 파라미터를 전달할 때는 newInstance 팩토리 메서드와 번들(Bundle)을 사용하는 것이 좋다고 알고 있습니다!
근데 저도 개념만 알고 적용해본적은 없어서 같이 해봐도 좋을 거 같네여 ~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헉 이게 권장되지 않는 방법이었군요,, 몰랐어요
이 부분 리팩할 때 같이 고민해보면 좋을 것 같습니당 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
짱짱 체고입니당 ~
|
||
@AndroidEntryPoint | ||
class LoginNeededDialog( | ||
private val loginNeededType: LoginNeededType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헉 이게 권장되지 않는 방법이었군요,, 몰랐어요
이 부분 리팩할 때 같이 고민해보면 좋을 것 같습니당 ~
private fun showLoginNeedDialogBookmark() { | ||
LoginNeededDialog(LoginNeededType.LOGIN_NEEDED_BOOKMARK).show( | ||
supportFragmentManager, | ||
"loginNeededDialog" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상수화 시켜주면 좋을 것 같숨당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 상수화 알겠습니당
# Conflicts: # app/src/main/java/com/sopt/geonppang/presentation/detail/DetailActivity.kt
…MBER 일때 마이페이지 진입 시 닉네임 별사탕으로 저장
# Conflicts: # app/src/main/java/com/sopt/geonppang/presentation/filterSetting/MainPurposeTypeFilterFragment.kt
Related issue 🛠
Work Description ✏️
Screenshot 📸
1. (회원 O / 자체 / 필터 유무 )▶️ (둘러보기) ▶️ (이메일로 로그인)
Screen_Recording_20240215_213836.mp4
2. (회원 X)▶️ (둘러보기) ▶️ (이메일로 회원가입)
Screen_Recording_20240215_214043.1.mp4
3. (회원 X)▶️ (둘러보기) ▶️ (카카오 회원가입)
Screen_Recording_20240215_214238.mp4
4. (회원 O / 카카오 / 필터 유무)▶️ (둘러보기) ▶️ (카카오로 로그인)
Screen_Recording_20240215_214302.mp4
5. 비회원이 건빵집리스트, 마이페이지 진입 시
Screen_recording_20240216_142209.mp4
6. 비회원 마이페이지 진입 시 닉네임 별사탕
Uncompleted Tasks 😅
To Reviewers 📢
비회원인지 확인하기 위해서 GPDataStore에서 userRole을 가져오는 작업을 하는데
매번 해당 뷰의 context를 넘기는 것이 좋은지 아니면 하나의 함수로 만들어서 해당 액티비티, 프래그먼트 자체의 클래스에서 매번 초기화해서 사용하는 것이 좋은지 잘 모르겠습니다.