-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #582 from wakmusic/575-develop-result-of-search
🔀 :: (#575) 검색 곡 결과 화면 구현
- Loading branch information
Showing
44 changed files
with
786 additions
and
903 deletions.
There are no files selected for viewing
This file contains 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
200 changes: 100 additions & 100 deletions
200
Projects/App/Sources/Application/NeedleGenerated.swift
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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
13 changes: 13 additions & 0 deletions
13
Projects/Features/SearchFeature/Interface/Enum/TabPosition.swift
This file contains 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,13 @@ | ||
public enum TabPosition: Int { | ||
case song = 0 | ||
case list | ||
|
||
var title: String { | ||
switch self { | ||
case .song: | ||
"노래" | ||
case .list: | ||
"리스트" | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Projects/Features/SearchFeature/Interface/Enum/TypingStatus.swift
This file contains 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,7 @@ | ||
import Foundation | ||
|
||
public enum TypingStatus { | ||
case before | ||
case typing | ||
case search | ||
} |
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
Projects/Features/SearchFeature/Interface/Factory/SearchResultFactory.swift
This file contains 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,6 @@ | ||
import Foundation | ||
import UIKit | ||
|
||
public protocol SongSearchResultFactory { | ||
func makeView() -> UIViewController | ||
} |
This file contains 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 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
19 changes: 0 additions & 19 deletions
19
Projects/Features/SearchFeature/Sources/Components/AfterSearchContentComponent.swift
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
Projects/Features/SearchFeature/Sources/Components/SongSearchResultComponent.swift
This file contains 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,12 @@ | ||
import BaseFeature | ||
import BaseFeatureInterface | ||
import Foundation | ||
import NeedleFoundation | ||
import SearchFeatureInterface | ||
import UIKit | ||
|
||
public final class SongSearchResultComponent: Component<EmptyDependency>, SongSearchResultFactory { | ||
public func makeView() -> UIViewController { | ||
SongSearchResultViewController(reactor: SongSearchResultReactor()) | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ionalLayout/Enum/BeforeVcDataSoruce.swift → .../Enum/DataSource/BeforeVcDataSoruce.swift
This file contains 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
44 changes: 44 additions & 0 deletions
44
Projects/Features/SearchFeature/Sources/CompositionalLayout/Enum/Options/Option.swift
This file contains 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,44 @@ | ||
import Foundation | ||
|
||
enum FilterType { | ||
case all | ||
case title | ||
case artist | ||
case credit | ||
|
||
var title: String { | ||
switch self { | ||
case .all: | ||
"전체" | ||
case .title: | ||
"제목" | ||
case .artist: | ||
"아티스트" | ||
case .credit: | ||
"크레딧" | ||
} | ||
} | ||
} | ||
|
||
enum SortType { | ||
case newest | ||
case oldest | ||
case likes | ||
case views | ||
case alphabeticalOrder | ||
|
||
var title: String { | ||
switch self { | ||
case .newest: | ||
"최신순" | ||
case .oldest: | ||
"과거순" | ||
case .likes: | ||
"좋아요순" | ||
case .views: | ||
"조회수순" | ||
case .alphabeticalOrder: | ||
"가나다순" | ||
} | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
Projects/Features/SearchFeature/Sources/CompositionalLayout/Enum/Section.swift
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...Features/SearchFeature/Sources/CompositionalLayout/Enum/Section/BeforeSearchSection.swift
This file contains 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,7 @@ | ||
import Foundation | ||
|
||
internal enum BeforeSearchSection: Int { | ||
case youtube | ||
case recommend | ||
case popularList | ||
} |
5 changes: 5 additions & 0 deletions
5
...ts/Features/SearchFeature/Sources/CompositionalLayout/Enum/Section/RecommendSection.swift
This file contains 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 | ||
|
||
internal enum RecommendSection: Hashable { | ||
case main | ||
} |
12 changes: 12 additions & 0 deletions
12
...ures/SearchFeature/Sources/CompositionalLayout/Enum/Section/SongSearchResultSection.swift
This file contains 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,12 @@ | ||
import Foundation | ||
|
||
internal enum SongSearchResultSection: Int { | ||
case song = 0 | ||
|
||
var title: String { | ||
switch self { | ||
case .song: | ||
"노래" | ||
} | ||
} | ||
} |
This file contains 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
46 changes: 46 additions & 0 deletions
46
...archFeature/Sources/CompositionalLayout/Layout/SongSearchResultCollectionViewLayout.swift
This file contains 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,46 @@ | ||
import UIKit | ||
import Utility | ||
|
||
final class SongSearchResultCollectionViewLayout: UICollectionViewCompositionalLayout { | ||
init() { | ||
super.init { _, _ in | ||
|
||
return SongSearchResultCollectionViewLayout.configureLayout() | ||
} | ||
} | ||
|
||
@available(*, unavailable) | ||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
} | ||
|
||
extension SongSearchResultCollectionViewLayout { | ||
private static func configureLayout() -> NSCollectionLayoutSection { | ||
let itemSize = NSCollectionLayoutSize( | ||
widthDimension: .fractionalWidth(1.0), | ||
heightDimension: .fractionalHeight(1.0) | ||
) | ||
|
||
let headerLayout = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .absolute(30)) | ||
|
||
let header = NSCollectionLayoutBoundarySupplementaryItem( | ||
layoutSize: headerLayout, | ||
elementKind: SearchResultHeaderView.kind, | ||
alignment: .top | ||
) | ||
|
||
let item: NSCollectionLayoutItem = NSCollectionLayoutItem(layoutSize: itemSize) | ||
let groupSize = NSCollectionLayoutSize( | ||
widthDimension: .fractionalWidth(1.0), | ||
heightDimension: .fractionalWidth(0.16) | ||
) | ||
let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitems: [item]) | ||
|
||
let section = NSCollectionLayoutSection(group: group) | ||
section.contentInsets = NSDirectionalEdgeInsets(top: .zero, leading: 20.0, bottom: 20.0, trailing: 20.0) | ||
section.boundarySupplementaryItems = [header] | ||
|
||
return section | ||
} | ||
} |
26 changes: 0 additions & 26 deletions
26
Projects/Features/SearchFeature/Sources/Enum/Enum+Search.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.