-
Notifications
You must be signed in to change notification settings - Fork 0
[Chore] 닉네임이 "user-"로 시작하면 닉네임 설정화면으로 이동하게 수정 #353
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
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 of Changes
Hello @HI-JIN2, 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!
이 Pull Request는 사용자 경험 개선을 목표로, 기본 닉네임이 'user-'로 시작하는 사용자들에게 닉네임 변경을 유도하기 위한 기능을 추가합니다. 기존에는 시스템에서 자동으로 부여된 'user-xxxx' 형태의 닉네임이 있었으나, 이는 사용자에게 친숙하지 않고 서비스의 초기 문제 해결을 위한 임시 방편이었습니다. 이제 앱 시작 시 해당 닉네임을 가진 사용자는 자동으로 닉네임 설정 화면으로 이동하게 되어, 더 개인화되고 의미 있는 닉네임을 설정할 수 있도록 돕습니다.
Highlights
- 닉네임 강제 변경 로직 추가: 기본 닉네임이 'user-'로 시작하는 사용자에게 닉네임 설정 화면으로 이동하도록 강제하는 로직이 추가되었습니다.
- MainViewModel 업데이트: 앱 초기화 시 닉네임 유효성 검사를 수행하고, 'user-' 접두사 닉네임을 감지하는 조건문이 수정되었습니다.
Using Gemini Code Assist
The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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
안녕하세요. 닉네임이 'user-'로 시작하는 경우 닉네임 설정 화면으로 이동하도록 수정하는 PR 잘 보았습니다. 변경 사항은 의도한 대로 잘 동작할 것으로 보입니다. 코드의 유지보수성을 높이기 위해 한 가지 제안 사항을 남깁니다. 리뷰 확인 부탁드립니다.
| val nickname = userInfo.nickname | ||
|
|
||
| if (nickname.isNullOrBlank()) { | ||
| if (nickname.isNullOrBlank() || nickname.startsWith("user-")) { |
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.
하드코딩된 문자열 "user-"를 상수로 정의하여 사용하는 것을 권장합니다. 이렇게 하면 나중에 접두사가 변경될 경우 한 곳에서만 수정하면 되므로 유지보수성이 향상됩니다.
MainViewModel 클래스 내에 companion object를 추가하여 상수를 정의할 수 있습니다.
companion object {
private const val DEFAULT_NICKNAME_PREFIX = "user-"
}그런 다음 이 상수를 코드에서 사용하세요.
| if (nickname.isNullOrBlank() || nickname.startsWith("user-")) { | |
| if (nickname.isNullOrBlank() || nickname.startsWith(DEFAULT_NICKNAME_PREFIX)) { |
|
엇 그러면 엄청 초창기에 가입하고나서 닉넴을 바꾼적 없는 유저의 경우만 해당 조건문이 해당되는걸까요??? |
kangyuri1114
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
닉네임이 "user-"로 시작하면 닉네임 설정화면으로 이동하게 수정하였습니다.
To reviewers
잇슈 초창기에는 기본 닉네임이 없었습니다.
닉네임이 없는 상태에서 빈틈이 생겨 NPE이 빈번하게 일어났고, 이에 대한 대책으로 디폴트 닉네임을 "user-xxxx"와 같이 설정하게 되었습니다. 하지만 디폴트 닉네임이 너무 못생긴 관계로, "수영하는 원숭이" 와 같이 재치있는 이름으로 바꾸자는 이야기도 나왔으나, 백엔드 작업이 지연되고 있어 "user-"로 시작되는 닉네임의 경우 닉네임 변경을 강제하도록 조건문을 추가하였습니다.
EAT-SSU/Server#123