-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] 프로필 수정, 회원 탈퇴 시 다이얼로그 추가 #42
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
- `EditorExitDialog`에서 직접 `AlertDialog`를 구현하던 방식에서 공용 다이얼로그 컴포저블인 `NearBasicDialog`를 사용하도록 변경했습니다.
- 친구 프로필 수정 화면에서 '수정 완료' 버튼을 클릭했을 때, 저장 여부를 묻는 확인 다이얼로그가 표시되도록 기능을 추가했습니다. - 다이얼로그에 사용될 문자열 리소스를 `strings.xml`에 추가했습니다.
- 회원 탈퇴 시 한 번 더 확인하는 `WithdrawConfirmDialog`를 추가했습니다. - '탈퇴하기' 버튼을 클릭하면 `WithdrawConfirmDialog`가 표시되도록 `WithdrawScreen`의 로직을 수정했습니다. - 다이얼로그에 사용될 문자열 리소스를 `strings.xml`에 추가했습니다.
- `FriendProfileEditorScreen`에서 사용하던 저장 확인 다이얼로그를 `SaveConfirmDialog` 컴포저블로 분리하여 재사용성을 높였습니다. - 기존 `NearBasicDialog`를 직접 사용하던 로직을 새로 생성된 `SaveConfirmDialog`로 대체했습니다.
Summary of ChangesHello @stopstone, 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은 애플리케이션 내 중요한 사용자 작업에 대한 확인 다이얼로그를 도입합니다. 특히, 친구 프로필 편집기에서 저장되지 않은 변경 사항이 있을 때 화면을 벗어나려고 할 때 NearBasicDialog를 표시하고, 편집 완료 시 확인 다이얼로그를 추가하여 사용자 경험을 향상시킵니다. 또한, 사용자가 계정 탈퇴를 진행하기 전에 되돌릴 수 없는 작업에 대한 명확한 프롬프트를 제공하기 위해 확인 다이얼로그가 표시됩니다. 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
프로필 수정 및 회원 탈퇴 플로우에 확인 다이얼로그를 추가하는 변경 사항을 확인했습니다. 전반적으로 기능 구현은 잘 되었으나, 새로 추가된 다이얼로그 컴포넌트의 재사용성과 코드 간결성을 높일 수 있는 부분을 발견하여 두 가지 개선점을 제안했습니다. 다이얼로그가 확인 버튼 클릭 시 스스로 닫히도록 로직을 수정하면, 호출하는 쪽의 코드가 더 깔끔해지고 다이얼로그 컴포넌트의 책임이 더 명확해질 것입니다.
| NearBasicDialog( | ||
| onDismiss = onDismissRequest, | ||
| body = stringResource(R.string.editor_save_confirm_content), | ||
| dismissButtonText = stringResource(R.string.editor_save_confirm_cancel), | ||
| confirmButtonText = stringResource(R.string.editor_save_confirm_save), | ||
| onDismissButtonClick = onDismissRequest, | ||
| onConfirmButtonClick = onConfirm, | ||
| ) |
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.
현재 onConfirm 콜백에서 다이얼로그를 닫는 로직까지 함께 처리하고 있습니다. 다이얼로그가 확인 동작 후 스스로 닫히도록 책임을 위임하면, 호출부의 코드가 더 간결해지고 컴포넌트의 재사용성이 높아집니다. onConfirmButtonClick 콜백 내에서 onConfirm() 실행 후 onDismissRequest()를 호출하도록 수정하는 것을 제안합니다. 이렇게 하면 FriendProfileEditorScreen에서 onConfirm = onSubmit과 같이 더 간단하게 사용할 수 있습니다.
NearBasicDialog(
onDismiss = onDismissRequest,
body = stringResource(R.string.editor_save_confirm_content),
dismissButtonText = stringResource(R.string.editor_save_confirm_cancel),
confirmButtonText = stringResource(R.string.editor_save_confirm_save),
onDismissButtonClick = onDismissRequest,
onConfirmButtonClick = {
onConfirm()
onDismissRequest()
},
)| NearOutlinedDialog( | ||
| onDismiss = onDismissRequest, | ||
| title = null, | ||
| body = stringResource(R.string.withdraw_confirm_content), | ||
| dismissButtonText = stringResource(R.string.withdraw_confirm_cancel), | ||
| confirmButtonText = stringResource(R.string.withdraw_confirm_withdraw), | ||
| onDismissButtonClick = onDismissRequest, | ||
| onConfirmButtonClick = onConfirm, | ||
| ) |
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.
현재 onConfirm 콜백에서 다이얼로그를 닫는 로직까지 함께 처리하고 있습니다. 다이얼로그가 확인 동작 후 스스로 닫히도록 책임을 위임하면, 호출부의 코드가 더 간결해지고 컴포넌트의 재사용성이 높아집니다. onConfirmButtonClick 콜백 내에서 onConfirm() 실행 후 onDismissRequest()를 호출하도록 수정하는 것을 제안합니다. 이렇게 하면 WithdrawScreen에서 onConfirm = onSubmitWithdrawRequest과 같이 더 간단하게 사용할 수 있습니다.
NearOutlinedDialog(
onDismiss = onDismissRequest,
title = null,
body = stringResource(R.string.withdraw_confirm_content),
dismissButtonText = stringResource(R.string.withdraw_confirm_cancel),
confirmButtonText = stringResource(R.string.withdraw_confirm_withdraw),
onDismissButtonClick = onDismissRequest,
onConfirmButtonClick = {
onConfirm()
onDismissRequest()
},
)
rhkrwngud445
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.
LGTM! 고생하셨습니다!
- 확인 버튼 클릭 시 `onConfirm`과 `onDismiss`가 호출되도록 수정하여, 다이얼로그가 자동으로 닫히도록 로직을 개선했습니다. - `NearBasicDialog`를 사용하는 모든 컴포저블에서 변경된 파라미터명을 적용하고, 중복되는 `onDismiss` 호출 로직을 제거했습니다.
- `NearOutlinedDialog`의 `onConfirm` 람다에서 `onDismiss`가 자동으로 호출되도록 수정했습니다. - 이에 따라 중복으로 호출되던 `onDismiss` 로직을 `WithdrawScreen`에서 제거했습니다.
작업 내용
확인 방법
feature/friendprofileeditor/dialog, FriendProfileEditorScreen
feature/myprofile/dialog, WithdrawScreen
에서 추가된 다이얼로그와 반영 코드를 확인하실 수 있습니다.
참고 사항
관련 이슈