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

๐Ÿ”€ :: (#519) ๋ณด๊ด€ํ•จ ํƒญ์„ ๋ณด๊ด€ํ•จ๊ณผ ๋‚ด์ •๋ณด๋กœ ๊ตฌ๋ถ„ํ•ฉ๋‹ˆ๋‹ค #520

Merged
merged 15 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
91ec728
:recycle: :: SignInFeature ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์„ฑ
yongbeomkwak May 5, 2024
6482572
:recycle: :: SignIn ํŒฉํ† ๋ฆฌ๋กœ ๋ฆฌํŒฉ ๋ฐ ์ฃผ์„ ์ฒ˜๋ฆฌ
yongbeomkwak May 5, 2024
22cc01b
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 5, 2024
eb595b2
:recycle: :: MyInfo ํƒญ ์—ฐ๊ฒฐ
yongbeomkwak May 5, 2024
2036f86
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 5, 2024
c92ef0d
:art: :: ๋ฆฌ์†Œ์Šค ๋ณ€๊ฒฝ
yongbeomkwak May 5, 2024
c32d952
:lipstick: :: ๋ฐ”ํ…€ ๋„ค๋น„๊ฒŒ์ด์…˜ ๋กœํ‹ฐ ๊ต์ฒด
yongbeomkwak May 6, 2024
71f946e
:bug: :: ๋ฒ ์ด์Šค ํ“จ์ฒ˜ ์˜์กด์„ฑ ์ฃผ์ž…
yongbeomkwak May 6, 2024
ea1fc3f
:bulb: :: ์ฃผ์„ ๋‚ด์šฉ ๋ณด์™„
yongbeomkwak May 7, 2024
067db64
:bulb: :: ์ฐจํŠธ ์‚ญ์ œ ์‹œ์  ์–ธ๊ธ‰
yongbeomkwak May 7, 2024
27fc33b
โšก๏ธ :: [#519] EqualHandleTappedType ํ”„๋กœํ† ์ฝœ ์ฑ„ํƒ ๋ฐ ํ˜ธ์ถœ๋กœ์ง ์ˆ˜์ •
KangTaeHoon May 7, 2024
536f411
:recycle: :: ํŒฉํ† ๋ฆฌ๋ฅผ ์ด์šฉํ•˜์—ฌ ๊ตฌํ˜„์ฒด๋Š” internal ์ฒ˜๋ฆฌ
yongbeomkwak May 8, 2024
0f80ac1
:bricks: :: ํฌ๋งทํŒ…
yongbeomkwak May 8, 2024
0214bbd
Merge branch '519-split-tab-storage-myinfo' of https://github.com/wakโ€ฆ
yongbeomkwak May 8, 2024
6107698
:bricks: :: public ์ œ๊ฑฐ
yongbeomkwak May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ extension ModulePaths: MicroTargetPathConvertable {

public extension ModulePaths {
enum Feature: String, MicroTargetPathConvertable {
case MyInfoFeature
case PlaylistFeature
case BaseFeature
case ArtistFeature
Expand Down
11 changes: 2 additions & 9 deletions Projects/App/Sources/Application/AppComponent+Auth.swift
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
//
// AppComponent+Search.swift
// WaktaverseMusic
//
// Created by yongbeomkwak on 2023/02/07.
// Copyright ยฉ 2023 yongbeomkwak. All rights reserved.
//

import AuthDomain
import AuthDomainInterface
import BaseFeature
import SignInFeature
import SignInFeatureInterface
import StorageFeature

// MARK: ๋ณ€์ˆ˜๋ช… ์ฃผ์˜
// AppComponent ๋‚ด ๋ณ€์ˆ˜ == Dependency ๋‚ด ๋ณ€์ˆ˜ ์ด๋ฆ„ ๊ฐ™์•„์•ผํ•จ

public extension AppComponent {
var signInComponent: SignInComponent {
var signInFactory: any SignInFactory {
SignInComponent(parent: self)
}

Expand Down
8 changes: 8 additions & 0 deletions Projects/App/Sources/Application/AppComponent+MyInfo.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Foundation
import MyInfoFeature

extension AppComponent {
var myInfoComponent: MyInfoComponent {
MyInfoComponent(parent: self)
}
}
32 changes: 28 additions & 4 deletions Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import KeychainModule
import LikeDomain
import LikeDomainInterface
import MainTabFeature
import MyInfoFeature
import MyInfoFeatureInterface
import NeedleFoundation
import NoticeDomain
import NoticeDomainInterface
Expand All @@ -32,6 +34,7 @@ import PlaylistFeatureInterface
import RootFeature
import SearchFeature
import SignInFeature
import SignInFeatureInterface
import SongsDomain
import SongsDomainInterface
import StorageFeature
Expand Down Expand Up @@ -176,6 +179,9 @@ private class MainTabBarDependencycd05b79389a6a7a6c20fProvider: MainTabBarDepend
var storageComponent: StorageComponent {
return appComponent.storageComponent
}
var myInfoComponent: MyInfoComponent {
return appComponent.myInfoComponent
}
var noticePopupComponent: NoticePopupComponent {
return appComponent.noticePopupComponent
}
Expand Down Expand Up @@ -315,8 +321,8 @@ private func factory3afd170b9974b0dbd863f47b58f8f304c97af4d5(_ component: Needle
return ServiceInfoDependency17ccca17be0fc87c9a2eProvider(appComponent: parent1(component) as! AppComponent)
}
private class StorageDependency1447167c38e97ef97427Provider: StorageDependency {
var signInComponent: SignInComponent {
return appComponent.signInComponent
var signInFactory: any SignInFactory {
return appComponent.signInFactory
}
var afterLoginComponent: AfterLoginComponent {
return appComponent.afterLoginComponent
Expand Down Expand Up @@ -765,6 +771,17 @@ private class MultiPurposePopUpDependencyfb7ce9f5d0057e8159d7Provider: MultiPurp
private func factorya77269be267fb568bd4ff47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return MultiPurposePopUpDependencyfb7ce9f5d0057e8159d7Provider(appComponent: parent1(component) as! AppComponent)
}
private class MyInfoDependency3b44bce00dab6fc2e345Provider: MyInfoDependency {


init() {

}
}
/// ^->AppComponent->MyInfoComponent
private func factoryec2cede3edc2a626b35de3b0c44298fc1c149afb(_ component: NeedleFoundation.Scope) -> AnyObject {
return MyInfoDependency3b44bce00dab6fc2e345Provider()
}

#else
extension AppComponent: Registration {
Expand All @@ -782,7 +799,7 @@ extension AppComponent: Registration {
localTable["fetchSearchSongUseCase-any FetchSearchSongUseCase"] = { [unowned self] in self.fetchSearchSongUseCase as Any }
localTable["fetchLyricsUseCase-any FetchLyricsUseCase"] = { [unowned self] in self.fetchLyricsUseCase as Any }
localTable["fetchNewSongsUseCase-any FetchNewSongsUseCase"] = { [unowned self] in self.fetchNewSongsUseCase as Any }
localTable["signInComponent-SignInComponent"] = { [unowned self] in self.signInComponent as Any }
localTable["signInFactory-any SignInFactory"] = { [unowned self] in self.signInFactory as Any }
localTable["storageComponent-StorageComponent"] = { [unowned self] in self.storageComponent as Any }
localTable["afterLoginComponent-AfterLoginComponent"] = { [unowned self] in self.afterLoginComponent as Any }
localTable["requestComponent-RequestComponent"] = { [unowned self] in self.requestComponent as Any }
Expand Down Expand Up @@ -917,6 +934,7 @@ extension MainTabBarComponent: Registration {
keyPathToName[\MainTabBarDependency.searchComponent] = "searchComponent-SearchComponent"
keyPathToName[\MainTabBarDependency.artistComponent] = "artistComponent-ArtistComponent"
keyPathToName[\MainTabBarDependency.storageComponent] = "storageComponent-StorageComponent"
keyPathToName[\MainTabBarDependency.myInfoComponent] = "myInfoComponent-MyInfoComponent"
keyPathToName[\MainTabBarDependency.noticePopupComponent] = "noticePopupComponent-NoticePopupComponent"
keyPathToName[\MainTabBarDependency.noticeComponent] = "noticeComponent-NoticeComponent"
keyPathToName[\MainTabBarDependency.noticeDetailComponent] = "noticeDetailComponent-NoticeDetailComponent"
Expand Down Expand Up @@ -970,7 +988,7 @@ extension ServiceInfoComponent: Registration {
}
extension StorageComponent: Registration {
public func registerItems() {
keyPathToName[\StorageDependency.signInComponent] = "signInComponent-SignInComponent"
keyPathToName[\StorageDependency.signInFactory] = "signInFactory-any SignInFactory"
keyPathToName[\StorageDependency.afterLoginComponent] = "afterLoginComponent-AfterLoginComponent"
}
}
Expand Down Expand Up @@ -1150,6 +1168,11 @@ extension TextPopUpComponent: Registration {

}
}
extension MyInfoComponent: Registration {
public func registerItems() {

}
}


#endif
Expand Down Expand Up @@ -1206,6 +1229,7 @@ private func registerProviderFactory(_ componentPath: String, _ factory: @escapi
registerProviderFactory("^->AppComponent->ContainSongsComponent", factory4d4f4455414271fee232f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->MultiPurposePopUpComponent", factorya77269be267fb568bd4ff47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->TextPopUpComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->MyInfoComponent", factoryec2cede3edc2a626b35de3b0c44298fc1c149afb)
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Tabman
import UIKit
import Utility

public final class ChartViewController: TabmanViewController, ViewControllerFromStoryBoard {
public final class ChartViewController: TabmanViewController, ViewControllerFromStoryBoard, EqualHandleTappedType {
private var chartContentComponent: ChartContentComponent?

private lazy var viewControllers: [ChartContentViewController?] = {
Expand Down
1 change: 1 addition & 0 deletions Projects/Features/MainTabFeature/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let project = Project.module(
.feature(target: .ArtistFeature),
.feature(target: .StorageFeature),
.feature(target: .PlayerFeature),
.feature(target: .MyInfoFeature),
.domain(target: .NoticeDomain, type: .interface)
]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import BaseFeature
import ChartFeature
import Foundation
import HomeFeature
import MyInfoFeature
import NeedleFoundation
import NoticeDomainInterface
import SearchFeature
Expand All @@ -15,6 +16,7 @@ public protocol MainTabBarDependency: Dependency {
var searchComponent: SearchComponent { get }
var artistComponent: ArtistComponent { get }
var storageComponent: StorageComponent { get }
var myInfoComponent: MyInfoComponent { get }
var noticePopupComponent: NoticePopupComponent { get }
var noticeComponent: NoticeComponent { get }
var noticeDetailComponent: NoticeDetailComponent { get }
Expand All @@ -31,6 +33,7 @@ public final class MainTabBarComponent: Component<MainTabBarDependency> {
searchComponent: self.dependency.searchComponent,
artistComponent: self.dependency.artistComponent,
storageCompoent: self.dependency.storageComponent,
myInfoComponent: self.dependency.myInfoComponent,
noticePopupComponent: self.dependency.noticePopupComponent,
noticeComponent: self.dependency.noticeComponent,
noticeDetailComponent: self.dependency.noticeDetailComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
//
// BottomTabBarViewController.swift
// MainTabFeature
//
// Created by KTH on 2023/01/14.
// Copyright ยฉ 2023 yongbeomkwak. All rights reserved.
//

import DesignSystem
import RxSwift
import UIKit
Expand All @@ -24,12 +16,13 @@ public class BottomTabBarViewController: UIViewController, ViewControllerFromSto

private lazy var tabs: [TabItemView] = {
var items = [TabItemView]()
for _ in 0 ..< 5 {
for _ in 0 ..< 6 {
items.append(TabItemView.newInstance)
}
return items
}()

#warning("์ฐจํŠธ๋ฅผ ํ™ˆ์— ์ ์šฉ ์‹œ ์‚ญ์ œ ์š”๋ง")
private lazy var tabItems: [TabItem] = {
return [
TabItem(
Expand Down Expand Up @@ -61,6 +54,12 @@ public class BottomTabBarViewController: UIViewController, ViewControllerFromSto
offImage: DesignSystemAsset.TabBar.storageOff.image,
onImage: DesignSystemAsset.TabBar.storageOn.image,
animateImage: "Storage_Tab"
),
TabItem(
yongbeomkwak marked this conversation as resolved.
Show resolved Hide resolved
title: "๋‚ด์ •๋ณด",
offImage: DesignSystemAsset.TabBar.myinfoOff.image,
onImage: DesignSystemAsset.TabBar.myinfoOn.image,
animateImage: "MyInfo_Tab"
)
]
}()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
//
// MainTabBarViewController.swift
// MainTabFeature
//
// Created by KTH on 2023/01/13.
// Copyright ยฉ 2023 yongbeomkwak. All rights reserved.
//

import ArtistFeature
import BaseFeature
import ChartFeature
import DesignSystem
import HomeFeature
import MyInfoFeature
import NoticeDomainInterface
import RxCocoa
import RxSwift
Expand All @@ -29,7 +22,8 @@ public final class MainTabBarViewController: BaseViewController, ViewControllerF
chartComponent.makeView().wrapNavigationController,
searchComponent.makeView().wrapNavigationController,
artistComponent.makeView().wrapNavigationController,
storageComponent.makeView().wrapNavigationController
storageComponent.makeView().wrapNavigationController,
myInfoComponent.makeView().wrapNavigationController
]
}()

Expand All @@ -43,6 +37,7 @@ public final class MainTabBarViewController: BaseViewController, ViewControllerF
private var searchComponent: SearchComponent!
private var artistComponent: ArtistComponent!
private var storageComponent: StorageComponent!
private var myInfoComponent: MyInfoComponent!
private var noticePopupComponent: NoticePopupComponent!
private var noticeComponent: NoticeComponent!
private var noticeDetailComponent: NoticeDetailComponent!
Expand Down Expand Up @@ -70,6 +65,7 @@ public final class MainTabBarViewController: BaseViewController, ViewControllerF
searchComponent: SearchComponent,
artistComponent: ArtistComponent,
storageCompoent: StorageComponent,
myInfoComponent: MyInfoComponent,
noticePopupComponent: NoticePopupComponent,
noticeComponent: NoticeComponent,
noticeDetailComponent: NoticeDetailComponent
Expand All @@ -81,6 +77,7 @@ public final class MainTabBarViewController: BaseViewController, ViewControllerF
viewController.searchComponent = searchComponent
viewController.artistComponent = artistComponent
viewController.storageComponent = storageCompoent
viewController.myInfoComponent = myInfoComponent
viewController.noticePopupComponent = noticePopupComponent
viewController.noticeComponent = noticeComponent
viewController.noticeDetailComponent = noticeDetailComponent
Expand Down Expand Up @@ -128,18 +125,11 @@ extension MainTabBarViewController {
}

func equalHandleTapped(for index: Int) {
guard let navigationController = self.viewControllers[index] as? UINavigationController else { return }
if let home = navigationController.viewControllers.first as? HomeViewController {
home.equalHandleTapped()
} else if let chart = navigationController.viewControllers.first as? ChartViewController {
chart.equalHandleTapped()
} else if let search = navigationController.viewControllers.first as? SearchViewController {
search.equalHandleTapped()
} else if let artist = navigationController.viewControllers.first as? ArtistViewController {
artist.equalHandleTapped()
} else if let storage = navigationController.viewControllers.first as? StorageViewController {
storage.equalHandleTapped()
guard let navigationController = self.viewControllers[index] as? UINavigationController,
let viewController = navigationController.viewControllers.first as? EqualHandleTappedType else {
return
}
viewController.equalHandleTapped()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ extension TabItemView {
self.lottieContentView.addSubview(lottieAnimationView)

lottieAnimationView.snp.makeConstraints {
$0.width.height.equalTo(45)
$0.width.height.equalTo(32)
$0.centerX.equalTo(self.lottieContentView.snp.centerX)
$0.centerY.equalTo(self.lottieContentView.snp.centerY).offset(0.75)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
19 changes: 19 additions & 0 deletions Projects/Features/MyInfoFeature/Demo/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import UIKit

@main
final class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
let viewController = UIViewController()
viewController.view.backgroundColor = .yellow
window?.rootViewController = viewController
window?.makeKeyAndVisible()

return true
}
}
5 changes: 5 additions & 0 deletions Projects/Features/MyInfoFeature/Interface/Interface.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import UIKit

public protocol MyInfoFactory {
func makeView() -> UIViewController
}
23 changes: 23 additions & 0 deletions Projects/Features/MyInfoFeature/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import DependencyPlugin
import ProjectDescription
import ProjectDescriptionHelpers

let project = Project.module(
name: ModulePaths.Feature.MyInfoFeature.rawValue,
targets: [
.interface(module: .feature(.MyInfoFeature)),
.implements(module: .feature(.MyInfoFeature), dependencies: [
.feature(target: .MyInfoFeature, type: .interface),
.feature(target: .BaseFeature)
]),
.testing(module: .feature(.MyInfoFeature), dependencies: [
.feature(target: .MyInfoFeature, type: .interface)
]),
.tests(module: .feature(.MyInfoFeature), dependencies: [
.feature(target: .MyInfoFeature)
]),
.demo(module: .feature(.MyInfoFeature), dependencies: [
.feature(target: .MyInfoFeature)
])
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import MyInfoFeatureInterface
import NeedleFoundation
import UIKit

public protocol MyInfoDependency: Dependency {}

public final class MyInfoComponent: Component<MyInfoDependency>, MyInfoFactory {
public func makeView() -> UIViewController {
return MyInfoViewController()
}
}
Loading
Loading