Skip to content

Conversation

@Hrepay
Copy link
Member

@Hrepay Hrepay commented Aug 28, 2025

#️⃣ 관련 이슈

Resolved #234

💡작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

  • 사용자 정보 모델 및 데이터 관리
    • 로컬 DB의 UserInfo 모델에 단과대학/학과 ID 및 이름(collegeId, collegeName 등)을 저장할 필드를 추가했습니다.
    • UserInfoManager에 위 정보를 업데이트하고 관리하는 로직을 구현하고, 오류 처리 기능을 개선했습니다.
  • 네트워크 및 API 연동
    • 단과대학 목록 조회, 학과 목록 조회, 사용자 소속 정보 업데이트를 위한 API 라우트(MyRouter, UserNicknameRouter 등)와 DTO(GetDepartmentResponse, LookupItemDTO 등)를 새로 추가하고 기존 모델을 수정했습니다.
  • 단과대학/학과 선택 UI 구현
    • 다른 곳에서도 재사용할 수 있도록 범용적인 DropDownView 컴포넌트를 새로 개발했습니다.
    • 이 컴포넌트는 API를 통해 받은 데이터를 목록으로 동적으로 보여주며, 사용자의 선택 사항을 콜백으로 전달합니다.
    • 기존 닉네임 설정 화면(SetNickNameView) 구조를 확장하여, 개발된 DropDownView를 통해 사용자가 직접 단과대학과 학과를 선택할 수 있도록 UI를 적용했습니다.

Simulator Screen Recording - iPhone 16 Pro - 2025-08-28 at 15 57 05
Simulator Screen Recording - iPhone 16 Pro - 2025-08-28 at 15 57 57

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

  • 추가/수정 코드가 많아서 미리 올립니다! 최대한 신경을 쓰긴했는데 오류 있거나 수정할 부분 있으시면 말씀부탁드립니다.
  • Appdelegate가 복잡해지는걸 좋아하지 않아서 코드 추가하기 싫었는데, realm 마이그레이션 관련해서 업데이트 처리를 안하면 기존 사용자들한테서 무조건 오류가 나서 어쩔 수 없이 추가했습니다.
  • 내정보 저장되는 시점은 기존과 동일하게 1.로그인 할 때 2. 내 정보에서 저장하기 눌렀을 때 입니다.
  • 제휴 지도에서 제휴 정보 뜨는 방식은 데이터가 많을 때도 테스트를 해봐야해서, Dev 디비에 데이터 추가요청해놨습니다.
  • 내 정보 페이지 기능 추가 + View에 있던 코드도 VC로 옮기면서 SetNickNameViewController가 좀 길어졌습니다. MARK로 최대한 깔끔하게 정리하긴했는데, 파일을 나누기에는 애매해서 정리만 해두었습니다.
  • 네이버맵 키 관련해서는 노션에 .xcconfig 파일 업데이트 해놓겠습니다.

Hrepay added 30 commits June 21, 2025 23:03
@Hrepay Hrepay requested review from CJiu01 and Funital August 28, 2025 07:04
@Hrepay Hrepay self-assigned this Aug 28, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a 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

  1. 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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 제휴 지도 기능 추가와 사용자 정보에 단과대/학과 정보를 추가하는 대규모 업데이트를 포함하고 있습니다. 전반적으로 기능 구현이 잘 이루어졌으며, 특히 새로운 커스텀 탭바와 드롭다운 컴포넌트 구현이 인상적입니다. 몇 가지 코드 중복 제거, 매직 넘버 제거, 사용자 피드백 개선 등 코드의 유지보수성과 사용자 경험을 향상시킬 수 있는 부분에 대해 피드백을 남겼습니다. 수정하면 더 완성도 높은 코드가 될 것 같습니다.

Comment on lines +35 to +41
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
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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)
    }

Copy link
Collaborator

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

999와 같은 매직 넘버를 태그로 사용하는 것은 코드의 가독성과 유지보수성을 저해할 수 있습니다. 이 버튼에 대한 참조를 별도의 프로퍼티로 관리하면 코드가 더 명확해지고 안전해집니다.

// 위치 계산
let origin = self.convert(self.bounds.origin, to: parentView)
tableView.snp.makeConstraints {
$0.top.equalTo(origin.y + 48 + 6)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

드롭다운 테이블의 y 위치를 계산할 때 하드코딩된 값 48을 사용하고 있습니다. 이 값은 버튼의 높이로 보입니다. self.bounds.height를 사용하여 동적으로 높이를 계산하면, 나중에 버튼 높이가 변경되더라도 코드를 수정할 필요가 없어 유지보수에 더 유리합니다.

Suggested change
$0.top.equalTo(origin.y + 48 + 6)
$0.top.equalTo(origin.y + self.bounds.height + 6)

Comment on lines 89 to 92
guard hasNicknameChanged || hasDepartmentChanged else {
print("변경된 정보가 없습니다.")
return
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

변경된 정보가 없거나 학과 정보가 유효하지 않을 경우, print 문으로만 처리하고 있어 사용자에게 아무런 피드백이 전달되지 않습니다. 사용자 경험을 위해 토스트 메시지나 Alert를 사용하여 현재 상태를 알려주는 것이 좋습니다.

if let location = manager.location?.coordinate {
let cameraUpdate = NMFCameraUpdate(
scrollTo: NMGLatLng(lat: location.latitude, lng: location.longitude),
zoomTo: 15.5

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

지도 확대 레벨 15.5가 여러 곳에서 사용되고 있습니다. 이 값을 상수로 추출하여 재사용하면 코드의 일관성을 유지하고 향후 수정이 용이해집니다. 예를 들어, private let defaultZoomLevel: Double = 15.5와 같이 클래스 프로퍼티로 선언하여 사용할 수 있습니다.

Comment on lines +35 to +41
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
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

중복 제거하려는 의도는 좋은데, 굳이 updateDepartment()로 나누지 않아도 괜찮을 것 같네요

@Hrepay Hrepay merged commit 98b8288 into develop Sep 2, 2025
@Hrepay Hrepay deleted the feat/#234 branch September 2, 2025 11:00
Hrepay added a commit that referenced this pull request Sep 16, 2025
Hrepay added a commit that referenced this pull request Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] [Map] v3.0.0 제휴지도 업데이트

3 participants