Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
@@ -0,0 +1 @@
parent_config: ../../../../.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct PushNotificationItem: Identifiable, Hashable {
public let todoId: String
public let todoCategory: TodoCategory

init(from notification: PushNotification) {
public init(from notification: PushNotification) {
self.id = notification.id
self.title = notification.title
self.body = notification.body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SwiftUI
import Core
import PresentationShared

struct PushNotificationListView: View {
public struct PushNotificationListView: View {
@Environment(\.colorScheme) private var colorScheme
@ScaledMetric(relativeTo: .body) private var headerHeight = 41
@ScaledMetric(relativeTo: .largeTitle) private var labelWidth = 34
Expand All @@ -19,7 +19,7 @@ struct PushNotificationListView: View {
let coordinator: PushNotificationListViewCoordinator
let isCompactLayout: Bool

init(
public init(
coordinator: PushNotificationListViewCoordinator,
isCompactLayout: Bool
) {
Expand All @@ -28,7 +28,7 @@ struct PushNotificationListView: View {
self.store = coordinator.store
}

var body: some View {
public var body: some View {
NavigationStack {
notificationListContent
.background(Color(.systemGroupedBackground))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import PresentationShared

@MainActor
@Observable
final class PushNotificationListViewCoordinator {
public final class PushNotificationListViewCoordinator {
let store: StoreOf<PushNotificationListFeature>
private let container: DIContainer
@ObservationIgnored
private var todoDetailStore: StoreOf<TodoDetailFeature>?

init(container: DIContainer) {
public init(container: DIContainer) {
self.container = container
let fetchQueryUseCase = container.resolve(FetchPushNotificationQueryUseCase.self)

Expand All @@ -37,11 +37,15 @@ final class PushNotificationListViewCoordinator {
}
}

func fetchData() {
public var selectedTodoId: String? {
store.selectedTodoId?.id
}

public func fetchData() {
store.send(.view(.fetchNotifications))
}

func makeTodoDetailStore(todoId: String) -> StoreOf<TodoDetailFeature> {
public func makeTodoDetailStore(todoId: String) -> StoreOf<TodoDetailFeature> {
if let todoDetailStore,
todoDetailStore.todoId == todoId,
!todoDetailStore.showEditButton {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Core
import Foundation

extension PushNotificationQuery.SortOrder {
public extension PushNotificationQuery.SortOrder {
var title: String {
switch self {
case .latest:
Expand All @@ -19,7 +19,7 @@ extension PushNotificationQuery.SortOrder {
}
}

extension PushNotificationQuery.TimeFilter {
public extension PushNotificationQuery.TimeFilter {
var title: String {
switch self {
case .none:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
parent_config: ../../../../.swiftlint-tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//
// PushNotificationListFeatureTests.swift
// PresentationTests
// NotificationTabTests
//
// Created by opfic on 6/12/26.
//

import Testing
import Domain
@testable import Presentation
@testable import NotificationTab

@MainActor
struct PushNotificationListFeatureTests {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// PushNotificationListFixtures.swift
// PresentationTests
// NotificationTabTests
//
// Created by opfic on 6/12/26.
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// PushNotificationListTestAssertions.swift
// PresentationTests
// NotificationTabTests
//
// Created by opfic on 6/12/26.
//
Expand All @@ -10,7 +10,7 @@ import Core
import Domain
import PresentationShared
import Foundation
@testable import Presentation
@testable import NotificationTab

@MainActor
func waitUntilMainActor(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// PushNotificationListTestSupport.swift
// PresentationTests
// NotificationTabTests
//
// Created by opfic on 6/12/26.
//
Expand All @@ -11,7 +11,7 @@ import Core
import Domain
import PresentationShared
import Foundation
@testable import Presentation
@testable import NotificationTab

@MainActor
protocol PushNotificationListStateDriving {
Expand Down
47 changes: 47 additions & 0 deletions Application/Presentation/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,52 @@ let project = Project(
]
)
),
.target(
name: "NotificationTab",
destinations: .iOS,
product: .staticFramework,
bundleId: "com.opfic.DevLog.NotificationTab",
infoPlist: .file(path: frameworkInfoPlistPath),
sources: ["NotificationTab/Sources/**/*.swift"],
scripts: [
DevLogScripts.swiftLint(
sourcePath: "NotificationTab/Sources",
configPath: "NotificationTab/Sources/.swiftlint.yml"
)
],
dependencies: [
.project(target: "Domain", path: "../Domain"),
.project(target: "Core", path: "../Core"),
.target(name: "PresentationShared")
],
settings: frameworkBuildSettings
),
.target(
name: "NotificationTabTests",
destinations: .iOS,
product: .unitTests,
bundleId: "com.opfic.DevLog.NotificationTabTests",
infoPlist: .file(path: testsInfoPlistPath),
sources: ["NotificationTab/Tests/**/*.swift"],
scripts: [
DevLogScripts.swiftLint(
sourcePath: "NotificationTab/Tests",
configPath: "NotificationTab/Tests/.swiftlint.yml"
)
],
dependencies: [
.project(target: "Domain", path: "../Domain"),
.project(target: "Core", path: "../Core"),
.target(name: "NotificationTab"),
.target(name: "PresentationShared")
],
settings: .devlog(
base: [
"ENABLE_USER_SCRIPT_SANDBOXING": "NO",
"TEST_TARGET_NAME": "NotificationTab"
]
)
),
.target(
name: "Presentation",
destinations: .iOS,
Expand All @@ -159,6 +205,7 @@ let project = Project(
.project(target: "Core", path: "../Core"),
.target(name: "HomeTab"),
.target(name: "TodayTab"),
.target(name: "NotificationTab"),
.target(name: "PresentationShared")
],
settings: frameworkBuildSettings
Expand Down
3 changes: 2 additions & 1 deletion Application/Presentation/Sources/Main/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import SwiftUI
import Core
import Domain
import HomeTab
import NotificationTab
import PresentationShared
import TodayTab

Expand Down Expand Up @@ -314,7 +315,7 @@ struct MainView: View {

@ViewBuilder
private var notificationRegularDetailView: some View {
if let todoId = pushNotificationListViewCoordinator.store.selectedTodoId?.id {
if let todoId = pushNotificationListViewCoordinator.selectedTodoId {
TodoDetailView(
store: pushNotificationListViewCoordinator.makeTodoDetailStore(
todoId: todoId
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Todo, 저장 링크, 오늘 할 일, 받은 알림, 누적 활동을 하나의
## 아키텍처

`DevLog.xcworkspace` 안에서 Application, Widget 모듈을 분리하고 화면, 상태, 비즈니스 로직, 외부 의존성 경계를 나눈 `Clean Architecture` 기반 구성
`Presentation`은 tab shell/root composition을 유지하고, 공통 UI 흐름은 `PresentationShared`, 탭 단위 흐름은 `HomeTab`, `TodayTab` target이 소유함
`Presentation`은 tab shell/root composition을 유지하고, 공통 UI 흐름은 `PresentationShared`, 탭 단위 흐름은 `HomeTab`, `TodayTab`, `NotificationTab` target이 소유함

<table>
<tr>
Expand Down Expand Up @@ -242,6 +242,7 @@ DevLog_iOS/
│ │ ├── PresentationShared/ # 공통 UI 흐름, 공통 presentation structure
│ │ ├── HomeTab/ # Home 탭 화면, feature, coordinator, 테스트
│ │ ├── TodayTab/ # Today 탭 화면, feature, coordinator, 테스트
│ │ ├── NotificationTab/ # Notification 탭 화면, feature, coordinator, 테스트
│ │ └── Sources/ # Main, Root, Settings 등 앱 presentation shell
│ └── Widget/ # 앱-위젯 브릿지, 위젯 동기화 이벤트, 스냅샷 갱신
├── Widget/
Expand Down
Binary file modified docs/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading