Skip to content
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

πŸ”€ :: (#762) 검색 νƒ­ λ””μžμΈ κ²€μˆ˜ μ™„λ£Œ #763

Merged
merged 10 commits into from
Jul 11, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public enum SortType: String, Encodable, SearchOptionType {
case .alphabetical:
"κ°€λ‚˜λ‹€μˆœ"
case .popular:
"인기순 (μ„œλ²„ 개발 κ²€ν†  쀑)"
"인기순"
}
}
}
6 changes: 3 additions & 3 deletions Projects/Features/SearchFeature/Resources/Search.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e54-rK-aGI">
<rect key="frame" x="0.0" y="59" width="393" height="16"/>
<rect key="frame" x="0.0" y="59" width="393" height="12"/>
<color key="backgroundColor" name="blueGray100"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="nJ5-2M-ZsW"/>
<constraint firstAttribute="height" constant="12" id="nJ5-2M-ZsW"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5nx-1t-MMz">
<rect key="frame" x="0.0" y="75" width="393" height="36"/>
<rect key="frame" x="0.0" y="71" width="393" height="36"/>
<color key="backgroundColor" name="blueGray100"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="ykE-p1-BQh"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ extension BeforeSearchCollectionViewLayout {
alignment: .top
)

let itemSize = NSCollectionLayoutSize(
widthDimension: .fractionalWidth(1.0),
heightDimension: .fractionalHeight(1.0)
)

let item: NSCollectionLayoutItem = NSCollectionLayoutItem(layoutSize: itemSize)

let group: NSCollectionLayoutGroup
let section: NSCollectionLayoutSection

switch layoutKind {
case .youtube:

let itemSize = NSCollectionLayoutSize(
widthDimension: .fractionalWidth(1.0),
heightDimension: .fractionalHeight(1.0)
)

let item: NSCollectionLayoutItem = NSCollectionLayoutItem(layoutSize: itemSize)

let groupSize = NSCollectionLayoutSize(
widthDimension: .fractionalWidth(1.0),
heightDimension: .fractionalWidth(0.87)
Expand All @@ -51,17 +51,35 @@ extension BeforeSearchCollectionViewLayout {

case .recommend:

let itemSize = NSCollectionLayoutSize(
widthDimension: .fractionalWidth(0.41),
heightDimension: .fractionalHeight(1.0)
)

let item: NSCollectionLayoutItem = NSCollectionLayoutItem(layoutSize: itemSize)

let groupSize = NSCollectionLayoutSize(
widthDimension: .fractionalWidth(0.44),
widthDimension: .fractionalWidth(1.0),
heightDimension: .fractionalWidth(0.21)
)
group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitems: [item])
group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitem: item, count: 2)

group.interItemSpacing = .fixed(8)

section = NSCollectionLayoutSection(group: group)
section.boundarySupplementaryItems = [header]
section.interGroupSpacing = 8.0
section.contentInsets = NSDirectionalEdgeInsets(top: 20, leading: 20, bottom: 40, trailing: 20)

case .popularList:

let itemSize = NSCollectionLayoutSize(
widthDimension: .fractionalWidth(1.0),
heightDimension: .fractionalHeight(1.0)
)

let item: NSCollectionLayoutItem = NSCollectionLayoutItem(layoutSize: itemSize)

#warning("fractional κ³ λ―Όν•˜κΈ°")
let groupSize = NSCollectionLayoutSize(
widthDimension: .absolute(140),
Expand All @@ -74,10 +92,9 @@ extension BeforeSearchCollectionViewLayout {
section.boundarySupplementaryItems = [header]
section.contentInsets = NSDirectionalEdgeInsets(top: 20, leading: 20, bottom: 20, trailing: 20)
section.interGroupSpacing = 8
section.orthogonalScrollingBehavior = .continuous
}

section.orthogonalScrollingBehavior = .continuous

return section
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@ final class RecommendCollectionViewLayout: UICollectionViewCompositionalLayout {
extension RecommendCollectionViewLayout {
private static func configureLayout() -> NSCollectionLayoutSection {
let itemSize = NSCollectionLayoutSize(
widthDimension: .fractionalWidth(0.5),
widthDimension: .fractionalWidth(0.41),
heightDimension: .fractionalHeight(1.0)
)
var item: NSCollectionLayoutItem = NSCollectionLayoutItem(layoutSize: itemSize)

let item: NSCollectionLayoutItem = NSCollectionLayoutItem(layoutSize: itemSize)

let groupSize = NSCollectionLayoutSize(
widthDimension: .fractionalWidth(1),
heightDimension: .fractionalWidth(0.25)
widthDimension: .fractionalWidth(1.0),
heightDimension: .fractionalWidth(0.21)
)
let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitems: [item])
let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitem: item, count: 2)

group.interItemSpacing = .fixed(8.0)
group.contentInsets = .init(top: 8.0, leading: 20, bottom: 8.0, trailing: 20)
group.interItemSpacing = .fixed(8)

let section = NSCollectionLayoutSection(group: group)
section.contentInsets = NSDirectionalEdgeInsets(top: 16, leading: .zero, bottom: .zero, trailing: .zero)
section.interGroupSpacing = 8.0
section.contentInsets = NSDirectionalEdgeInsets(top: 20, leading: 20, bottom: .zero, trailing: 20)

return section
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,21 @@ extension ListResultCell {
}

titleLabel.snp.makeConstraints {
$0.height.equalTo(22)
$0.top.equalTo(thumbnailView.snp.top).offset(-1)
$0.leading.equalTo(thumbnailView.snp.trailing).offset(8)
}

creatorLabel.snp.makeConstraints {
$0.height.equalTo(18)
$0.top.equalTo(titleLabel.snp.bottom).offset(2)
$0.leading.equalTo(titleLabel.snp.leading)
$0.trailing.equalTo(titleLabel.snp.trailing)
$0.bottom.equalTo(thumbnailView.snp.bottom)
}

sharedCountLabel.snp.makeConstraints {
$0.height.equalTo(18)
$0.width.lessThanOrEqualTo(66)
$0.centerY.equalTo(thumbnailView.snp.centerY)
$0.trailing.equalToSuperview().inset(20)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ final class SearchFilterCell: UICollectionViewCell {
private var label: WMLabel = WMLabel(
text: "",
textColor: DesignSystemAsset.BlueGrayColor.blueGray900.color,
font: .t6(weight: .light)
font: .t6(weight: .light),
lineHeight: UIFont.WMFontSystem.t6(weight: .light).lineHeight
)

override init(frame: CGRect) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ extension SearchSortOptionCell {
label.font = .setFont(.t4(weight: .light))
}

#warning("인기 μˆœμ€ delegate μ•ˆ 보냄 μΆ”ν›„ μ—…λ°μ΄νŠΈ 이후 ν•΄μ œ ")
if model == .popular {
label.textColor = DesignSystemAsset.BlueGrayColor.gray400.color
}

checkImageView.isHidden = model != selectedModel
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,21 @@ extension SongResultCell {
}

titleLabel.snp.makeConstraints {
$0.height.equalTo(22)
$0.top.equalTo(thumbnailView.snp.top)
$0.leading.equalTo(thumbnailView.snp.trailing).offset(8)
}

artistLabel.snp.makeConstraints {
$0.height.equalTo(18)
$0.top.equalTo(titleLabel.snp.bottom).offset(2)
$0.leading.equalTo(titleLabel.snp.leading)
$0.trailing.equalTo(titleLabel.snp.trailing)
$0.bottom.equalTo(thumbnailView.snp.bottom)
}

dateLabel.snp.makeConstraints {
$0.height.equalTo(18)
$0.width.lessThanOrEqualTo(66)
$0.centerY.equalTo(thumbnailView.snp.centerY)
$0.trailing.equalToSuperview().inset(20)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ final class ListSearchResultViewController: BaseReactorViewController<ListSearch
}

collectionView.snp.makeConstraints {
$0.top.equalTo(headerView.snp.bottom).offset(8)
$0.top.equalTo(headerView.snp.bottom)
$0.bottom.horizontalEdges.equalToSuperview()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ extension SearchSortOptionViewController {
.bind(with: self) { owner, index in

owner.dismiss(animated: true) {
#warning("인기 μˆœμ€ delegate μ•ˆ 보냄 μΆ”ν›„ μ—…λ°μ΄νŠΈ 이후 ν•΄μ œ ")
if index == 3 { return }
owner.delegate?.updateSortType(owner.options[index])
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import PlaylistFeatureInterface
import UIKit
import Utility

#warning("μ‹€μ œ 데이터 및 이벀트 μ—°κ²°")
final class WakmusicRecommendViewController: BaseReactorViewController<WakmusicRecommendReactor> {
private let wakmusicPlaylistDetailFactory: any WakmusicPlaylistDetailFactory

Expand Down
Loading