-
Couldn't load subscription status.
- Fork 1
[#234] 제휴 지도 v3.0.0 업데이트 #310
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 @Hrepay, 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은 '제휴 지도 v3.0.0 업데이트'를 목표로, 앱의 핵심 기능을 대폭 확장하고 사용자 경험을 개선합니다. 주요 변경사항으로는 사용자 정보 모델에 단과대학 및 학과 필드를 추가하여 소속 정보를 관리하고, 이를 위한 새로운 API 연동 및 UI(드롭다운 컴포넌트)를 구현했습니다. 또한, 네이버 지도 SDK를 활용한 새로운 제휴 지도 기능을 도입하여 사용자가 주변 제휴 업체를 쉽게 찾을 수 있도록 했습니다. 앱의 전반적인 내비게이션 구조를 새로운 탭 바 시스템으로 재편하고, 마이페이지에서 사용자 정보 관리 접근성을 높이는 등 다양한 개선이 이루어졌습니다.
Highlights
- 사용자 소속 정보 모델 및 관리 개선: 사용자 정보 모델(UserInfo)에 단과대학 및 학과 ID와 이름을 저장할 수 있는 필드를 추가하고, 이를 관리하는 로직을 UserInfoManager에 구현했습니다. 이는 사용자 소속 정보를 앱 내에서 효율적으로 관리하기 위함입니다.
- 네트워크 및 API 연동 확장: 단과대학 및 학과 목록 조회, 사용자 소속 정보 업데이트, 제휴 정보 조회 등을 위한 새로운 API 라우트와 DTO를 추가 및 수정했습니다. 이를 통해 서버와의 데이터 연동이 확장되었습니다.
- 단과대학/학과 선택 UI 구현 및 통합: 재사용 가능한 범용 드롭다운 UI 컴포넌트(DropDownView)를 개발하고, 이를 닉네임 설정 화면(SetNickNameView)에 통합하여 사용자가 직접 단과대학과 학과를 선택할 수 있도록 UI를 개선했습니다.
- 새로운 탭 바 내비게이션 시스템 도입: 새로운 탭 바 구조(CustomTabBarContainerController, CustomTabBarView)를 도입하여 앱의 전반적인 내비게이션 흐름을 재구성했습니다. 이는 새로운 지도 기능 도입에 맞춰 사용자 경험을 개선하기 위함입니다.
- 제휴 지도 기능 신규 추가: 네이버 지도 SDK를 활용하여 제휴 지도 기능을 새로 추가했습니다. 이 기능은 사용자 위치 기반으로 주변 제휴 업체를 지도에 표시하고, 각 제휴 업체의 상세 정보를 확인할 수 있도록 합니다.
- Realm 데이터베이스 마이그레이션 처리: Realm 데이터베이스의 UserInfo 모델 변경사항에 대한 마이그레이션 로직을 AppDelegate에 추가하여, 기존 사용자 데이터의 호환성을 유지하도록 했습니다.
- 마이페이지 '내 정보' 섹션 추가 및 연동: 마이페이지에 '내 정보' 섹션을 추가하고, 해당 섹션을 통해 닉네임 및 학과 정보를 설정할 수 있는 화면으로 이동하도록 연결했습니다. 이는 사용자 정보 관리의 접근성을 높입니다.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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
이번 PR은 제휴 지도 기능 추가와 사용자 정보에 단과대/학과 정보를 추가하는 대규모 업데이트를 포함하고 있습니다. 전반적으로 기능 구현이 잘 이루어졌으며, 특히 새로운 커스텀 탭바와 드롭다운 컴포넌트 구현이 인상적입니다. 몇 가지 코드 중복 제거, 매직 넘버 제거, 사용자 피드백 개선 등 코드의 유지보수성과 사용자 경험을 향상시킬 수 있는 부분에 대해 피드백을 남겼습니다. 수정하면 더 완성도 높은 코드가 될 것 같습니다.
| func updateUserInfo(nickname: String, collegeId: Int?, collegeName: String?, departmentId: Int?, departmentName: String?) { | ||
| self.nickname = nickname | ||
| self.collegeId = collegeId | ||
| self.collegeName = collegeName | ||
| self.departmentId = departmentId | ||
| self.departmentName = departmentName | ||
| } |
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.
updateUserInfo 메서드와 updateDepartment 메서드 간에 중복되는 코드가 있습니다. 코드 재사용성을 높이고 중복을 줄이기 위해 updateUserInfo 내부에서 updateDepartment를 호출하는 방식으로 리팩토링하는 것을 제안합니다.
func updateUserInfo(nickname: String, collegeId: Int?, collegeName: String?, departmentId: Int?, departmentName: String?) {
self.nickname = nickname
updateDepartment(collegeId: collegeId, collegeName: collegeName, departmentId: departmentId, departmentName: departmentName)
}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.
중복 제거하려는 의도는 좋은데, 굳이 updateDepartment()로 나누지 않아도 괜찮을 것 같네요
| backgroundButton.backgroundColor = .clear | ||
| backgroundButton.frame = parentView.bounds | ||
| backgroundButton.addTarget(self, action: #selector(dismissDropdown), for: .touchUpInside) | ||
| backgroundButton.tag = 999 |
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.
| // 위치 계산 | ||
| let origin = self.convert(self.bounds.origin, to: parentView) | ||
| tableView.snp.makeConstraints { | ||
| $0.top.equalTo(origin.y + 48 + 6) |
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.
| guard hasNicknameChanged || hasDepartmentChanged else { | ||
| print("변경된 정보가 없습니다.") | ||
| return | ||
| } |
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.
| if let location = manager.location?.coordinate { | ||
| let cameraUpdate = NMFCameraUpdate( | ||
| scrollTo: NMGLatLng(lat: location.latitude, lng: location.longitude), | ||
| zoomTo: 15.5 |
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.
| func updateUserInfo(nickname: String, collegeId: Int?, collegeName: String?, departmentId: Int?, departmentName: String?) { | ||
| self.nickname = nickname | ||
| self.collegeId = collegeId | ||
| self.collegeName = collegeName | ||
| self.departmentId = departmentId | ||
| self.departmentName = departmentName | ||
| } |
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.
중복 제거하려는 의도는 좋은데, 굳이 updateDepartment()로 나누지 않아도 괜찮을 것 같네요
#️⃣ 관련 이슈
Resolved #234
💡작업 내용
collegeId,collegeName등)을 저장할 필드를 추가했습니다.UserInfoManager에 위 정보를 업데이트하고 관리하는 로직을 구현하고, 오류 처리 기능을 개선했습니다.MyRouter,UserNicknameRouter등)와 DTO(GetDepartmentResponse,LookupItemDTO등)를 새로 추가하고 기존 모델을 수정했습니다.DropDownView컴포넌트를 새로 개발했습니다.SetNickNameView) 구조를 확장하여, 개발된DropDownView를 통해 사용자가 직접 단과대학과 학과를 선택할 수 있도록 UI를 적용했습니다.💬리뷰 요구사항(선택)
Appdelegate가 복잡해지는걸 좋아하지 않아서 코드 추가하기 싫었는데, realm 마이그레이션 관련해서 업데이트 처리를 안하면 기존 사용자들한테서 무조건 오류가 나서 어쩔 수 없이 추가했습니다.SetNickNameViewController가 좀 길어졌습니다. MARK로 최대한 깔끔하게 정리하긴했는데, 파일을 나누기에는 애매해서 정리만 해두었습니다..xcconfig파일 업데이트 해놓겠습니다.