-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: 검색 화면 정리 및 검색 상세 화면 구현 #46
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.
수고 많으셨습니다~
코멘트 참고해주시고, router에서 사라진 view의 router가 childRouters에 잡혀있는지 확인해주시면 감사하겠습니다
@@ -75,11 +78,11 @@ public struct MemeListView: View { | |||
|
|||
"https://images.unsplash.com/photo-1507146426996-ef05306b995a?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" ] | |||
|
|||
let memeDetailList = (0..<20) | |||
@State var memeDetailList = (0..<20) |
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.
20개로 한정된 이유가 있나요?
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.
@hryeong66 요거 그냥 테스트용으로 두신거죠?_?
크게 이유 없어보입니당~
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.
넵 요거는 테스트로 추가한거라 개수는 임의로 넣었습니답!
@Binding var memeDetailList: [MemeDetail] | ||
private let columns = Array( | ||
repeating: GridItem( | ||
.flexible(), | ||
spacing: 12, | ||
alignment: .center | ||
), count: 2 | ||
) |
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.
요거 gridItem으로 하고 grid 사용하면 두 column 사이에 공백이 생길텐데 그 부분은 추후에 처리하실 예정이실까요?
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.
@hryeong66 확인 부탁드려횹🙏
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.
@hryeong66 확인 부탁드려횹🙏
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.
public var headers: [String : String]? { | ||
return nil | ||
switch self { | ||
case .getSearchKeywordMemeList: | ||
return ["x-device-id": UserInfo.shared.deviceId] | ||
default: | ||
return nil | ||
} |
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.
요거 아마 networkmanager에서 직접 넣어주고 있을거에요
// func getMemeDetailView() -> some View { | ||
// return MemeDetailView( | ||
// viewModel: MemeDetailViewModel( | ||
// meme: .mock, | ||
// router: nil, | ||
// copyImageUseCase: CopyImageUseCaseImpl(), | ||
// postLikeUseCase: PostLikeUseCaseImpl() | ||
// ) | ||
// ) | ||
// } | ||
|
||
func getSearchResultView() -> some View { | ||
return SearchResultView( | ||
viewModel: SearchResultViewModel( | ||
keyword: "긁", | ||
router: nil, | ||
copyImageUseCase: CopyImageUseCaseImpl(), | ||
postLikeUseCase: PostLikeUseCaseImpl() | ||
searchKeywordUseCase: SearchKeywordUseCaseImpl( | ||
repository: MemeRepositoryImpl(networkservice: NetworkService()) | ||
), copyImageUseCase: CopyImageUseCaseImpl() | ||
) |
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.
주석 지워주세요~
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.
요거 밈 디테일 뷰 관련해서 찬수님이 만들어두신건데, PostLikeUseCaseImpl? 인가 없어서 빌드가 안돼서 주석해놨서욤
디테일 뷰 날려도 되나요?_? 아, 디펜던시 이슈인가?
이따 확인해보고 디펜던시 이슈면 원복하고 아니면 삭제해버릴게요??
public final class SearchResultRouter: Router, SearchResultRouting { | ||
|
||
// MARK: - Properties | ||
public var delegate: (any RouterDelegate)? | ||
public var navigationController: UINavigationController | ||
public var childRouters: [any Router] = [] | ||
|
||
let keyword: String | ||
|
||
// MARK: - Initializers | ||
|
||
public init(_ navigationController: UINavigationController, keyword: String) { | ||
navigationController.isNavigationBarHidden = true | ||
self.navigationController = navigationController | ||
self.keyword = keyword | ||
} | ||
|
||
// MARK: - Methods | ||
|
||
public func start() { | ||
let repository = MemeRepositoryImpl(networkservice: NetworkService()) | ||
|
||
self.pushView( | ||
SearchResultView(viewModel: SearchResultViewModel( | ||
keyword: keyword, | ||
router: self, | ||
searchKeywordUseCase: SearchKeywordUseCaseImpl(repository: repository), | ||
copyImageUseCase: CopyImageUseCaseImpl() | ||
)) | ||
) | ||
} | ||
|
||
public func showMemeDetail(memeDetail: MemeDetail) { | ||
let router = MemeDetailRouter(self.navigationController, meme: memeDetail) | ||
self.childRouters.append(router) | ||
router.start() | ||
} | ||
} |
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.
search -> searchResult 이후 pop해줬을 떄의 delegate 처리가 필요해보입니다.
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.
이고 뭐 말하는곤지 모르게쏘여..🥲 혹시 자세히 말해줄 수 있나영?
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.
고생하셨습니다~!
@@ -75,11 +78,11 @@ public struct MemeListView: View { | |||
|
|||
"https://images.unsplash.com/photo-1507146426996-ef05306b995a?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" ] | |||
|
|||
let memeDetailList = (0..<20) | |||
@State var memeDetailList = (0..<20) |
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.
넵 요거는 테스트로 추가한거라 개수는 임의로 넣었습니답!
@Binding var memeDetailList: [MemeDetail] | ||
private let columns = Array( | ||
repeating: GridItem( | ||
.flexible(), | ||
spacing: 12, | ||
alignment: .center | ||
), count: 2 | ||
) |
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.
memeClickHandler: { meme in | ||
viewModel.dispatch(type: .memeDetailTapped(meme: meme)) | ||
}, | ||
memeCopyHandler: { meme in | ||
viewModel.dispatch(type: .memeCopyTapped(meme: meme)) | ||
} | ||
) |
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.
오오 이렇게 쓰는게 더 좋네여 저도 이렇게 바꿔야겠어요👍👍
# Conflicts: # Projects/Core/PPACData/Sources/Endpoint/MemeEndpoint.swift
What is this PR? 🔍
이슈
설명
Screenshot 📸
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-07-18.at.03.31.00.mp4
To Reviewers 🙏
파일 많아서 죄송합니다🥹