-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Category Package 추가 * chore: Category 패키지 의존성 주입 * feat: Timer 모듈 Category 모듈 재사용 뷰 DesignSystem으로 이동 * chore: Timer 모듈 Category 모듈 분리 * chore: Service 패키지로 CategoryManager 이동 - Service 패키지 내부에 CategoryService 모듈 생성 - CategoryService 모듈을 외부에서 Library로 사용할 수 있게 설정 * feat: Category 패키지, Timer 패키지에 Service 의존성 추가 - Service 패키지 의존성 추가 - CategoryService 모듈 의존성 추가 * feat: CategoryService 모듈 적용 * feat: 카테고리 목록 재사용을 위한 CategoryInfoView 구현 - Timer Feature, Category Feature 각각의 Cell을 가지기 위해 공통 부분 CustomView로 수정 * feat: CategorySettingCollectionViewCell 구현 - Category Feature에서 사용하는 새로운 Cell - 기존의 CategoryListCollectionViewCell를 재사용하지 않기 위해 Category Feature 내부에 구현 * feat: CategoryListSection, CategoryListItem 모델 구현 - 기존의 공통으로 재사용하던 CategorySettingSection, CategorySettingItem 대신 Timer Feature 내부에 새로운 SectionType, ItemType 생성 * feat: CategoryListCollectionViewCell 구현 - Timer Feature에서 사용하는 카테고리 CollectionViewCell * feat: TimerViewController 변경사항 적용 - CategoryListCollectionViewCell 적용 - CategoryListSectionType, CaetgoryListItemType 적용 * chore: CategorySettingFooterView 위치 이동 - 기존 DesignSystem 모듈에서 Category 모듈로 이동 * chore: 기존 CategoryListCollcetionViewCell 삭제 * feat: Cell layer 설정 수정 * feat: 불필요한 public 접근제어자 삭제 * feat: Category Package 의존성 주입 경로 수정
- Loading branch information
1 parent
5598ca6
commit 73f6770
Showing
30 changed files
with
389 additions
and
95 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
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 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,29 @@ | ||
// swift-tools-version: 5.10 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Category", | ||
platforms: [.iOS(.v14)], | ||
products: [ | ||
.library(name: "Category", targets: ["Category"]), | ||
], | ||
|
||
dependencies: [ | ||
.package(name: "Core", path: "../../Core"), | ||
.package(name: "DesignSystem", path: "../../DesignSystem"), | ||
.package(name: "Domain", path: "../../Domain"), | ||
.package(name: "Service", path: "../../Service") | ||
], | ||
|
||
targets: [ | ||
.target(name: "Category", dependencies: [ | ||
.product(name: "Core", package: "Core"), | ||
.product(name: "DesignSystem", package: "DesignSystem"), | ||
.product(name: "Domain", package: "Domain"), | ||
.product(name: "CategoryService", package: "Service") | ||
]), | ||
.testTarget(name: "CategoryTests", dependencies: ["Category"]), | ||
] | ||
) |
File renamed without changes.
File renamed without changes.
50 changes: 50 additions & 0 deletions
50
iOS/FlipMate/Feature/Category/Sources/Category/View/CategorySettingCollectionViewCell.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,50 @@ | ||
// | ||
// CategorySettingCollectionViewCell.swift | ||
// | ||
// | ||
// Created by 임현규 on 6/16/24. | ||
// | ||
|
||
import UIKit | ||
import DesignSystem | ||
|
||
final class CategorySettingCollectionViewCell: UICollectionViewCell { | ||
|
||
// MARK: - UI Components | ||
private let categoryView: CategoryInfoView = { | ||
let view = CategoryInfoView(isTimerLabelHidden: true) | ||
view.translatesAutoresizingMaskIntoConstraints = false | ||
view.backgroundColor = .systemBackground | ||
return view | ||
}() | ||
|
||
// MARK: - init | ||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
configureUI() | ||
configureCategoryCellLayer() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: - UI Update Methods | ||
func updateUI(_ subjectLabelText: String, _ circleBackgroundColor: UIColor?, _ timeLabelText: String?) { | ||
categoryView.updateUI(subjectLabelText, circleBackgroundColor, timeLabelText) | ||
} | ||
} | ||
|
||
// MARK: - Private Methods | ||
private extension CategorySettingCollectionViewCell { | ||
func configureUI() { | ||
[ categoryView ] .forEach { contentView.addSubview($0) } | ||
|
||
NSLayoutConstraint.activate([ | ||
categoryView.topAnchor.constraint(equalTo: contentView.topAnchor), | ||
categoryView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), | ||
categoryView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), | ||
categoryView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor) | ||
]) | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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
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
12 changes: 12 additions & 0 deletions
12
iOS/FlipMate/Feature/Category/Tests/CategoryTests/CategoryTests.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 XCTest | ||
@testable import Category | ||
|
||
final class CategoryTests: XCTestCase { | ||
func testExample() throws { | ||
// XCTest Documentation | ||
// https://developer.apple.com/documentation/xctest | ||
|
||
// Defining Test Cases and Test Methods | ||
// https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods | ||
} | ||
} |
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,8 @@ | ||
.DS_Store | ||
/.build | ||
/Packages | ||
xcuserdata/ | ||
DerivedData/ | ||
.swiftpm/configuration/registries.json | ||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata | ||
.netrc |
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,25 @@ | ||
// swift-tools-version: 5.10 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Service", | ||
platforms: [.iOS(.v14)], | ||
products: [ | ||
.library(name: "CategoryService", targets: ["CategoryService"]), | ||
], | ||
|
||
dependencies: [ | ||
.package(name: "Domain", path: "../Domain") | ||
], | ||
|
||
targets: [ | ||
.target(name: "CategoryService", dependencies: [ | ||
.product(name: "Domain", package: "Domain") | ||
]), | ||
.testTarget(name: "ServiceTests", dependencies: [ | ||
"CategoryService" | ||
]), | ||
] | ||
) |
16 changes: 3 additions & 13 deletions
16
...Sources/Timer/Utils/CategoryManager.swift → ...oryServiceImplement/CategoryManager.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
20 changes: 20 additions & 0 deletions
20
...Feature/Service/Sources/CategoryService/CategoryServiceInterface/CategoryManageable.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,20 @@ | ||
// | ||
// CategoryManageable.swift | ||
// | ||
// | ||
// Created by 임현규 on 6/14/24. | ||
// | ||
|
||
import Foundation | ||
import Combine | ||
import Domain | ||
|
||
public protocol CategoryManageable { | ||
var categoryDidChangePublisher: AnyPublisher<[StudyCategory], Never> { get } | ||
func replace(categories: [StudyCategory]) | ||
func change(category: StudyCategory) | ||
func removeCategory(categoryId: Int) | ||
func append(category: StudyCategory) | ||
func findCategory(categoryId: Int) -> StudyCategory? | ||
func numberOfCategory() -> Int | ||
} |
12 changes: 12 additions & 0 deletions
12
iOS/FlipMate/Feature/Service/Tests/ServiceTests/ServiceTests.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 XCTest | ||
@testable import Service | ||
|
||
final class ServiceTests: XCTestCase { | ||
func testExample() throws { | ||
// XCTest Documentation | ||
// https://developer.apple.com/documentation/xctest | ||
|
||
// Defining Test Cases and Test Methods | ||
// https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.