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

πŸ”€ :: μ •λ³΄μž…λ ₯ νŽ˜μ΄μ§€ 기반 닀져놓기 #57

Merged
merged 51 commits into from
May 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
be69434
:package: :: InputInformation Feature Module
baekteun May 10, 2023
f0381fd
:heavy_plus_sign: :: BaseFeature -> InputInformationFeature
baekteun May 10, 2023
81d9cad
:sparkles: :: InputInformationBuildable
baekteun May 10, 2023
1df5776
:sparkles: :: InputInformationComponent
baekteun May 10, 2023
bb9a899
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 44-i…
baekteun May 10, 2023
cec2614
:sparkles: :: SignupPageWrapView Scaffold
baekteun May 11, 2023
327f408
:truck: :: View -> Scene
baekteun May 12, 2023
4873e6d
:truck: :: SignupPageWrapView -> InputInformationPageWrapView
baekteun May 13, 2023
6c8da0a
:sparkles: :: InputFormationModelProtocol
baekteun May 13, 2023
9eff456
:sparkles: :: InputInformationModel Imple
baekteun May 13, 2023
2955bb3
:sparkles: :: InputInformationIntent
baekteun May 13, 2023
dd2eb19
:sparkles: :: InputInformationView
baekteun May 13, 2023
77aa829
:sparkles: :: InputProfileInfoFeature Module
baekteun May 13, 2023
751350d
:heavy_plus_sign: :: InputProfileInfo -> InputInformation
baekteun May 13, 2023
339156b
:sparkles: :: InputProfileInfoBuildable
baekteun May 13, 2023
8b4be08
:sparkles: :: InputProfileInfoComponent
baekteun May 13, 2023
49fbcff
:truck: :: PageWrapView Scene -> View
baekteun May 13, 2023
3c7eb48
:sparkles: :: InputProfileInfoView Scaffold
baekteun May 13, 2023
8bd030a
:sparkles: :: InputProfileInfoModel
baekteun May 13, 2023
9531510
:sparkles: :: InputProfileInfoIntent
baekteun May 13, 2023
be19007
:sparkles: :: InputProfileInfo Scaffold
baekteun May 13, 2023
c17e757
:sparkles: :: InputSchoolLifeInfoFeature Module
baekteun May 13, 2023
ce0cb3e
:heavy_plus_sign: :: InputSchoolLifeInfo -> InputInformation
baekteun May 13, 2023
48e7bf8
:sparkles: :: InputSchoolListInfoBuildable
baekteun May 13, 2023
f3e7482
:sparkles: :: InputSchoolLifeInfoComponent
baekteun May 13, 2023
02c812e
:sparkles: :: InputSchoolLifeInfoModelProtocol
baekteun May 13, 2023
412d7a2
:sparkles: :: InputSchoolLifeInfoModel
baekteun May 13, 2023
5ad28f2
:sparkles: :: InputSchoolLifeInfoIntent
baekteun May 13, 2023
728b387
:sparkles: :: InputSchoolLifeInfoView
baekteun May 13, 2023
dad97ac
:fire: :: Source.swift
baekteun May 13, 2023
4fcfae3
:sparkles: :: InputWorkInfo Moduel
baekteun May 13, 2023
92d00e5
:heavy_plus_sign: :: InputWorkInfoFeature -> InputInformationFeature
baekteun May 13, 2023
68b6cd3
:sparkles: :: InputWorkInfoBuildable
baekteun May 13, 2023
579d9ad
:sparkles: :: InputSchoolInfoView Build
baekteun May 13, 2023
cacb760
:sparkles: :: InputWorkInfoComponent
baekteun May 13, 2023
1556fc2
:sparkles: :: InputWorkInfoModelProtocol
baekteun May 13, 2023
0adbf80
:sparkles: :: InputWorkInfoModel
baekteun May 13, 2023
8d7b18d
:sparkles: :: InputWorkInfoIntent
baekteun May 13, 2023
0acb3f4
:sparkles: :: InputWorkInfoView
baekteun May 13, 2023
854cee7
:fire: :: Source.swift
baekteun May 13, 2023
699a236
:sparkles: :: InputMilitaryInfoFeature Module
baekteun May 13, 2023
cdabc21
:sparkles: :: InputMilitaryInfoFeature -> InputInformationFeature
baekteun May 13, 2023
e29d77a
:sparkles: :: InputMilitaryInfoFeature Scaffold
baekteun May 13, 2023
20dc75c
:goal_net: :: MakeView -> EmptyView()
baekteun May 13, 2023
5999b47
:sparkles: :: InputCertificateInfoFeature Module
baekteun May 13, 2023
ba15f60
:heavy_plus_sign: :: InputCetrificateInfoFeature -> InputInformationF…
baekteun May 13, 2023
e7cbc12
:sparkles: :: InputCertficateInfoFeature Scaffold
baekteun May 13, 2023
4c40025
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 44-i…
baekteun May 13, 2023
1341ffc
:sparkles: :: InputLanguageFeature Module
baekteun May 13, 2023
76ee189
:heavy_plus_sign: :: InputLanguageInfoFeature -> InputInformationFeature
baekteun May 13, 2023
0372ea6
:sparkles: :: InputLanguageInfoFeature Scaffold
baekteun May 13, 2023
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 @@ -9,6 +9,62 @@ public extension TargetDependency {
}

public extension TargetDependency.Feature {
static let InputLanguageInfoFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.InputLanguageInfoFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.InputLanguageInfoFeature.rawValue)
)
static let InputLanguageInfoFeature = TargetDependency.project(
target: ModulePaths.Feature.InputLanguageInfoFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputLanguageInfoFeature.rawValue)
)
static let InputCertificateInfoFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.InputCertificateInfoFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.InputCertificateInfoFeature.rawValue)
)
static let InputCertificateInfoFeature = TargetDependency.project(
target: ModulePaths.Feature.InputCertificateInfoFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputCertificateInfoFeature.rawValue)
)
static let InputMilitaryInfoFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.InputMilitaryInfoFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.InputMilitaryInfoFeature.rawValue)
)
static let InputMilitaryInfoFeature = TargetDependency.project(
target: ModulePaths.Feature.InputMilitaryInfoFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputMilitaryInfoFeature.rawValue)
)
static let InputWorkInfoFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.InputWorkInfoFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.InputWorkInfoFeature.rawValue)
)
static let InputWorkInfoFeature = TargetDependency.project(
target: ModulePaths.Feature.InputWorkInfoFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputWorkInfoFeature.rawValue)
)
static let InputSchoolLifeInfoFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.InputSchoolLifeInfoFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.InputSchoolLifeInfoFeature.rawValue)
)
static let InputSchoolLifeInfoFeature = TargetDependency.project(
target: ModulePaths.Feature.InputSchoolLifeInfoFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputSchoolLifeInfoFeature.rawValue)
)
static let InputProfileInfoFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.InputProfileInfoFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.InputProfileInfoFeature.rawValue)
)
static let InputProfileInfoFeature = TargetDependency.project(
target: ModulePaths.Feature.InputProfileInfoFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputProfileInfoFeature.rawValue)
)
static let InputInformationFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.InputInformationFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.InputInformationFeature.rawValue)
)
static let InputInformationFeature = TargetDependency.project(
target: ModulePaths.Feature.InputInformationFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputInformationFeature.rawValue)
)
static let SigninFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.SigninFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.SigninFeature.rawValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ public enum ModulePaths {

public extension ModulePaths {
enum Feature: String {
case InputLanguageInfoFeature
case InputCertificateInfoFeature
case InputMilitaryInfoFeature
case InputWorkInfoFeature
case InputSchoolLifeInfoFeature
case InputProfileInfoFeature
case InputInformationFeature
case SigninFeature
case BaseFeature

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Combine
import SwiftUI
import UIKit

struct SMSBackButtonModifier: ViewModifier {
let dismiss: DismissAction
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import SwiftUI

public protocol InputCertificateInfoBuildable {
associatedtype ViewType: View
func makeView() -> ViewType
}
12 changes: 12 additions & 0 deletions Projects/Feature/InputCertificateInfoFeature/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import ProjectDescription
import ProjectDescriptionHelpers
import DependencyPlugin

let project = Project.makeModule(
name: ModulePaths.Feature.InputCertificateInfoFeature.rawValue,
product: .staticLibrary,
targets: [.interface, .unitTest],
internalDependencies: [
.Feature.BaseFeature
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import BaseFeature
import InputCertificateInfoFeatureInterface
import NeedleFoundation
import SwiftUI

public protocol InputCertificateInfoDependency: Dependency {}

public final class InputCertificateInfoComponent:
Component<InputCertificateInfoDependency>,
InputCertificateInfoBuildable {

public func makeView() -> some View {
EmptyView()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Foundation

final class InputCertificateInfoIntent: InputCetrificateInfoIntentProtocol {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Foundation

protocol InputCertificateInfoIntentProtocol {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Foundation

final class InputCertificateInfoModel: ObservableObject, InputCertificateInfoStateProtocol {}

extension InputCertificateInfoModel: InputCertificateInfoActionProtocol {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Foundation

protocol InputCertificateInfoStateProtocol {}

protocol InputCertificateInfoActionProtocol: AnyObject {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import BaseFeature
import SwiftUI

struct InputCertificateInfoView: View {
@StateObject var container: MVIContainer<InputCertificateInfoIntentProtocol, InputCertificateInfoStateProtocol>
var intent: any InputCertificateInfoIntentProtocol { container.intent }
var state: any InputCertificateInfoStateProtocol { container.model }

var body: some View {
Text("Hello, World!")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import XCTest

final class InputCertificateInfoFeatureTests: XCTestCase {
override func setUpWithError() throws {}

override func tearDownWithError() throws {}

func testExample() {
XCTAssertEqual(1, 1)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import SwiftUI

public protocol InputInformationBuildable {
associatedtype ViewType: View
func makeView() -> ViewType
}
18 changes: 18 additions & 0 deletions Projects/Feature/InputInformationFeature/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import ProjectDescription
import ProjectDescriptionHelpers
import DependencyPlugin

let project = Project.makeModule(
name: ModulePaths.Feature.InputInformationFeature.rawValue,
product: .staticLibrary,
targets: [.interface, .unitTest],
internalDependencies: [
.Feature.BaseFeature,
.Feature.InputProfileInfoFeatureInterface,
.Feature.InputSchoolLifeInfoFeatureInterface,
.Feature.InputWorkInfoFeatureInterface,
.Feature.InputMilitaryInfoFeatureInterface,
.Feature.InputCertificateInfoFeatureInterface,
.Feature.InputLanguageInfoFeatureInterface
Comment on lines +11 to +16
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ν˜Ήμ‹œ μ™œ informationμ—μ„œ λ‹€ κ΄€λ¦¬ν•˜λ‚˜μš”?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

각 νŽ˜μ΄μ§€λ³„λ‘œ Naivgation을 μŒ“μ§€μ•Šκ³  PageView둜 μ§„ν–‰ν• κ±°λΌμ„œ κ·Έλ ‡μŠ΅λ‹ˆλ‹€

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•„ν•˜ μ•Œκ² μŠ΅λ‹ˆλ‹€

]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import BaseFeature
import InputInformationFeatureInterface
import NeedleFoundation
import SwiftUI

public protocol InputInformationDependency: Dependency {}

public final class InputInformationComponent:
Component<InputInformationDependency>,
InputInformationBuildable {

public func makeView() -> some View {
let model = InputInformationModel()
let intent = InputInformationIntent(model: model)
let container = MVIContainer(
intent: intent as InputInformationIntentProtocol,
model: model as InputInformationStateProtocol,
modelChangePublisher: model.objectWillChange
)
return InputInformationView(container: container)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Foundation

final class InputInformationIntent: InputInformationIntentProtocol {
private weak var model: (any InputInformationActionProtocol)?

init(model: any InputInformationActionProtocol) {
self.model = model
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Foundation

protocol InputInformationIntentProtocol {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Foundation

final class InputInformationModel: ObservableObject, InputInformationStateProtocol {
@Published var phase: InformationPhase = .profile
}

extension InputInformationModel: InputInformationActionProtocol {
func prevButtonDidTap() {
guard let currentIndex = InformationPhase.allCases.firstIndex(of: phase),
currentIndex > 1
else { return }
phase = InformationPhase.allCases[currentIndex - 1]
}

func nextButtonDidTap() {
guard let currentIndex = InformationPhase.allCases.firstIndex(of: phase),
currentIndex < InformationPhase.allCases.count - 1
else { return }
phase = InformationPhase.allCases[currentIndex + 1]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Foundation

enum InformationPhase: CaseIterable {
case profile
case school
case workCondition
case military
case certification
case language
}

protocol InputInformationStateProtocol {
var phase: InformationPhase { get }
}

protocol InputInformationActionProtocol: AnyObject {
func prevButtonDidTap()
func nextButtonDidTap()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import BaseFeature
import SwiftUI

struct InputInformationView: View {
@StateObject var container: MVIContainer<InputInformationIntentProtocol, InputInformationStateProtocol>
var intent: any InputInformationIntentProtocol { container.intent }
var state: any InputInformationStateProtocol { container.model }

var body: some View {
InputInformationPageWrapView(
selection: Binding(
get: { state.phase },
set: { _ in }
)
) {
Text("a")
.tag(InformationPhase.profile)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import SwiftUI

struct InputInformationPageWrapView<Selection: Hashable, Content: View>: View {
@Binding var selection: Selection
var content: Content

init(
selection: Binding<Selection>,
@ViewBuilder content: () -> Content
) {
_selection = selection
self.content = content()
}

var body: some View {
ZStack(alignment: .topTrailing) {
TabView(selection: $selection) {
content
}
.tabViewStyle(.page(indexDisplayMode: .never))
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import XCTest

final class InputInformationFeatureTests: XCTestCase {
override func setUpWithError() throws {}

override func tearDownWithError() throws {}

func testExample() {
XCTAssertEqual(1, 1)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import SwiftUI

public protocol InputLanguageInfoBuildable {
associatedtype ViewType: View
func makeView() -> ViewType
}
12 changes: 12 additions & 0 deletions Projects/Feature/InputLanguageInfoFeature/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import ProjectDescription
import ProjectDescriptionHelpers
import DependencyPlugin

let project = Project.makeModule(
name: ModulePaths.Feature.InputLanguageInfoFeature.rawValue,
product: .staticLibrary,
targets: [.interface, .unitTest],
internalDependencies: [
.Feature.BaseFeature
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import BaseFeature
import InputLanguageInfoFeatureInterface
import NeedleFoundation
import SwiftUI

public protocol InputLanguageInfoDependency: Dependency {}

public final class InputLanguageInfoComponent:
Component<InputLanguageInfoDependency>,
InputLanguageInfoBuildable {

public func makeView() -> some View {
EmptyView()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Foundation

final class InputLanguageInfoIntent: InputLanguageInfoIntentProtocol {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Foundation

protocol InputLanguageInfoIntentProtocol {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Foundation

final class InputLanguageInfoModel: ObservableObject, InputLanguageInfoStateProtocol {}

extension InputLanguageInfoModel: InputLanguageInfoActionProtocol {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Foundation

protocol InputLanguageInfoStateProtocol {}

protocol InputLanguageInfoActionProtocol: AnyObject {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import BaseFeature
import SwiftUI

struct InputLanguageInfoView: View {
@StateObject var container: MVIContainer<InputLanguageInfoIntentProtocol, InputLanguageInfoStateProtocol>
var intent: any InputLanguageInfoIntentProtocol { container.intent }
var state: any InputLanguageInfoStateProtocol { container.model }

var body: some View {
Text("Hello, World!")
}
}
Loading