-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 내정보 수정 > EditText 입력 오류 수정 #359
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
Conversation
Summary of ChangesHello @kangyuri1114, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 내 정보 수정 화면에서 닉네임 입력 시 발생하던 여러 UI/UX 문제를 해결합니다. 특히, EditText 입력과 ViewModel 상태 업데이트 간의 복잡한 상호작용으로 인해 발생하던 입력 루프 버그를 수정하여 사용자가 닉네임을 원활하게 수정할 수 있도록 개선했습니다. 또한, 닉네임 중복 확인 과정에서 기존 닉네임이 일시적으로 노출되는 시각적 결함을 제거하여 사용자 경험을 향상시켰습니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
내 정보 수정 화면의 EditText 입력 오류를 수정한 점이 좋습니다. 입력 루프 문제를 해결하기 위해 setText 호출을 조건부로 변경하고 커서 위치를 조정한 것은 올바른 접근입니다. 또한, 닉네임 중복 확인 시 즉시 UI 상태를 업데이트하여 사용자 경험을 개선한 점도 긍정적입니다.
다만, 코드의 유지보수성과 안정성을 높이기 위해 한 가지 제안 사항이 있습니다. UserInfoActivity에서 StateFlow를 여러 번 구독하는 부분을 하나로 통합하고, 클릭 리스너 내에서 새로운 구독을 시작하는 안티패턴을 리팩토링하는 것이 좋겠습니다. 자세한 내용은 코드 리뷰 코멘트를 참고해주세요.
| private fun setOnCheckNicknameClickListener() { | ||
| binding.btnCheckNickname.setOnClickListener { | ||
| private fun setOnCheckNicknameDuplicationClickListener() { | ||
| binding.btnCheckNicknameDuplication.setOnClickListener { |
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.
이 클릭 리스너 내에서 uiState를 구독하는 로직(110-126행)은 개선이 필요해 보입니다. 클릭할 때마다 새로운 collectLatest 코루틴을 시작하는 것은 안티패턴이며, 여러 구독으로 인해 비효율적이고 예측 불가능한 동작을 유발할 수 있습니다.
이 Activity에 이미 여러 uiState 구독이 존재하므로(onCreate, collectButtonEnableState, collectUIState), 모든 UI 업데이트를 처리하는 단일 구독으로 통합하는 것을 강력히 권장합니다.
닉네임 중복 확인 결과와 같은 일회성 이벤트를 처리하기 위해서는 ViewModel에서 SharedFlow를 사용하는 패턴을 고려해볼 수 있습니다. 이렇게 하면 UI 로직이 더 명확해지고 관리하기 쉬워집니다.
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.
이건 해당 액티비티에 uistate 도입 리팩토링 때 같이 수정하겠씁니다!
HI-JIN2
left a comment
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.
굿굿 빠른 대응 감사합니다🙏
| import android.widget.PopupWindow | ||
| import androidx.activity.viewModels | ||
| import androidx.core.content.ContextCompat | ||
| import androidx.core.widget.doAfterTextChanged |
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.
| viewModelScope.launch { | ||
| validateUserNameUseCase(inputNickname).onStart { | ||
| _uiState.update { it.copy(loading = true) } | ||
| _uiState.update { it.copy(loading = true, nickname = inputNickname) } |
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 안에 id 변경으로 인한 수정 말고는 이 수정이 다 인거죵?!
| if (binding.etChNickname.text.toString() != state.nickname) { | ||
| binding.etChNickname.setText(state.nickname) | ||
| binding.etChNickname.setSelection(state.nickname.length) // 커서 끝으로 이동 |
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.
@HI-JIN2
이 조건도 추가되었슴다!
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.
요기 그냥 it으로 하는게 어떨까용 다른데 보니까 그냥 it으로 냅둔 것 같아서욥
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.
수정했씀다

Summary
내정보 수정 > EditText 입력 오류 수정
Describe your changes
edittext.mp4
Issue
To reviewers
커밋 내역 중에 afterTextChanged 관련 로직이 잠깐 있는데, afterTextChanged 로 수정하려다가 현 로직은 onTextChanged 가 필요해 롤백 했습니다 ㅎㅎ,,
닉네임 수정 후 이전 화면인 마이페이지로 진입 시 바뀐 닉네임으로 바로 보이도록 수정해야합니다 -> 바로 작업할게요