-
Notifications
You must be signed in to change notification settings - Fork 0
[REFACTOR] 검색 화면 모듈화 #146
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
Merged
Merged
[REFACTOR] 검색 화면 모듈화 #146
Changes from all commits
Commits
Show all changes
144 commits
Select commit
Hold shift + click to select a range
8db3f9a
refactor/#131: 디자인시스템 모듈화
0Hooni 55e2f41
feat/#131: SearchFeature 모듈 추가
0Hooni 52dce12
feat/#131: 상단 검색바 View 구현
0Hooni caa5893
chore/#131: 관련 패키지 및 프레임워크 추가
0Hooni 38fa728
feat/#131: ViewController, Reactor 구현 및 초기화면 변경
0Hooni 94f4188
chore/#131: SearchFeatureDemo용 Provisioning 등록
0Hooni cbb41a0
feat/#131: 반복 사용될 팝업 그리드 뷰 compositionalLayout 구현
0Hooni a23bbf7
feat/#131: PopupCollectionViewCell 이식
0Hooni 7d3ca88
add/#131: 필요한 디자인 파일 추가
0Hooni e4a8652
fix/#131: HeaderSection layout 제거
0Hooni 62d35a6
refactor/#131: 접근제어자 수정
0Hooni f731e4f
feat/#131: DiffableDatasource 적용
0Hooni 519b187
feat/#131: 재사용되는 TagCollectionView 이식
0Hooni 6abccbf
refactor/#131: GridCell 로직 개선
0Hooni 9330680
refactor/#131: Inputable에 Hashable 채택
0Hooni b3fbe66
chore/#131: 프레임워크 embed 설정 수정
0Hooni e11325b
feat/#131: 팝업 검색 View 구현
0Hooni f0c651f
fix/#131: 팝업 검색 ViewController 수정
0Hooni e6f3f0e
remove/#131: 사용하지 않는 View 제거
0Hooni 6dfe683
refactor/#131: 레이아웃 수정
0Hooni be5d716
feat/#131: TagCollectionView 돚거
0Hooni a9adab4
feat/#131: TagCollectionView에 사용될 HeaderView 구현
0Hooni 2a056b3
refactor/#131: 불필요한 코드 제거
0Hooni 8929ecf
feat/#131: 필요한 의존성 등록 및 reactor 주입
0Hooni 24bfa12
chore/#131: 커스텀 폰트 디자인 시스템으로 이동
0Hooni 150585d
fix/#131: 디자인시스템이 폰트를 찾지 못하는 문제 해결
0Hooni d485a11
feat/#131: 팝업 스토어 검색 결과 데이터 바인딩
0Hooni 373f616
fix/#131: snapShot이 적용되지 않는 문제 해결
0Hooni 1d90d08
add/#131: 필요한 에셋 추가
0Hooni c185aef
feat/#131: 팝업 그리드 헤더 뷰 추가
0Hooni 03cf353
feat/#131: 팝업 검색 결과 헤더 추가
0Hooni cd9c91f
feat/#131: 카테고리 선택 모달 구현
0Hooni 6f8adc7
fix/#131: 검색화면 레이아웃 조정
0Hooni bd9310e
fix/#131: 카테고리 선택 화면 레이아웃 수정
0Hooni ffc349f
refactor/#131: 팝업 헤더 업데이트 방식 적용
0Hooni 058046c
refactor/#131: 네이밍 수정
0Hooni 7a2b465
feat/#131: 필터 선택 화면 구현
0Hooni 85752c8
feat/#131: 필터 옵션 선택 버튼 바인딩
0Hooni 3b698fe
feat/#131: 필터 옵션 기반 결과 변경 구현
0Hooni d9a51d2
feat/#131: 새로운 카테고리 API 반영
0Hooni 2519e09
feat/#131: 카테고리 선택화면에서 선택한 카테고리 반영되도록 수정
0Hooni 2eae6f1
fix/#131: 태그 사이사이 간격 조정
0Hooni 10641e7
fix/#131: 카테고리가 변경이 없다면 fetch를 실행하지 않도록 수정
0Hooni 24ff9bb
fix/#131: 카테고리가 변경이 없다면 fetch를 실행하지 않도록 수정
0Hooni f0599ac
Merge branch 'feat/#131-search-feature-module' of https://github.com/…
0Hooni 94c8618
feat/#131: 페이지네이션 구현
0Hooni 89a0627
fix/#131: 소소한 버그들 수정
0Hooni 4e001e5
feat/#131: 카테고리 지우기 버튼 기능 구현
0Hooni d37cd92
refactor/#131: 필터 선택 화면 이동 로직 단순화
0Hooni 1d0005c
fix/#131: 카테고리 태그 목록의 간격이 이상하던 문제 수정
0Hooni 61a77c1
fix/#131: 소소한 수정
0Hooni fac0c99
chore/#131: 주석 추가
0Hooni 284b024
refactor/#131: 폴더링 및 네이밍 개선
0Hooni b253af9
refactor/#131: 데이터소스 관리 개선
0Hooni 3f3d657
feat/#131: 검색을 위한 API 흐름 추가
0Hooni f49470f
refactor/#131: 유즈케이스 이름 개선
0Hooni c7e566b
fix/#131: 레이아웃 에러 수정
0Hooni e83fa26
refactor/#131: 리액터 개선
0Hooni 219e951
recator/#131: 카테고리 지우기 리액터 개선
0Hooni 9a02893
refactor/#131: 카테고리 present 리액터 흐름 개선
0Hooni 77c4291
refactor/#131: 리액터 개선
0Hooni aedac21
fix/#131: 페이지네이션이 종종 안되던 문제 수정
0Hooni 9b56f1d
refactor/#131: 리액터 흐름 개선
0Hooni d722253
refactor/#131: 흐름 개선 거의 마무리...?
0Hooni b206651
refactor/#131: 리액터 흐름 개선 완
0Hooni a30e02b
refactor/#131: 페이지네이션 오류 수정
0Hooni 25c1912
feat/#131: 최근 검색어 모두 삭제 기능 구현
0Hooni 6b457d2
refactor/#131: 삭제 기능 캡슐화
0Hooni 04fd431
fix/#131: 페이지네이션이 한번만 되는 문제 수정
0Hooni bc3e11b
refactor/#131: 네이밍 수정
0Hooni 03565ed
refactor/#131: 메서드 수정
0Hooni 34c79e5
feat/#131: 검색 기능 구현
0Hooni 32abac6
feat/#131: 텍스트필드 지우기 버튼 동작 구현
0Hooni 3110b6b
feat/#131: 외부 영역 터치시 동작 구현
0Hooni fa5ca67
refactor/#131: ViewController 코드정리
0Hooni 0000bee
refactor/#131: 네이밍 수정
0Hooni 30d89c0
refactor/#131: 검색한 상태에서 이전 화면으로 돌아가기 기능 구현
0Hooni 0e7a532
feat/#131: 최근 검색어 태그 삭제 기능 구현
0Hooni 63c427d
feat/#131: 최근 검색어 태그 터치시 액션 구현
0Hooni 2d2901a
fix/#131: tapGestureRecog가 cell의 터치를 가로채가는 문제 해결
0Hooni 7dd1de6
refactor/#131: 메서드 순서 조정
0Hooni 6a836b6
feat/#131: 검색 이후에 헤더가 다르게 뜨도록 수정
0Hooni d9ea5b7
feat/#131: 검색 결과가 없을때 보여줄 label 띄우기 구현
0Hooni 22225f6
fix/#131: 검색 결과가 없을때는 헤더를 지워지게 해줌
0Hooni 46217e4
refactor/#131: View로부터 레이아웃 관심사를 분리
0Hooni 1ed5563
fix/#131: 실기기 빌드 문제 해결
0Hooni 648af9b
refactor/#131: Int형으로 전환을 toDomain에서 잘 보이도록 수정함
0Hooni 081bccf
fix/#131: 디자인시스템 폰트로 적용되도록 수정
0Hooni 1d8aaa3
refactor/#131: 필터 선택 리액터 개선
0Hooni 1984486
refactor/#131: 카테고리 리액터 개선
0Hooni 2d7e31d
refactor/#131: 팝업 검색 리액터 좀 개선
0Hooni 2b5f0af
refactor/#131: 데이터에서만 구체적인 비트를 따르도록 수정
0Hooni 2d981ba
chore/#131: 폰트가 빠져있던 문제 해결
0Hooni e4991ab
chore/#131: 폰트를 디자인시스템으로 이동
0Hooni 11ac459
fix/#131: Int64 → Int 대응
0Hooni 8b6993b
Merge branch 'feat/#131-이쯤부터-다시복구-드가자' of https://github.com/PopPool/…
0Hooni c220a7d
refactor/#131: 팬 모달 자꾸 에러나서 일단 지움
0Hooni 4ad4acc
feat/#131: PanModal 대체품 생산
0Hooni 99652b6
refactor/#131: 필터 선택 커스텀 모달 적용 및 레이아웃 수정
0Hooni 4530ec9
refactor/#131: 카테고리 선택 커스텀 모달 적용 및 레이아웃 수정
0Hooni 4fb4617
refactor/#131: PPSearchBar 디자인시스템으로 이동
0Hooni 7eea641
refactor/#131: PopupGrid에 있던 Inputable 제거
0Hooni 743f3ec
refactor/#131: TagCollectionViewCell Input 객체 제거
0Hooni e44ca64
refactor/#131: SearchFeature에서 Inputable 모두 제거
0Hooni 64cf9e4
refactor/#131: View가 모델의 Case를 의존하지 않도록 수정
0Hooni 538431f
fix/#131: 필터가 바뀌면 무조건 저장 버튼이 뜨는 문제 해결
0Hooni 79424c0
refactor/#131: 리액터의 케이스 순서에 맞게 코드 위치 조정
0Hooni f436601
fix/#131: 레이아웃 검토 후 수정
0Hooni d8a8676
feat/#131: 코디네이터 모듈 생성
0Hooni 069bbfd
feat/#131: SearchFeature 화면 내부 전환을 코디네이터에게 전달
0Hooni 74b42eb
refactor/#131: 화면 전환을 위한 Coordinator를 search에 적용
0Hooni f6c8757
fix/#131: inset을 두번 잡았던 부분 수정
0Hooni 5783777
refactor/#131: 코디네이터 제거
0Hooni c58af06
reafactor/#131: FactoryPattern을 이용해서 View를 만들도록 수정
0Hooni 2fd0421
refactor/#131: 필터 선택 화면 Factory 적용
0Hooni 4662ada
feat/#131: 팝업 상세 팩토리 적용
0Hooni 559e17f
feat/#131: SearchFeature에서 팝업 디테일로 가는 의존성 구현
0Hooni f83725a
refactor/#131: 홈 화면에서 SearchBar로 신규 모듈로 접근하도록 수정
0Hooni de168f8
refactor/#131: 일부 Section을 사용이 필요한 View로 이동
0Hooni 87517f3
refactor/#131: 기존에 사용하던 SearchScene 제거
0Hooni 107ea1b
fix/#131: 데모앱 실기기 @rPath 문제 해결
0Hooni 2af8b16
fix/#131: 검색에 성공했을때만 키워드를 저장하도록 수정
0Hooni c19b503
refactor/#131: 메서드의 이름을 더 정확하게 수정
0Hooni 4143682
refactor/#131: Cell reuse를 위해 기존의 cell을 비우도록 설정
0Hooni 8c231c9
feat/#131: 북마크 버튼을 탭했을때 기능 추가
0Hooni a51fda6
refactor/#131: 폴더링 다시
0Hooni 3521057
refactor/#131: 가독성 개선
0Hooni 360a858
fix/#131: 모달이 뜰 때 뒷 화면이 새로고침 되는 문제 수정
0Hooni 9aca3d2
fix/#131: Section마다 다르게 업데이트 하도록 수정
0Hooni c505cd5
Merge branch 'feat/#131-이쯤부터-다시복구-드가자' of https://github.com/PopPool/…
0Hooni 69b2944
fix/#131: 세개의 섹션으로 분리하여 각각 데이터소스 적용하도록 수정
0Hooni 12f2e66
fix/#131: 북마크시 셀 깜빡임 문제 해결
0Hooni 0eec33b
feat/#131: 검색어 최대 10개까지만 보이도록 수정
0Hooni 43e5f2b
refactor/#131: 폴더링 및 리네임
0Hooni 5f93b5e
Merge branch 'develop' of https://github.com/PopPool/iOS into feat/#1…
0Hooni a6070ae
style/#131: Apply SwiftLint autocorrect
github-actions[bot] 1e6c28f
Merge branch 'develop' into feat/#131-search-feature-module
0Hooni bb997f6
fix/#131: 결과 없음 라벨을 눌렀을 때 충돌이 나는 문제 해결
0Hooni 2003292
Merge branch 'feat/#131-search-feature-module' of https://github.com/…
0Hooni 4382cf1
chore/#131: 사용하지 않는 주석 제거
0Hooni f6ecadb
fix/#131: static으로 선언된 cell identifier를 제거
0Hooni edaa734
refactor/#131: ReusableView의 identifier를 사용하도록 수정
0Hooni b4f5e85
Merge branch 'develop' of https://github.com/PopPool/iOS into feat/#1…
0Hooni 429c3a1
fix/#131: develop merge로 인한 코드 오류 수정
0Hooni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
16 changes: 16 additions & 0 deletions
16
Poppool/DataLayer/Data/Data/Network/API/CategoryAPI/CategoryAPIEndpoint.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import Foundation | ||
|
|
||
| import Infrastructure | ||
|
|
||
| struct CategoryAPIEndpoint { | ||
|
|
||
| /// 관심사 목록을 가져옵니다. | ||
| /// - Returns: Endpoint<GetInterestListResponseDTO> | ||
| static func getCategoryList() -> Endpoint<GetCategoryListResponseDTO> { | ||
| return Endpoint( | ||
| baseURL: Secrets.popPoolBaseURL, | ||
| path: "/categories", | ||
| method: .get | ||
| ) | ||
| } | ||
| } |
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
5 changes: 5 additions & 0 deletions
5
.../DataLayer/Data/Data/Network/API/SearchAPI/RequestDTO/GetSearchPopupStoreRequestDTO.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import Foundation | ||
|
|
||
| struct GetSearchPopupStoreRequestDTO: Encodable { | ||
| let query: String | ||
| } |
17 changes: 17 additions & 0 deletions
17
...ataLayer/Data/Data/Network/API/SearchAPI/ResponseDTO/GetSearchPopupStoreResponseDTO.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import Foundation | ||
|
|
||
| import DomainInterface | ||
|
|
||
| struct GetSearchPopupStoreResponseDTO: Decodable { | ||
| var popUpStoreList: [PopUpStoreResponseDTO] | ||
| var loginYn: Bool | ||
| } | ||
|
|
||
| extension GetSearchPopupStoreResponseDTO { | ||
| func toDomain() -> KeywordBasePopupStoreListResponse { | ||
| return KeywordBasePopupStoreListResponse( | ||
| popupStoreList: popUpStoreList.map { $0.toDomain() }, | ||
| loginYn: loginYn | ||
| ) | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
Poppool/DataLayer/Data/Data/Network/API/SearchAPI/SearchAPIEndPoint.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import Foundation | ||
|
|
||
| import Infrastructure | ||
|
|
||
| import RxSwift | ||
|
|
||
| struct SearchAPIEndPoint { | ||
|
|
||
| static func getSearchPopUpList(request: GetSearchPopupStoreRequestDTO) -> Endpoint<GetSearchPopupStoreResponseDTO> { | ||
| return Endpoint( | ||
| baseURL: Secrets.popPoolBaseURL, | ||
| path: "/search/popup-stores", | ||
| method: .get, | ||
| queryParameters: request | ||
| ) | ||
| } | ||
| } |
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
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
21 changes: 21 additions & 0 deletions
21
Poppool/DataLayer/Data/Data/RepositoryImpl/CategoryRepositoryImpl.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import Foundation | ||
|
|
||
| import DomainInterface | ||
|
|
||
| import RxSwift | ||
|
|
||
| public final class CategoryRepositoryImpl: CategoryRepository { | ||
|
|
||
| private let provider: Provider | ||
|
|
||
| public init(provider: Provider) { | ||
| self.provider = provider | ||
| } | ||
|
|
||
| public func fetchCategoryList() -> Observable<[CategoryResponse]> { | ||
| let endPoint = CategoryAPIEndpoint.getCategoryList() | ||
| return provider.requestData(with: endPoint, interceptor: TokenInterceptor()).map { responseDTO in | ||
| return responseDTO.categoryResponseList.map({ $0.toDomain() }) | ||
| } | ||
| } | ||
| } | ||
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
41 changes: 41 additions & 0 deletions
41
Poppool/DataLayer/Data/Data/RepositoryImpl/Search/SearchAPIRepositoryImpl.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import Foundation | ||
|
|
||
| import DomainInterface | ||
| import Infrastructure | ||
|
|
||
| import RxSwift | ||
|
|
||
| public final class SearchAPIRepositoryImpl: SearchAPIRepository { | ||
|
|
||
| private let provider: Provider | ||
| private let tokenInterceptor = TokenInterceptor() | ||
| private let userDefaultService: UserDefaultService | ||
|
|
||
| public init( | ||
| provider: Provider, | ||
| userDefaultService: UserDefaultService | ||
| ) { | ||
| self.provider = provider | ||
| self.userDefaultService = userDefaultService | ||
| } | ||
|
|
||
| public func fetchSearchResult(by query: String) -> Observable<KeywordBasePopupStoreListResponse> { | ||
|
|
||
| let request = GetSearchPopupStoreRequestDTO(query: query) | ||
| let endPoint = SearchAPIEndPoint.getSearchPopUpList(request: request) | ||
| return provider.requestData( | ||
| with: endPoint, | ||
| interceptor: tokenInterceptor | ||
| ) | ||
| .map { $0.toDomain() } | ||
| .do { _ in self.saveSearchKeyword(keyword: query) } | ||
| } | ||
| } | ||
|
|
||
| private extension SearchAPIRepositoryImpl { | ||
| func saveSearchKeyword(keyword: String) { | ||
| let existingList = userDefaultService.fetchArray(keyType: .searchKeyword) ?? [] | ||
| let updatedList = [keyword] + existingList.filter { $0 != keyword } | ||
| userDefaultService.save(keyType: .searchKeyword, value: updatedList) | ||
| } | ||
| } |
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
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
18 changes: 18 additions & 0 deletions
18
Poppool/DomainLayer/Domain/Domain/UseCaseImpl/FetchCategoryListUseCaseImpl.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import Foundation | ||
|
|
||
| import DomainInterface | ||
|
|
||
| import RxSwift | ||
|
|
||
| public final class FetchCategoryListUseCaseImpl: FetchCategoryListUseCase { | ||
|
|
||
| private let repository: CategoryRepository | ||
|
|
||
| public init(repository: CategoryRepository) { | ||
| self.repository = repository | ||
| } | ||
|
|
||
| public func execute() -> Observable<[CategoryResponse]> { | ||
| return repository.fetchCategoryList() | ||
| } | ||
| } |
Oops, something went wrong.
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.
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.
tokenInterceptor를 class에서 생성하지 않고 사용할 때 마다 사용하는 이유가 궁금한데 이유를 알 수 있을까요?
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.
의존성 주입 개념으로 넣어두었고, 추후 인터페이스 추상화를 통해 주입해주면 좋겠다 싶어 우선적으로 저렇게 뒀었습니다☺️