-
Notifications
You must be signed in to change notification settings - Fork 0
MLSDictionaryFeature 모듈을 구성합니다. #334
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
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4f85137
feat/#332: MLSDictionaryFeature 모ㅗ듈 생성
pinocchio22 31cb9f6
Revert "feat/#332: MLSDictionaryFeature 모ㅗ듈 생성"
pinocchio22 3662508
feat/#332: MLSDictionaryFeature 모듈 생성
pinocchio22 852ae71
feat/#332: DictionaryFeature 모듈 분리
pinocchio22 d01d670
test/332: 테스트 코드 작성
pinocchio22 35e2d22
style/#332: Apply SwiftLint autocorrect
github-actions[bot] 8e418e3
refactor/#332: DictionaryDetailBaseViewController 콘텐츠 뷰 관리 구조 개선
pinocchio22 167a4f5
refactor/#332: 최근 검색어 저장 로직 지연 실행 구조로 개선
pinocchio22 92fd5d7
refactor/#332: 토큰 조회 시점을 구독 시점으로 변경
pinocchio22 a06021a
refactor/#332: 제미나이 코드리뷰 수정
pinocchio22 5bb766b
Merge branch 'feat/#332-MLSDictionaryFeature' of github.com:Team-Mapl…
pinocchio22 d9664e3
style/#332: Apply SwiftLint autocorrect
github-actions[bot] 156afcb
fix/#332: navigateTo 오타 수정
pinocchio22 056d958
fix/#332: DictionaryDetailFactoryImpl 자기 자신 순환 참조 수정
pinocchio22 668f315
fix/#332: MonsterDictionaryDetailReactor itemTapped 인덱스 체크 추가
pinocchio22 616752a
fix/#332: LaunchScreen.storyboard 제거
pinocchio22 fc4c8d6
Merge branch 'feat/#332-MLSDictionaryFeature' of github.com:Team-Mapl…
pinocchio22 5d9044e
style/#332: Apply SwiftLint autocorrect
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
3 changes: 3 additions & 0 deletions
3
MLS/MLSCore/Sources/MLSCore/Navigation/DictionaryTabControllable.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,3 @@ | ||
| public protocol DictionaryTabControllable: AnyObject { | ||
| func changeTab(index: Int) | ||
| } |
11 changes: 11 additions & 0 deletions
11
MLS/MLSCore/Sources/MLSCore/Navigation/DictionaryTabRegistry.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,11 @@ | ||
| public enum DictionaryTabRegistry { | ||
| private static weak var controller: DictionaryTabControllable? | ||
|
|
||
| public static func register(controller: DictionaryTabControllable) { | ||
| self.controller = controller | ||
| } | ||
|
|
||
| public static func changeTab(index: Int) { | ||
| controller?.changeTab(index: index) | ||
| } | ||
| } |
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
54 changes: 54 additions & 0 deletions
54
MLS/MLSDesignSystem/Sources/MLSDesignSystem/Layouts/CheckBoxButtonListSmallCell.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,54 @@ | ||
| import UIKit | ||
|
|
||
| import RxSwift | ||
| import SnapKit | ||
|
|
||
| public class CheckBoxButtonListSmallCell: UICollectionViewCell { | ||
|
|
||
| private let checkBoxButton: CheckBoxButton = { | ||
| let button = CheckBoxButton(style: .listSmall, mainTitle: nil, subTitle: nil) | ||
| button.isUserInteractionEnabled = false | ||
| return button | ||
| }() | ||
|
|
||
| private var disposeBag = DisposeBag() | ||
|
|
||
| override init(frame: CGRect) { | ||
| super.init(frame: frame) | ||
| addViews() | ||
| setupConstraints() | ||
| configureUI() | ||
| } | ||
|
|
||
| required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
|
|
||
| public override var isSelected: Bool { | ||
| didSet { | ||
| checkBoxButton.isSelected = isSelected | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // MARK: - SetUp | ||
| private extension CheckBoxButtonListSmallCell { | ||
| func addViews() { | ||
| contentView.addSubview(checkBoxButton) | ||
| } | ||
|
|
||
| func setupConstraints() { | ||
| checkBoxButton.snp.makeConstraints { make in | ||
| make.edges.equalToSuperview() | ||
| } | ||
| } | ||
|
|
||
| func configureUI() { | ||
| } | ||
| } | ||
|
|
||
| public extension CheckBoxButtonListSmallCell { | ||
| func inject(title: String?) { | ||
| checkBoxButton.mainTitle = title | ||
| } | ||
| } |
58 changes: 58 additions & 0 deletions
58
MLS/MLSDesignSystem/Sources/MLSDesignSystem/Layouts/PageTabbarCell.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,58 @@ | ||
| import UIKit | ||
|
|
||
| import SnapKit | ||
|
|
||
| public class PageTabbarCell: UICollectionViewCell { | ||
|
|
||
| private let titleLabel: UILabel = { | ||
| let label = UILabel() | ||
| label.font = .b_m_r | ||
| label.textColor = .neutral600 | ||
| label.numberOfLines = 1 | ||
| label.adjustsFontSizeToFitWidth = true | ||
| label.minimumScaleFactor = 0.8 | ||
| return label | ||
| }() | ||
|
|
||
| override init(frame: CGRect) { | ||
| super.init(frame: frame) | ||
| addViews() | ||
| setupConstraints() | ||
| configureUI() | ||
| } | ||
|
|
||
| required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
|
|
||
| public override var isSelected: Bool { | ||
| didSet { | ||
| let font: UIFont? = isSelected ? .sub_m_b : .b_m_r | ||
| let textColor: UIColor? = isSelected ? .textColor : .neutral600 | ||
| titleLabel.font = font | ||
| titleLabel.textColor = textColor | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // MARK: - SetUp | ||
| private extension PageTabbarCell { | ||
| func addViews() { | ||
| contentView.addSubview(titleLabel) | ||
| } | ||
|
|
||
| func setupConstraints() { | ||
| titleLabel.snp.makeConstraints { make in | ||
| make.horizontalEdges.equalToSuperview() | ||
| make.centerY.equalToSuperview() | ||
| } | ||
| } | ||
|
|
||
| func configureUI() { } | ||
| } | ||
|
|
||
| public extension PageTabbarCell { | ||
| func inject(title: String?) { | ||
| titleLabel.text = title | ||
| } | ||
| } |
50 changes: 50 additions & 0 deletions
50
MLS/MLSDesignSystem/Sources/MLSDesignSystem/Layouts/TapButtonCell.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,50 @@ | ||
| import UIKit | ||
|
|
||
| import SnapKit | ||
|
|
||
| public class TapButtonCell: UICollectionViewCell { | ||
|
|
||
| public let button: TapButton = { | ||
| let button = TapButton() | ||
| return button | ||
| }() | ||
|
|
||
| override init(frame: CGRect) { | ||
| super.init(frame: frame) | ||
| addViews() | ||
| setupConstraints() | ||
| configureUI() | ||
| } | ||
|
|
||
| required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
|
|
||
| public override var isSelected: Bool { | ||
| didSet { | ||
| button.isSelected = isSelected | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // MARK: - SetUp | ||
| private extension TapButtonCell { | ||
| func addViews() { | ||
| contentView.addSubview(button) | ||
| } | ||
|
|
||
| func setupConstraints() { | ||
| button.snp.makeConstraints { make in | ||
| make.edges.equalToSuperview() | ||
| } | ||
| } | ||
|
|
||
| func configureUI() { } | ||
| } | ||
|
|
||
| public extension TapButtonCell { | ||
| func inject(title: String?) { | ||
| button.text = title | ||
| button.isUserInteractionEnabled = false | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| .DS_Store | ||
| /.build | ||
| /Packages | ||
| xcuserdata/ | ||
| DerivedData/ | ||
| .swiftpm/configuration/registries.json | ||
| .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata | ||
| .netrc |
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,86 @@ | ||
| // swift-tools-version: 6.2 | ||
| // The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
|
||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "MLSDictionaryFeature", | ||
| platforms: [.iOS(.v15)], | ||
| products: [ | ||
| .library( | ||
| name: "MLSDictionaryFeatureInterface", | ||
| targets: ["MLSDictionaryFeatureInterface"] | ||
| ), | ||
| .library( | ||
| name: "MLSDictionaryFeature", | ||
| targets: ["MLSDictionaryFeature"] | ||
| ), | ||
| .library( | ||
| name: "MLSDictionaryFeatureTesting", | ||
| targets: ["MLSDictionaryFeatureTesting"] | ||
| ) | ||
| ], | ||
| dependencies: [ | ||
| .package(path: "../MLSAuthFeature"), | ||
| .package(path: "../MLSMyPageFeature"), | ||
| .package(path: "../MLSCore"), | ||
| .package(path: "../MLSDesignSystem"), | ||
| .package(url: "https://github.com/ReactorKit/ReactorKit.git", from: "3.2.0"), | ||
| .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "6.7.0"), | ||
| .package(url: "https://github.com/RxSwiftCommunity/RxKeyboard.git", from: "2.0.0"), | ||
| .package(url: "https://github.com/SnapKit/SnapKit.git", from: "5.7.1") | ||
| ], | ||
| targets: [ | ||
| // Interface | ||
| .target( | ||
| name: "MLSDictionaryFeatureInterface", | ||
| dependencies: [ | ||
| .product(name: "MLSCore", package: "MLSCore"), | ||
| .product(name: "MLSDesignSystem", package: "MLSDesignSystem"), | ||
| .product(name: "RxSwift", package: "RxSwift") | ||
| ], | ||
| swiftSettings: [.swiftLanguageMode(.v5)] | ||
| ), | ||
| // Feature | ||
| .target( | ||
| name: "MLSDictionaryFeature", | ||
| dependencies: [ | ||
| "MLSDictionaryFeatureInterface", | ||
| .product(name: "MLSAuthFeatureInterface", package: "MLSAuthFeature"), | ||
| .product(name: "MLSCore", package: "MLSCore"), | ||
| .product(name: "MLSDesignSystem", package: "MLSDesignSystem"), | ||
| .product(name: "MLSMyPageFeatureInterface", package: "MLSMyPageFeature"), | ||
| .product(name: "ReactorKit", package: "ReactorKit"), | ||
| .product(name: "RxSwift", package: "RxSwift"), | ||
| .product(name: "RxCocoa", package: "RxSwift"), | ||
| .product(name: "RxRelay", package: "RxSwift"), | ||
| .product(name: "RxKeyboard", package: "RxKeyboard"), | ||
| .product(name: "SnapKit", package: "SnapKit") | ||
| ], | ||
| swiftSettings: [.swiftLanguageMode(.v5)] | ||
| ), | ||
| // Mock | ||
| .target( | ||
| name: "MLSDictionaryFeatureTesting", | ||
| dependencies: [ | ||
| "MLSDictionaryFeatureInterface", | ||
| .product(name: "MLSAuthFeatureInterface", package: "MLSAuthFeature"), | ||
| .product(name: "MLSMyPageFeatureInterface", package: "MLSMyPageFeature"), | ||
| .product(name: "RxSwift", package: "RxSwift") | ||
| ], | ||
| swiftSettings: [.swiftLanguageMode(.v5)] | ||
| ), | ||
| // Tests | ||
| .testTarget( | ||
| name: "MLSDictionaryFeatureTests", | ||
| dependencies: [ | ||
| "MLSDictionaryFeature", | ||
| "MLSDictionaryFeatureInterface", | ||
| "MLSDictionaryFeatureTesting", | ||
| .product(name: "MLSAuthFeatureInterface", package: "MLSAuthFeature"), | ||
| .product(name: "MLSAuthFeatureTesting", package: "MLSAuthFeature"), | ||
| .product(name: "RxBlocking", package: "RxSwift") | ||
| ], | ||
| ) | ||
| ] | ||
| ) |
18 changes: 18 additions & 0 deletions
18
MLS/MLSDictionaryFeature/Sources/MLSDictionaryFeature/Data/DTOs/DictionaryAllDTO.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 @@ | ||
| public struct DictionaryAllDTO: DictionaryDTOProtocol { | ||
| public let originalId: Int | ||
| public let name: String | ||
| public let imageUrl: String? | ||
| public let level: Int? | ||
| public let type: String | ||
| public let bookmarkId: Int? | ||
| public var id: Int { originalId } | ||
|
|
||
| public init(originalId: Int, name: String, imageUrl: String?, level: Int?, type: String, bookmarkId: Int?) { | ||
| self.originalId = originalId | ||
| self.name = name | ||
| self.imageUrl = imageUrl | ||
| self.level = level | ||
| self.type = type | ||
| self.bookmarkId = bookmarkId | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.