Conversation
* 공통으로 사용할 화면 전환 로직 코디네이터 구현 * navigationStack 방식으로 구현
Peter1119
approved these changes
Aug 11, 2025
Collaborator
Peter1119
left a comment
There was a problem hiding this comment.
고생하셨습니다 ~! 리뷰 사항 한번 고려해주시고
수정사항도 수정 부탁드려요 ~!
Comment on lines
+8
to
+10
| import Combine | ||
| import SwiftUI | ||
|
|
Collaborator
There was a problem hiding this comment.
요건 중복되어 있어서 제거되는게 좋을 것 같아요 ~!
| case presentMain | ||
| case pop | ||
| case popToRoot | ||
| case presntDetail |
Collaborator
There was a problem hiding this comment.
여기 오타가 있어서 수정해야할 것 같습니다 ~!
Comment on lines
+32
to
+34
| case .presentMain: | ||
| path.append(IntroduceRoute(route: .introduceMain)) | ||
|
|
Collaborator
There was a problem hiding this comment.
이 앱은 페이지가 많지 않아서 크게 케이스가 많이 안생기겠지만
enum의 연관값으로 받아서 case .present(let path): path.append(IntroduceRoute(route: path))
이런식으로 확장에 열려있으면 어떨까 싶습니다 ~!
| // 팀소개 | ||
| case teamIntroduce | ||
| // 팀 블로그 | ||
| case temBlog |
Comment on lines
+19
to
+45
|
|
||
| // MARK: - 내부 전용 초기화 | ||
|
|
||
| /// 내부 Route 값을 기반으로 IntroduceRoute를 생성합니다. | ||
| /// | ||
| /// 외부에서는 직접 case를 생성하지 않고, 내부에서만 변환을 허용합니다. | ||
| /// | ||
| /// - Parameter route: 내부용 Route enum 값 | ||
| init(route: Route) { | ||
| switch route { | ||
| case .introduceMain: self = .introduceMain | ||
| case .teamAgreement : self = .teamAgreement | ||
| case .teamIntroduce: self = .teamIntroduce | ||
| case .temBlog: self = .temBlog | ||
| } | ||
| } | ||
|
|
||
| // MARK: - 내부 전용 라우트 Enum | ||
|
|
||
| /// 외부 접근은 가능하지만 직접 IntroduceRoute를 생성할 수 없도록 제어하기 위한 내부 enum입니다. | ||
| enum Route { | ||
| case introduceMain | ||
| case teamAgreement | ||
| case teamIntroduce | ||
| case temBlog | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
라우팅 구조와 접근 제어 고민이 좋은 것 같습니다!
다만 외부 접근해서 생성하는 것이 불가능 하게 하는 의도라고 하셨는데 실제로는 외부에서 생성도 가능하고
새로운 route가 추가되었을 경우 3곳에서 수정사항이 생길 수 있어 복잡도가 올라갈 것으로 예상됩니다
그래서 우선은 단순하게 enum 타입으로 생성하는 것이 어떨까요?
Contributor
Author
|
@Peter1119 , @minneee |
Collaborator
고생하셨습니다 ~! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ 작업 내용
📝 참고 사항
Key Changes 🔥 (주요 구현/변경 사항)
To Reviewers 🙏 (리뷰어에게 전달하고 싶은 말)