-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 문의하기 클릭 시 kakao channel로 연결 코드 SDK 코드로 수정 #448
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
base: develop
Are you sure you want to change the base?
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은 '문의하기' 기능을 카카오 SDK를 사용하여 재구현함으로써 사용자 경험을 향상시키는 것을 목표로 합니다. 기존의 웹뷰 기반 접근 방식 대신, 사용자가 카카오톡 채널에 직접 연결될 수 있도록 하여 더욱 통합적이고 편리한 문의 흐름을 제공합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
안녕하세요. 문의하기 기능을 기존 웹뷰 방식에서 카카오 SDK를 사용하도록 개선하는 PR 잘 보았습니다. 사용자 경험을 향상시키는 좋은 변경이라고 생각합니다.
코드 리뷰 결과, 몇 가지 개선점을 발견했습니다.
MyPageFragment.kt에서 카카오톡 채널 ID가 하드코딩되어 있어 상수로 추출하는 것을 제안했습니다.chatChannel함수의 콜백 로직이 잘못 구현되어, 카카오톡 앱 실행 성공 여부와 관계없이 항상 웹 브라우저가 열리는 버그가 발생할 수 있습니다. 이 부분을 수정하는 제안을 남겼습니다.
자세한 내용은 각 파일의 인라인 코멘트를 참고해주세요. 감사합니다.
| TalkApiClient.instance.chatChannel(context, channelPublicId) { | ||
| val url = TalkApiClient.instance.chatChannelUrl(channelPublicId) | ||
| KakaoCustomTabsClient.openWithDefault(context, url) | ||
| } |
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.
TalkApiClient.instance.chatChannel의 콜백 사용법이 올바르지 않습니다. 이 콜백은 카카오톡 앱 실행 시도 후 항상 호출되며, 실패 시 error 객체를 전달받습니다. 현재 코드는 실패 여부와 관계없이 항상 웹 브라우저를 열게 되어, 카카오톡 앱이 정상적으로 열린 후에도 불필요하게 웹페이지가 열리는 문제가 발생할 수 있습니다. error가 null이 아닐 때만 fallback 로직(웹 브라우저로 열기)이 실행되도록 수정해야 합니다. 또한, 에러 로깅을 추가하여 디버깅을 용이하게 하는 것이 좋습니다.
TalkApiClient.instance.chatChannel(context, channelPublicId) { error ->
if (error != null) {
Timber.d(error, "카카오톡 채널 채팅 열기 실패")
val url = TalkApiClient.instance.chatChannelUrl(channelPublicId)
KakaoCustomTabsClient.openWithDefault(context, url)
}
}| ScreenId.EXTERNAL_INQUIRE | ||
| ) | ||
| val context = requireContext() | ||
| val channelPublicId = "_ZlVAn" |
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.
채널 ID가 하드코딩되어 있습니다. 코드의 가독성과 유지보수성을 높이기 위해 companion object에 상수로 정의하는 것을 권장합니다. 예를 들어, MyPageFragment 클래스 내에 companion object { private const val KAKAO_TALK_CHANNEL_PUBLIC_ID = "_ZlVAn" }를 추가하고, 이 상수를 사용해주세요.
| val channelPublicId = "_ZlVAn" | |
| val channelPublicId = KAKAO_TALK_CHANNEL_PUBLIC_ID |
PeraSite
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.
진님께서 실제 폰에서 카카오톡 켜서 테스트만 해주시면 바로 머지해도 될 것 같습니당
Summary
기존 웹뷰 이동 방식에서
카카오 SDK를 통해
카카오톡 채널로 이동하는 공식 플로우를 사용하는 방식으로 수정
Describe your changes
Issue
To reviewers
제훈님이 올려주신 코드에서 추가작업이 필요한줄 알았는데, 지금 확인해보니 카카오앱 내 채널 화면으로 이동되도록 코드 잘 작성해주신 것 같아 바로 PR 올립니다.
다만 제훈님과 저는 안드로이드 기기로 카카오톡 앱 로그인이 불가능하여서 갤럭시 유저(진님)이 해당 브랜치에서 테스트를 해주셔야 할 것 같습니다 ㅜㅜ @HI-JIN2 진
만약 정상작동 테스트되면 머지하면 좋을 것 같습니다
val channelPublicId = "_ZlVAn"
여기서 채널 id는 우리 채널 웹 링크의 마지막 부분과 같아 해당 링크 정상 접속되고 있습니다 http://pf.kakao.com/_ZlVAn