Skip to content

[feat]/#189 마이페이지 연동 및 드롭다운 오류 수정#192

Merged
KuKaH merged 3 commits intodevelopfrom
feat/#189-home-myPage
Mar 22, 2026
Merged

[feat]/#189 마이페이지 연동 및 드롭다운 오류 수정#192
KuKaH merged 3 commits intodevelopfrom
feat/#189-home-myPage

Conversation

@KuKaH
Copy link
Contributor

@KuKaH KuKaH commented Mar 22, 2026

✅ Check List

  • 팀원 전원의 Approve를 받은 후 머지해주세요.
  • 변경 사항은 500줄 이내로 유지해주세요.
  • Approve된 PR은 Assigner가 직접 머지해주세요.
  • 수정 요청이 있다면 반영 후 다시 push해주세요.

📌 Related Issue


📎 Work Description

  • 마이페이지 연동
  • 머지할 때 생긴 드롭다운 오류 수정

📷 Screenshots

기능/화면 iPhone 11 Pro iPhone 16 Pro
A 기능
B 기능

Simulator Screen Recording - iPhone 17 Pro - 2026-03-23 at 02 32 12

💬 To Reviewers

  • 리뷰어에게 전달하고 싶은 메시지를 남겨주세요.

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능
    • 홈 화면 네비게이션 바에 프로필 아이콘 추가
    • 프로필 아이콘 탭 시 마이페이지로 이동 가능
    • 마이페이지에서 뒤로가기 네비게이션 지원

@KuKaH KuKaH requested review from LJIN24 and Rudy-009 March 22, 2026 17:32
@KuKaH KuKaH self-assigned this Mar 22, 2026
@KuKaH KuKaH linked an issue Mar 22, 2026 that may be closed by this pull request
1 task
@coderabbitai
Copy link

coderabbitai bot commented Mar 22, 2026

📝 Walkthrough

Walkthrough

홈 화면의 프로필 아이콘 탭 시 마이페이지로 이동하는 네비게이션 흐름을 구현했습니다. HomeNavigationBarCell에 마이페이지 탭 콜백을 추가하고, HomeViewModel을 통해 네비게이션 신호를 처리하며, MyPageViewController로의 푸시 네비게이션을 추가했습니다. 또한 지역 드롭다운의 콜백 시그니처를 변경하여 CGRect 프레임 정보를 전달하도록 수정했습니다.

Changes

Cohort / File(s) Summary
Asset Catalog
SMASHING/Global/Resource/Assets.xcassets/Icons/ic_profile.imageset/Contents.json
프로필 아이콘을 위한 새로운 이미지 세트 선언 파일 추가 (1x/2x/3x 스케일 정의)
Home Navigation Bar UI
SMASHING/Presentation/Home/Cell/HomeNavigationBarCell.swift
마이페이지 탭 콜백 프로퍼티(onMyPageTapped) 및 프로필 아이콘 뷰 추가, 제스처 인식 및 레이아웃 제약 업데이트
Home Dropdown UI
SMASHING/Presentation/Home/HomeDropDownView.swift
지역 버튼 탭 콜백 시그니처 변경 (onRegionButtonTapped), 지역 스택뷰 프레임 정보를 CGRect로 전달하도록 수정
Home View Controller
SMASHING/Presentation/Home/HomeViewController.swift
마이페이지 네비게이션 바인딩 추가, showMyPage() 메서드 구현, 홈 드롭다운 설정 리팩토링 및 지역 탭 핸들링 업데이트
Home ViewModel
SMASHING/Presentation/Home/HomeViewModel.swift
Input에 myPageTapped 케이스 추가, Output에 navToMyPage 퍼블리셔 추가, 입력 핸들링 로직 구현
MyPage Navigation
SMASHING/Presentation/MyPage/MyPageViewController.swift
왼쪽 버튼 액션에 네비게이션 팝 기능 추가

Sequence Diagram

sequenceDiagram
    participant User
    participant HomeNavigationBarCell
    participant HomeViewController
    participant HomeViewModel
    participant NavigationManager
    participant MyPageViewController

    User->>HomeNavigationBarCell: Tap Profile Icon
    HomeNavigationBarCell->>HomeNavigationBarCell: myPageTapped()
    HomeNavigationBarCell->>HomeViewController: onMyPageTapped()
    HomeViewController->>HomeViewModel: Send .myPageTapped Input
    HomeViewModel->>HomeViewModel: handleInput(.myPageTapped)
    HomeViewModel->>HomeViewController: Emit navToMyPage
    HomeViewController->>HomeViewController: showMyPage()
    HomeViewController->>NavigationManager: push(MyPageViewController)
    NavigationManager->>MyPageViewController: Present
    MyPageViewController-->>User: Show MyPage Screen
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • Rudy-009
  • LJIN24
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 마이페이지 연동 및 드롭다운 오류 수정이라는 핵심 변경사항을 명확하게 요약하고 있으며, 관련 이슈 번호 #189도 포함하고 있습니다.
Description check ✅ Passed PR 설명은 템플릿의 주요 섹션(Related Issue, Work Description, Screenshots, To Reviewers)을 포함하고 있으나, Work Description이 다소 간단하고 'To Reviewers' 섹션이 채워지지 않았습니다.
Linked Issues check ✅ Passed PR의 코드 변경사항들은 #189의 목표인 홈-마이페이지 연동을 구현하고 있으며, 마이페이지 아이콘 추가, 네비게이션 연결, 그리고 드롭다운 오류 수정이 모두 포함되어 있습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 홈-마이페이지 연동 및 관련된 드롭다운 오류 수정의 범위 내에 있으며, 범위를 벗어난 변경사항은 없습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#189-home-myPage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@SMASHING/Global/Resource/Assets.xcassets/Icons/ic_profile.imageset/Contents.json`:
- Around line 4-15: 현재 ic_profile.imageset에 1x만 등록되어 있어 iPhone의 2x/3x에서 업스케일링으로
아이콘이 흐려집니다; ic_profile.png(현재 1x)와 동일한 아트워크의 2x, 3x 래스터 PNG 파일을 각각 추가하거나 벡터
PDF(또는 애셋에 벡터 옵션 활성화된 PDF)를 등록하여 Contents.json의 항목에 "filename" 속성으로 2x/3x(예:
ic_profile@2x.png, ic_profile@3x.png 또는 ic_profile.pdf)를 추가하고 idiom/scale 항목을 맞춰
업데이트하세요.

In `@SMASHING/Presentation/Home/Cell/HomeNavigationBarCell.swift`:
- Around line 68-71: Replace the UIImageView myPageImage in
HomeNavigationBarCell with a UIButton (e.g., myPageButton) so the control is
semantically a tappable element, set its image to .icProfile, preserve
contentMode/adjust imageView if needed, and ensure the touch target meets the
44x44 minimum (use contentEdgeInsets or constraints to enforce at least 44x44).
Also make the control accessible (set accessibilityLabel and
isAccessibilityElement = true) and continue using the existing tap gesture
handler by moving its target/action to the new UIButton.

In `@SMASHING/Presentation/Home/HomeViewController.swift`:
- Around line 602-604: When latestMyProfile is nil you must explicitly reset the
dropdown state instead of doing nothing; update the conditional around
latestMyProfile where you call dd.configure(profile: profile, myRegion:
myRegion) so that the else branch clears the selection and sets the current
region/empty state (e.g. call dd.configure(profile: nil, myRegion: myRegion) or
a dedicated dd.reset/clear method) to ensure default texts like "양천구"/"Sliver
III" are not reused, and apply the same change at the other occurrence
referenced (the block around lines 642-644).
- Around line 617-623: 현재 dd.onSportsCellTapped 클로저의 빈 종목 분기에서 바로
self.input.send(.addSportsTapped)만 호출해 홈 드롭다운과 dimView가 열린 채로 푸시되므로, 빈 종목을 탭할 때는
푸시 전에 드롭다운과 dimView를 닫아야 합니다; dd.onSportsCellTapped 내부(빈 종목 분기)에서 navigation 호출
전에 드롭다운을 닫는 로직을 추가하세요(예: dd.dismissDropdown(), dd.hideDimView(), 또는
HomeViewController의 드롭다운/디밍을 닫는 기존 메서드 호출) 후에 self.input.send(.addSportsTapped)를
호출하도록 변경하고 다른 분기(myProfileInput.send(.sportsCellTapped(sport)))는 그대로 유지하세요.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7eb034b9-9cd0-4511-8748-a5fbb2c5aaa9

📥 Commits

Reviewing files that changed from the base of the PR and between 4dff622 and 28a40aa.

⛔ Files ignored due to path filters (1)
  • SMASHING/Global/Resource/Assets.xcassets/Icons/ic_profile.imageset/ic_profile.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • SMASHING/Global/Resource/Assets.xcassets/Icons/ic_profile.imageset/Contents.json
  • SMASHING/Presentation/Home/Cell/HomeNavigationBarCell.swift
  • SMASHING/Presentation/Home/HomeDropDownView.swift
  • SMASHING/Presentation/Home/HomeViewController.swift
  • SMASHING/Presentation/Home/HomeViewModel.swift
  • SMASHING/Presentation/MyPage/MyPageViewController.swift

Comment on lines +4 to +15
"filename" : "ic_profile.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

프로필 아이콘이 실기기에서 흐려질 수 있습니다.

지금 imageset에는 1x만 연결돼 있어서 2x/3x iPhone에서는 새 아이콘이 업스케일링됩니다. 최소한 2x/3x 자산을 같이 넣거나 벡터 PDF로 등록해 주세요.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@SMASHING/Global/Resource/Assets.xcassets/Icons/ic_profile.imageset/Contents.json`
around lines 4 - 15, 현재 ic_profile.imageset에 1x만 등록되어 있어 iPhone의 2x/3x에서 업스케일링으로
아이콘이 흐려집니다; ic_profile.png(현재 1x)와 동일한 아트워크의 2x, 3x 래스터 PNG 파일을 각각 추가하거나 벡터
PDF(또는 애셋에 벡터 옵션 활성화된 PDF)를 등록하여 Contents.json의 항목에 "filename" 속성으로 2x/3x(예:
ic_profile@2x.png, ic_profile@3x.png 또는 ic_profile.pdf)를 추가하고 idiom/scale 항목을 맞춰
업데이트하세요.

Comment on lines +68 to +71
private let myPageImage = UIImageView().then {
$0.image = .icProfile
$0.contentMode = .scaleAspectFit
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, find and examine the HomeNavigationBarCell.swift file
find . -name "HomeNavigationBarCell.swift" -type f

Repository: TEAM-SMASHING/SMASHING-iOS

Length of output: 131


🏁 Script executed:

# Get the full file to understand the implementation
cat -n ./SMASHING/Presentation/Home/Cell/HomeNavigationBarCell.swift

Repository: TEAM-SMASHING/SMASHING-iOS

Length of output: 6181


🏁 Script executed:

# Search for UIButton minimum touch target size recommendations in iOS documentation
# and verify current implementation details
rg "addGestureRecognizer|UIImageView|myPageImage|myPageButton" SMASHING/Presentation/Home/Cell/HomeNavigationBarCell.swift -A 3

Repository: TEAM-SMASHING/SMASHING-iOS

Length of output: 1983


마이페이지 아이콘을 접근성 기준에 맞춰 개선해야 합니다.

UIImageView에 제스처만 붙이고 24pt로 배치하면 버튼 역할이 명확하지 않고, 터치 영역도 iOS 권장 기준(44x44)보다 작아 접근성을 침해합니다. UIButton으로 변경하고 최소 44x44 터치 영역을 확보하세요.

수정 예시
-    private let myPageImage = UIImageView().then {
-        $0.image = .icProfile
-        $0.contentMode = .scaleAspectFit
-    }
+    private let myPageButton = UIButton(type: .custom).then {
+        $0.setImage(.icProfile, for: .normal)
+        $0.imageView?.contentMode = .scaleAspectFit
+        $0.accessibilityLabel = "마이페이지"
+        $0.accessibilityTraits = .button
+    }
...
-        addSubviews(regionStackView, sportsAndTierStackView, bellImage, myPageImage)
+        addSubviews(regionStackView, sportsAndTierStackView, bellImage, myPageButton)
...
-        let myPageTap = UITapGestureRecognizer(target: self, action: `#selector`(myPageTapped))
-        myPageImage.isUserInteractionEnabled = true
-        myPageImage.addGestureRecognizer(myPageTap)
+        myPageButton.addTarget(self, action: `#selector`(myPageTapped), for: .touchUpInside)
...
         bellImage.snp.makeConstraints {
             $0.centerY.equalToSuperview()
-            $0.trailing.equalTo(myPageImage.snp.leading).offset(-12)
+            $0.trailing.equalTo(myPageButton.snp.leading).offset(-12)
             $0.size.equalTo(24)
         }
         
-        myPageImage.snp.makeConstraints {
+        myPageButton.snp.makeConstraints {
             $0.centerY.equalToSuperview()
             $0.trailing.equalToSuperview()
-            $0.size.equalTo(24)
+            $0.size.equalTo(44)
         }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@SMASHING/Presentation/Home/Cell/HomeNavigationBarCell.swift` around lines 68
- 71, Replace the UIImageView myPageImage in HomeNavigationBarCell with a
UIButton (e.g., myPageButton) so the control is semantically a tappable element,
set its image to .icProfile, preserve contentMode/adjust imageView if needed,
and ensure the touch target meets the 44x44 minimum (use contentEdgeInsets or
constraints to enforce at least 44x44). Also make the control accessible (set
accessibilityLabel and isAccessibilityElement = true) and continue using the
existing tap gesture handler by moving its target/action to the new UIButton.

Comment on lines +602 to +604
if let profile = latestMyProfile {
dd.configure(profile: profile, myRegion: myRegion)
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

프로필이 없을 때 드롭다운 상태가 갱신되지 않습니다.

latestMyProfile == nil이면 여기서 아무 설정도 하지 않아서, 첫 표시에서는 기본 텍스트(양천구, Sliver III)가 남고 재오픈 시에는 이전 프로필 값이 그대로 재사용될 수 있습니다. nil 분기에서도 현재 지역과 empty state를 명시적으로 reset해 주세요.

Also applies to: 642-644

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@SMASHING/Presentation/Home/HomeViewController.swift` around lines 602 - 604,
When latestMyProfile is nil you must explicitly reset the dropdown state instead
of doing nothing; update the conditional around latestMyProfile where you call
dd.configure(profile: profile, myRegion: myRegion) so that the else branch
clears the selection and sets the current region/empty state (e.g. call
dd.configure(profile: nil, myRegion: myRegion) or a dedicated dd.reset/clear
method) to ensure default texts like "양천구"/"Sliver III" are not reused, and
apply the same change at the other occurrence referenced (the block around lines
642-644).

Comment on lines +617 to 623
dd.onSportsCellTapped = { [weak self] sport in
guard let self else { return }
if let sport {
self.myProfileInput.send(.sportsCellTapped(sport))
} else {
self.input.send(.addSportsTapped)
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

빈 종목 셀에서 Add Sports로 갈 때 드롭다운을 먼저 닫아주세요.

이 분기에서는 .addSportsTapped만 보내고 있어서 홈 드롭다운과 dimView가 열린 채로 화면이 push됩니다. 뒤로 돌아오면 오버레이가 그대로 남습니다.

예시 수정
             dd.onSportsCellTapped = { [weak self] sport in
                 guard let self else { return }
                 if let sport {
                     self.myProfileInput.send(.sportsCellTapped(sport))
                 } else {
+                    self.hideDropDown()
                     self.input.send(.addSportsTapped)
                 }
             }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@SMASHING/Presentation/Home/HomeViewController.swift` around lines 617 - 623,
현재 dd.onSportsCellTapped 클로저의 빈 종목 분기에서 바로 self.input.send(.addSportsTapped)만
호출해 홈 드롭다운과 dimView가 열린 채로 푸시되므로, 빈 종목을 탭할 때는 푸시 전에 드롭다운과 dimView를 닫아야 합니다;
dd.onSportsCellTapped 내부(빈 종목 분기)에서 navigation 호출 전에 드롭다운을 닫는 로직을 추가하세요(예:
dd.dismissDropdown(), dd.hideDimView(), 또는 HomeViewController의 드롭다운/디밍을 닫는 기존
메서드 호출) 후에 self.input.send(.addSportsTapped)를 호출하도록 변경하고 다른
분기(myProfileInput.send(.sportsCellTapped(sport)))는 그대로 유지하세요.

Copy link
Contributor

@LJIN24 LJIN24 left a comment

Choose a reason for hiding this comment

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

어완

@KuKaH KuKaH merged commit 40c88af into develop Mar 22, 2026
1 check passed
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] 홈 마이페이지 연결

3 participants