-
Couldn't load subscription status.
- Fork 1
[#338] 다이얼로그 업데이트 및 하단바 세팅 #342
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
Summary of ChangesHello @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은 사용자에게 제공되는 피드백 시스템을 표준화하고, 앱 전반의 UI 일관성을 강화하며, 개발 효율성을 높이는 데 중점을 둡니다. 새로운 토스트 및 다이얼로그 컴포넌트를 도입하여 사용자 경험을 개선하고, 닉네임 유효성 검사 로직을 시각적으로 명확하게 만들었습니다. 또한, 탭바 가시성 제어 기능을 추가하고 디버그 환경에서의 불필요한 네트워크 요청을 제거하여 개발 워크플로우를 최적화했습니다. Highlights
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. 코드의 흐름, UI의 미학, 토스트 톡, 다이얼로그 짠, 사용자 경험, 빛나는 별, 개발자의 땀, 앱에 스며드네. 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
이번 PR은 다이얼로그와 토스트 메시지를 표준화하고, 탭바 숨김 기능을 개선하는 등 앱 전반의 UI/UX 일관성과 코드 품질을 크게 향상시켰습니다. 특히 BaseViewController에 showToast, showCustomDialog를 추가하여 공통으로 사용하게 한 점과 키보드 높이에 따른 버튼 위치를 constraint 기반으로 조정한 점은 매우 좋은 개선입니다.
다만, 몇 가지 아쉬운 점이 있어 리뷰에 의견을 남겼습니다. CustomTabBarContainerController에서 뷰 컨트롤러 컨테인먼트 처리에 대한 수정이 필요해 보이며, SetNickNameViewController의 UI 로직을 View로 옮겨 역할 분리를 더 명확하게 하면 좋겠습니다. 전반적으로 코드베이스를 깔끔하고 유지보수하기 좋게 만드는 좋은 변경이라고 생각합니다.
| private func switchToViewController(at index: Int) { | ||
| let selectedVC = viewControllers[index] | ||
|
|
||
| // 기존 자식 뷰컨 정리 | ||
| children.forEach { child in | ||
| child.view.removeFromSuperview() | ||
| child.removeFromParent() | ||
| } | ||
|
|
||
| // 새로운 뷰컨 추가 | ||
| addChild(selectedVC) | ||
| view.insertSubview(selectedVC.view, belowSubview: tabBarView) | ||
| selectedVC.view.snp.makeConstraints { | ||
| $0.top.leading.trailing.equalToSuperview() | ||
| $0.bottom.equalTo(tabBarView.snp.top) | ||
| contentContainerView.subviews.forEach { $0.removeFromSuperview() } | ||
|
|
||
| let selectedNav = viewControllers[index] | ||
|
|
||
| contentContainerView.addSubview(selectedNav.view) | ||
| selectedNav.view.snp.makeConstraints { | ||
| $0.edges.equalToSuperview() | ||
| } | ||
| selectedVC.didMove(toParent: self) | ||
|
|
||
|
|
||
| tabBarView.setSelectedIndex(index) | ||
| currentIndex = index | ||
|
|
||
| // 현재 표시 중인 VC의 shouldHideTabBar 확인 | ||
| updateTabBarVisibility(for: selectedNav.topViewController) | ||
| } |
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.
switchToViewController(at:) 메서드에서 뷰 컨트롤러 컨테인먼트(View Controller Containment)가 올바르게 처리되지 않고 있습니다. addChild와 removeFromParent를 호출하지 않으면 뷰 컨트롤러의 생명주기 메서드가 예상대로 호출되지 않거나, Responder Chain에 문제가 발생하는 등 예기치 않은 동작이 발생할 수 있습니다. 뷰 컨트롤러를 자식으로 추가하고 제거하는 로직을 포함하도록 수정이 필요합니다.
private func switchToViewController(at index: Int) {
// 이전 뷰 컨트롤러 제거
if let previousVC = children.first {
previousVC.willMove(toParent: nil)
previousVC.view.removeFromSuperview()
previousVC.removeFromParent()
}
// 새 뷰 컨트롤러 추가
let selectedNav = viewControllers[index]
addChild(selectedNav)
contentContainerView.addSubview(selectedNav.view)
selectedNav.view.snp.makeConstraints {
$0.edges.equalToSuperview()
}
selectedNav.didMove(toParent: self)
tabBarView.setSelectedIndex(index)
currentIndex = index
// 현재 표시 중인 VC의 shouldHideTabBar 확인
updateTabBarVisibility(for: selectedNav.topViewController)
}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.
제미나이가 추구하는 방식은 정석 애플 공식 가이드를 준수함에 따라 리뷰를 달아 준 것 같습니다.
원래 존재하던 방식은 View Controller Containment라고 부모-자식 관계를 유지하는 구조였는데, 탭바를 더 유동적으로 처리하기 위해 Child 배열을 사용하지 않고 View만 스위칭 하는 방식으로 변경했습니다. 각 view의 vc 같은 경우는 delegate를 통해 연결해주었고 탭바도 더 간편하게 유지보수 할 수 있습니다.
EATSSU/App/Sources/Presentation/Auth/ViewController/SetNickNameViewController.swift
Outdated
Show resolved
Hide resolved
EATSSU/App/Sources/Presentation/Auth/ViewController/SetNickNameViewController.swift
Outdated
Show resolved
Hide resolved
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.
작성된 탭바 숨김 함수를 사용해서 리뷰v2에 새로 적용을 해야겠네요 고생하셨습니다
#️⃣ 관련 이슈
Resolved #338
💡작업 내용
1. 사용자 피드백 및 토스트 메시지 표준화
presentBottomAlert및 개별적인 토스트 메시지 호출을showToast라는 공통 메소드로 통합했습니다.LoginViewController와SetNickNameViewController에서info,success,warning,danger등 다양한 토스트 타입을 일관되게 관리하고, 사용자에게 일관된 피드백을 제공합니다.2. 닉네임 유효성 검사 및 UI 피드백 강화
3. UI 레이아웃 및 컴포넌트 일관성
4. 코드베이스 유지보수 및 개발 경험 개선
💬리뷰 요구사항(선택)
override var shouldHideTabBar: Bool { true }만 추가하면 해당 뷰는 하단 탭바가 없이 뷰가 뜹니다.