From e0d46d7f754ad015323abf24682c0874f0cd6de8 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Tue, 11 Jun 2024 23:51:32 +0900 Subject: [PATCH 01/15] wip new data model (does not build) --- .../xcshareddata/swiftpm/Package.resolved | 2 +- .../TimetableFeature/TimetableCore.swift | 189 +++++++++++++----- .../TimetableFeature/TimetableListView.swift | 7 +- 3 files changed, 149 insertions(+), 49 deletions(-) diff --git a/app-ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/app-ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 7607efa0e..d9da7f803 100644 --- a/app-ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/app-ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "f8cbec89e72afd3e8305b98d43e58a9e69ba7ccc12f6d0cc55ff743ff5373f8f", + "originHash" : "fc296cbf51ba156d83c222f42852e5fa16b6bcd01ef05b8c01c34d58995a19e3", "pins" : [ { "identity" : "abseil-cpp-binary", diff --git a/app-ios/Sources/TimetableFeature/TimetableCore.swift b/app-ios/Sources/TimetableFeature/TimetableCore.swift index 355a677b0..6a36e3505 100644 --- a/app-ios/Sources/TimetableFeature/TimetableCore.swift +++ b/app-ios/Sources/TimetableFeature/TimetableCore.swift @@ -52,60 +52,157 @@ public enum DayTab: String, CaseIterable, Identifiable { case day3 = "Day3" } +//public struct TimetableTimeGroupItems: Identifiable, Equatable, Hashable { +// public var id: String { +// UUID().uuidString +// } +// +// public var startsTimeString: String +// public var endsTimeString: String +// public var items: [TimetableItem] +// +// public init(startsTimeString: String, endsTimeString: String, items: [TimetableItem]) { +// self.startsTimeString = startsTimeString +// self.endsTimeString = endsTimeString +// self.items = items +// } +//} + public struct TimetableItem: Equatable, Hashable { + let id: String //Not used yet + let title: String + let startsAt: String + let endsAt: String + let category: String + let sessionType: String let room: String + let targetAudience: String let languages: [String] - let title: String - let speaker: String - let startTime: String - let endTime: String + let asset: String + let levels: [String] + let speakers: [String] + let isFavorite: Bool + + + // TODO: The actual class will look more like this +// public abstract val id: TimetableItemId +// public abstract val title: MultiLangText +// public abstract val startsAt: Instant +// public abstract val endsAt: Instant +// public abstract val category: TimetableCategory +// public abstract val sessionType: TimetableSessionType +// public abstract val room: TimetableRoom +// public abstract val targetAudience: String +// public abstract val language: TimetableLanguage +// public abstract val asset: TimetableAsset +// public abstract val levels: PersistentList +// public abstract val speakers: PersistentList } + + public struct SampleData { - public let day1Data = [TimetableItem(room: "Arctic Fox", languages: ["EN", "JA"], - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - speaker: "Maria Rodriguez", - startTime: "12:00PM",endTime: "13:00PM",isFavorite:false), - TimetableItem(room: "Arctic Fox", languages: ["EN", "JA"], - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - speaker: "Maria Rodriguez", - startTime: "12:00PM",endTime: "13:00PM",isFavorite:false), - TimetableItem(room: "Arctic Fox", languages: ["EN", "JA"], - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - speaker: "Maria Rodriguez", - startTime: "12:00PM", - endTime: "13:00PM",isFavorite:false) - ] + public let day1Data = [ + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + + isFavorite:false) + ] - public let day2Data = [TimetableItem(room: "Arctic Fox", languages: ["EN", "JA"], - title: "A Beginner's Guide to Understanding the Latest Android Technology", - speaker: "Kelvin Lueilwitz", - startTime: "12:00PM",endTime: "13:00PM",isFavorite:false), - TimetableItem(room: "Arctic Fox", languages: ["EN", "JA"], - title: "How to Stay Updated on the Newest Android Technology Innovations", - speaker: "Mallory Turner", - startTime: "12:00PM",endTime: "13:00PM",isFavorite:false), - TimetableItem(room: "Arctic Fox", languages: ["EN", "JA"], - title: "The Ultimate Guide to Exploring the Latest Android Technology Features", - speaker: "Clementina Mills", - startTime: "12:00PM", - endTime: "13:00PM",isFavorite:false) - ] + public let day2Data = [ + TimetableItem( + id: "", + title: "A Beginner's Guide to Understanding the Latest Android Technology", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Kelvin Lueilwitz"], + isFavorite:false), + TimetableItem( + id: "", + title: "How to Stay Updated on the Newest Android Technology Innovations", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Mallory Turner"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate Guide to Exploring the Latest Android Technology Features", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Clementina Mills"], + isFavorite:false) + ] - public let day3Data = [TimetableItem(room: "Arctic Fox", languages: ["EN", "JA"], - title: "Why Should You Invest in the Newest Android Technology?", - speaker: "Waldo Torp", - startTime: "12:00PM",endTime: "13:00PM",isFavorite:false), - TimetableItem(room: "Arctic Fox", languages: ["EN", "JA"], - title: "5 Ways the Newest Android Technology is Changing the Tech Industry", - speaker: "Baron Stracke", - startTime: "12:00PM",endTime: "13:00PM",isFavorite:false), - TimetableItem(room: "Arctic Fox", languages: ["EN", "JA"], - title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", - speaker: "Carole Volkman", - startTime: "12:00PM", - endTime: "13:00PM",isFavorite:false) - ] + public let day3Data = [ + TimetableItem( + id: "", + title: "Why Should You Invest in the Newest Android Technology?", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Waldo Torp"], + isFavorite:false), + TimetableItem( + id: "", + title: "5 Ways the Newest Android Technology is Changing the Tech Industry", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Baron Stracke"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Carole Volkman"], + isFavorite:false) + ] } diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index aae8d0fe6..1483e9782 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -58,8 +58,11 @@ struct ListViewItem: View { Image(systemName: listItem.isFavorite ? "heart.fill" : "heart").foregroundColor(Color.gray) } Text(listItem.title).font(.title) - PhotoView(photo:"person.circle.fill", - name: listItem.speaker) + ForEach(listItem.speakers, id: \.self){ speaker in + PhotoView(photo:"person.circle.fill", + name: speaker) + } + }.padding(10) .overlay( From f2882195de08009d8fe0701bf14820c47d60e945 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Thu, 13 Jun 2024 00:53:17 +0900 Subject: [PATCH 02/15] WIP (build broken again for unknown reasons) --- .../TimetableFeature/TimetableCore.swift | 207 +++++++++++++++++- 1 file changed, 205 insertions(+), 2 deletions(-) diff --git a/app-ios/Sources/TimetableFeature/TimetableCore.swift b/app-ios/Sources/TimetableFeature/TimetableCore.swift index 6a36e3505..da3efb808 100644 --- a/app-ios/Sources/TimetableFeature/TimetableCore.swift +++ b/app-ios/Sources/TimetableFeature/TimetableCore.swift @@ -100,8 +100,6 @@ public struct TimetableItem: Equatable, Hashable { // public abstract val speakers: PersistentList } - - public struct SampleData { public let day1Data = [ TimetableItem( @@ -204,5 +202,210 @@ public struct SampleData { speakers: ["Carole Volkman"], isFavorite:false) ] + +// public let day1Results = [ +// TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ +// TimetableItem( +// id: "", +// title: "DroidKaigiアプリで見るアーキテクチャの変遷", +// startsAt: "12:00PM", endsAt: "13:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Maria Rodriguez"], +// isFavorite:false +// ), +// TimetableItem( +// id: "", +// title: "DroidKaigiアプリで見るアーキテクチャの変遷", +// startsAt: "12:00PM", endsAt: "13:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Maria Rodriguez"], +// isFavorite:false +// ), +// TimetableItem( +// id: "", +// title: "DroidKaigiアプリで見るアーキテクチャの変遷", +// startsAt: "12:00PM", endsAt: "13:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Maria Rodriguez"], +// isFavorite:false) +// ]), +// TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ +// TimetableItem( +// id: "", +// title: "DroidKaigiアプリで見るアーキテクチャの変遷", +// startsAt: "13:00PM", endsAt: "14:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Maria Rodriguez"], +// isFavorite:false +// ), +// TimetableItem( +// id: "", +// title: "DroidKaigiアプリで見るアーキテクチャの変遷", +// startsAt: "13:00PM", endsAt: "14:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Maria Rodriguez"], +// isFavorite:false +// ), +// TimetableItem( +// id: "", +// title: "DroidKaigiアプリで見るアーキテクチャの変遷", +// startsAt: "13:00PM", endsAt: "14:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Maria Rodriguez"], +// isFavorite:false) +// ]) +// ] +// +// public let day2Results = [ +// TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ +// TimetableItem( +// id: "", +// title: "A Beginner's Guide to Understanding the Latest Android Technology", +// startsAt: "12:00PM", endsAt: "13:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Kelvin Lueilwitz"], +// isFavorite:false), +// TimetableItem( +// id: "", +// title: "How to Stay Updated on the Newest Android Technology Innovations", +// startsAt: "12:00PM", endsAt: "13:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Mallory Turner"], +// isFavorite:false), +// TimetableItem( +// id: "", +// title: "The Ultimate Guide to Exploring the Latest Android Technology Features", +// startsAt: "12:00PM", endsAt: "13:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Clementina Mills"], +// isFavorite:false) +// ]), +// TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ +// TimetableItem( +// id: "", +// title: "A Beginner's Guide to Understanding the Latest Android Technology", +// startsAt: "13:00PM", endsAt: "14:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Kelvin Lueilwitz"], +// isFavorite:false), +// TimetableItem( +// id: "", +// title: "How to Stay Updated on the Newest Android Technology Innovations", +// startsAt: "13:00PM", endsAt: "14:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Mallory Turner"], +// isFavorite:false), +// TimetableItem( +// id: "", +// title: "The Ultimate Guide to Exploring the Latest Android Technology Features", +// startsAt: "13:00PM", endsAt: "14:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Clementina Mills"], +// isFavorite:false) +// ]) +// ] +// +// public let day3Results = [ +// TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ +// TimetableItem( +// id: "", +// title: "Why Should You Invest in the Newest Android Technology?", +// startsAt: "12:00PM", endsAt: "13:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Waldo Torp"], +// isFavorite:false), +// TimetableItem( +// id: "", +// title: "5 Ways the Newest Android Technology is Changing the Tech Industry", +// startsAt: "12:00PM", endsAt: "13:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Baron Stracke"], +// isFavorite:false), +// TimetableItem( +// id: "", +// title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", +// startsAt: "12:00PM", endsAt: "13:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Carole Volkman"], +// isFavorite:false) +// ]), +// TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ +// TimetableItem( +// id: "", +// title: "Why Should You Invest in the Newest Android Technology?", +// startsAt: "13:00PM", endsAt: "14:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Waldo Torp"], +// isFavorite:false), +// TimetableItem( +// id: "", +// title: "5 Ways the Newest Android Technology is Changing the Tech Industry", +// startsAt: "13:00PM", endsAt: "14:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Baron Stracke"], +// isFavorite:false), +// TimetableItem( +// id: "", +// title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", +// startsAt: "13:00PM", endsAt: "14:00PM", +// category: "", +// sessionType: "", +// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], +// asset:"", levels: [""], +// speakers: ["Carole Volkman"], +// isFavorite:false) +// ]) +// ] } From 55b09459ecf68b7d4c863bec47525a27bacb7c87 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Fri, 14 Jun 2024 00:11:40 +0900 Subject: [PATCH 03/15] updated test data --- .../TimetableFeature/TimetableCore.swift | 438 +++++++++--------- 1 file changed, 219 insertions(+), 219 deletions(-) diff --git a/app-ios/Sources/TimetableFeature/TimetableCore.swift b/app-ios/Sources/TimetableFeature/TimetableCore.swift index da3efb808..cf3287cfd 100644 --- a/app-ios/Sources/TimetableFeature/TimetableCore.swift +++ b/app-ios/Sources/TimetableFeature/TimetableCore.swift @@ -52,21 +52,21 @@ public enum DayTab: String, CaseIterable, Identifiable { case day3 = "Day3" } -//public struct TimetableTimeGroupItems: Identifiable, Equatable, Hashable { -// public var id: String { -// UUID().uuidString -// } -// -// public var startsTimeString: String -// public var endsTimeString: String -// public var items: [TimetableItem] -// -// public init(startsTimeString: String, endsTimeString: String, items: [TimetableItem]) { -// self.startsTimeString = startsTimeString -// self.endsTimeString = endsTimeString -// self.items = items -// } -//} +public struct TimetableTimeGroupItems: Identifiable, Equatable, Hashable { + public var id: String { + UUID().uuidString + } + + public var startsTimeString: String + public var endsTimeString: String + public var items: [TimetableItem] + + public init(startsTimeString: String, endsTimeString: String, items: [TimetableItem]) { + self.startsTimeString = startsTimeString + self.endsTimeString = endsTimeString + self.items = items + } +} public struct TimetableItem: Equatable, Hashable { let id: String //Not used yet @@ -203,209 +203,209 @@ public struct SampleData { isFavorite:false) ] -// public let day1Results = [ -// TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ -// TimetableItem( -// id: "", -// title: "DroidKaigiアプリで見るアーキテクチャの変遷", -// startsAt: "12:00PM", endsAt: "13:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Maria Rodriguez"], -// isFavorite:false -// ), -// TimetableItem( -// id: "", -// title: "DroidKaigiアプリで見るアーキテクチャの変遷", -// startsAt: "12:00PM", endsAt: "13:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Maria Rodriguez"], -// isFavorite:false -// ), -// TimetableItem( -// id: "", -// title: "DroidKaigiアプリで見るアーキテクチャの変遷", -// startsAt: "12:00PM", endsAt: "13:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Maria Rodriguez"], -// isFavorite:false) -// ]), -// TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ -// TimetableItem( -// id: "", -// title: "DroidKaigiアプリで見るアーキテクチャの変遷", -// startsAt: "13:00PM", endsAt: "14:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Maria Rodriguez"], -// isFavorite:false -// ), -// TimetableItem( -// id: "", -// title: "DroidKaigiアプリで見るアーキテクチャの変遷", -// startsAt: "13:00PM", endsAt: "14:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Maria Rodriguez"], -// isFavorite:false -// ), -// TimetableItem( -// id: "", -// title: "DroidKaigiアプリで見るアーキテクチャの変遷", -// startsAt: "13:00PM", endsAt: "14:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Maria Rodriguez"], -// isFavorite:false) -// ]) -// ] -// -// public let day2Results = [ -// TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ -// TimetableItem( -// id: "", -// title: "A Beginner's Guide to Understanding the Latest Android Technology", -// startsAt: "12:00PM", endsAt: "13:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Kelvin Lueilwitz"], -// isFavorite:false), -// TimetableItem( -// id: "", -// title: "How to Stay Updated on the Newest Android Technology Innovations", -// startsAt: "12:00PM", endsAt: "13:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Mallory Turner"], -// isFavorite:false), -// TimetableItem( -// id: "", -// title: "The Ultimate Guide to Exploring the Latest Android Technology Features", -// startsAt: "12:00PM", endsAt: "13:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Clementina Mills"], -// isFavorite:false) -// ]), -// TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ -// TimetableItem( -// id: "", -// title: "A Beginner's Guide to Understanding the Latest Android Technology", -// startsAt: "13:00PM", endsAt: "14:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Kelvin Lueilwitz"], -// isFavorite:false), -// TimetableItem( -// id: "", -// title: "How to Stay Updated on the Newest Android Technology Innovations", -// startsAt: "13:00PM", endsAt: "14:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Mallory Turner"], -// isFavorite:false), -// TimetableItem( -// id: "", -// title: "The Ultimate Guide to Exploring the Latest Android Technology Features", -// startsAt: "13:00PM", endsAt: "14:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Clementina Mills"], -// isFavorite:false) -// ]) -// ] -// -// public let day3Results = [ -// TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ -// TimetableItem( -// id: "", -// title: "Why Should You Invest in the Newest Android Technology?", -// startsAt: "12:00PM", endsAt: "13:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Waldo Torp"], -// isFavorite:false), -// TimetableItem( -// id: "", -// title: "5 Ways the Newest Android Technology is Changing the Tech Industry", -// startsAt: "12:00PM", endsAt: "13:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Baron Stracke"], -// isFavorite:false), -// TimetableItem( -// id: "", -// title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", -// startsAt: "12:00PM", endsAt: "13:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Carole Volkman"], -// isFavorite:false) -// ]), -// TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ -// TimetableItem( -// id: "", -// title: "Why Should You Invest in the Newest Android Technology?", -// startsAt: "13:00PM", endsAt: "14:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Waldo Torp"], -// isFavorite:false), -// TimetableItem( -// id: "", -// title: "5 Ways the Newest Android Technology is Changing the Tech Industry", -// startsAt: "13:00PM", endsAt: "14:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Baron Stracke"], -// isFavorite:false), -// TimetableItem( -// id: "", -// title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", -// startsAt: "13:00PM", endsAt: "14:00PM", -// category: "", -// sessionType: "", -// room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], -// asset:"", levels: [""], -// speakers: ["Carole Volkman"], -// isFavorite:false) -// ]) -// ] + public let day1Results = [ + TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false) + ]), + TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: "13:00PM", endsAt: "14:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: "13:00PM", endsAt: "14:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: "13:00PM", endsAt: "14:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false) + ]) + ] + + public let day2Results = [ + TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ + TimetableItem( + id: "", + title: "A Beginner's Guide to Understanding the Latest Android Technology", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Kelvin Lueilwitz"], + isFavorite:false), + TimetableItem( + id: "", + title: "How to Stay Updated on the Newest Android Technology Innovations", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Mallory Turner"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate Guide to Exploring the Latest Android Technology Features", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Clementina Mills"], + isFavorite:false) + ]), + TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ + TimetableItem( + id: "", + title: "A Beginner's Guide to Understanding the Latest Android Technology", + startsAt: "13:00PM", endsAt: "14:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Kelvin Lueilwitz"], + isFavorite:false), + TimetableItem( + id: "", + title: "How to Stay Updated on the Newest Android Technology Innovations", + startsAt: "13:00PM", endsAt: "14:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Mallory Turner"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate Guide to Exploring the Latest Android Technology Features", + startsAt: "13:00PM", endsAt: "14:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Clementina Mills"], + isFavorite:false) + ]) + ] + + public let day3Results = [ + TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ + TimetableItem( + id: "", + title: "Why Should You Invest in the Newest Android Technology?", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Waldo Torp"], + isFavorite:false), + TimetableItem( + id: "", + title: "5 Ways the Newest Android Technology is Changing the Tech Industry", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Baron Stracke"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", + startsAt: "12:00PM", endsAt: "13:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Carole Volkman"], + isFavorite:false) + ]), + TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ + TimetableItem( + id: "", + title: "Why Should You Invest in the Newest Android Technology?", + startsAt: "13:00PM", endsAt: "14:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Waldo Torp"], + isFavorite:false), + TimetableItem( + id: "", + title: "5 Ways the Newest Android Technology is Changing the Tech Industry", + startsAt: "13:00PM", endsAt: "14:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Baron Stracke"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", + startsAt: "13:00PM", endsAt: "14:00PM", + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Carole Volkman"], + isFavorite:false) + ]) + ] } From 1f3ea33533a808d291775cd772ff8ec38a566095 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Fri, 14 Jun 2024 00:34:35 +0900 Subject: [PATCH 04/15] Updated layout to handle date grouping properly. Still needs layout adjustments. --- .../TimetableFeature/TimetableCore.swift | 12 +++---- .../TimetableFeature/TimetableListView.swift | 31 ++++++++++++++++--- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/app-ios/Sources/TimetableFeature/TimetableCore.swift b/app-ios/Sources/TimetableFeature/TimetableCore.swift index cf3287cfd..bee5357ef 100644 --- a/app-ios/Sources/TimetableFeature/TimetableCore.swift +++ b/app-ios/Sources/TimetableFeature/TimetableCore.swift @@ -7,9 +7,9 @@ public struct TimetableReducer { @ObservableState public struct State: Equatable { - var timetableItems: [TimetableItem] = [] //Should be simple objects + var timetableItems: [TimetableTimeGroupItems] = [] //Should be simple objects - public init(timetableItems: [TimetableItem]? = []) { + public init(timetableItems: [TimetableTimeGroupItems]? = []) { self.timetableItems = timetableItems ?? [] } } @@ -23,20 +23,20 @@ public struct TimetableReducer { Reduce { state, action in switch action { case .onAppear: - state.timetableItems = SampleData.init().day1Data + state.timetableItems = SampleData.init().day1Results return .none case .selectDay(let dayTab): //TODO: Replace with real data switch dayTab { case .day1: - state.timetableItems = SampleData.init().day1Data + state.timetableItems = SampleData.init().day1Results return .none case .day2: - state.timetableItems = SampleData.init().day2Data + state.timetableItems = SampleData.init().day2Results return .none case .day3: - state.timetableItems = SampleData.init().day3Data + state.timetableItems = SampleData.init().day3Results return .none } } diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index 1483e9782..8f293216c 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -15,6 +15,7 @@ public struct TimetableView: View { Button(action: { store.send(.selectDay(tabItem)) }, label: { + //TODO: Only selected button should be green and underlined Text(tabItem.rawValue).foregroundColor(.green) .underline() }) @@ -35,8 +36,10 @@ public struct TimetableListView: View { } public var body: some View { - ForEach(store.timetableItems, id: \.self) { item in - ListViewItem(listItem: item) + List { + ForEach(store.timetableItems, id: \.self) { item in + TimeGroupMiniList(contents: item) + } } .onAppear { store.send(.onAppear) @@ -44,6 +47,26 @@ public struct TimetableListView: View { } } +struct TimeGroupMiniList: View { + let contents: TimetableTimeGroupItems + + public var body: some View { + HStack { + VStack { + Text(contents.startsTimeString) + Text("|") + Text(contents.endsTimeString) + Spacer() + } + VStack { + ForEach(contents.items, id: \.self) { item in + ListViewItem(listItem: item) + } + } + } + } +} + struct ListViewItem: View { let listItem: TimetableItem @@ -101,7 +124,7 @@ struct PhotoView: View { #Preview { TimetableView( - store: .init(initialState: .init(timetableItems: SampleData.init().day1Data), + store: .init(initialState: .init(timetableItems: SampleData.init().day1Results), reducer: { TimetableReducer() }) ) } @@ -110,7 +133,7 @@ struct PhotoView: View { TimetableListView( store: .init( initialState: - .init(timetableItems: SampleData.init().day1Data), + .init(timetableItems: SampleData.init().day1Results), reducer: { TimetableReducer() } ) ) From 7e7e144a7575d0679da9064c0c0aa86a21df18c1 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Sat, 15 Jun 2024 01:10:25 +0900 Subject: [PATCH 05/15] WIP (adding real colors) --- .../Contents.json | 38 +++++++++++++++++++ .../Button.colorset.colorset/Contents.json | 38 +++++++++++++++++++ .../Resource/Media.xcassets/Contents.json | 6 +++ .../Contents.json | 38 +++++++++++++++++++ .../Contents.json | 38 +++++++++++++++++++ .../Contents.json | 38 +++++++++++++++++++ .../Outline.colorset.colorset/Contents.json | 38 +++++++++++++++++++ .../Primary.colorset.colorset/Contents.json | 38 +++++++++++++++++++ .../Contents.json | 38 +++++++++++++++++++ .../Contents.json | 38 +++++++++++++++++++ .../Contents.json | 38 +++++++++++++++++++ .../TimetableFeature/TimetableListView.swift | 4 +- 12 files changed, 389 insertions(+), 1 deletion(-) create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Background.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Button.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/On Primary.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/On Surface.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Outline Variant.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Outline.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Primary.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Secondary Container.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Surface Container.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Surface Variant.colorset.colorset/Contents.json diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Background.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Background.colorset.colorset/Contents.json new file mode 100644 index 000000000..d8ad65ab7 --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Background.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x04", + "green" : "0x20", + "red" : "0x24" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x04", + "green" : "0x20", + "red" : "0x24" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Button.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Button.colorset.colorset/Contents.json new file mode 100644 index 000000000..aeab1a258 --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Button.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBB", + "green" : "0xD6", + "red" : "0xDA" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBB", + "green" : "0xD6", + "red" : "0xDA" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/On Primary.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/On Primary.colorset.colorset/Contents.json new file mode 100644 index 000000000..cacd7a9fa --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/On Primary.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x38", + "red" : "0x28" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x38", + "red" : "0x28" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/On Surface.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/On Surface.colorset.colorset/Contents.json new file mode 100644 index 000000000..41014040d --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/On Surface.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xC5", + "green" : "0xC7", + "red" : "0xC4" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xC5", + "green" : "0xC7", + "red" : "0xC4" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Outline Variant.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Outline Variant.colorset.colorset/Contents.json new file mode 100644 index 000000000..e93b7bb65 --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Outline Variant.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x40", + "green" : "0x49", + "red" : "0x44" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x40", + "green" : "0x49", + "red" : "0x44" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Outline.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Outline.colorset.colorset/Contents.json new file mode 100644 index 000000000..ec50c164f --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Outline.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x89", + "green" : "0x93", + "red" : "0x8D" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x89", + "green" : "0x93", + "red" : "0x8D" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Primary.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Primary.colorset.colorset/Contents.json new file mode 100644 index 000000000..8fe87e31e --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Primary.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x61", + "green" : "0xDC", + "red" : "0xB0" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x61", + "green" : "0xDC", + "red" : "0xB0" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Secondary Container.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Secondary Container.colorset.colorset/Contents.json new file mode 100644 index 000000000..06ce1fea2 --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Secondary Container.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x35", + "green" : "0x4B", + "red" : "0x41" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x35", + "green" : "0x4B", + "red" : "0x41" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Surface Container.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Surface Container.colorset.colorset/Contents.json new file mode 100644 index 000000000..29ea793e3 --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Surface Container.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1D", + "green" : "0x20", + "red" : "0x1E" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1D", + "green" : "0x20", + "red" : "0x1E" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Surface Variant.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Surface Variant.colorset.colorset/Contents.json new file mode 100644 index 000000000..cd5e7e14d --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Surface Variant.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "191", + "green" : "201", + "red" : "194" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "191", + "green" : "201", + "red" : "194" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index 8f293216c..4ccb86dbe 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -9,7 +9,7 @@ public struct TimetableView: View { } public var body: some View { - VStack { + VStack() { HStack { ForEach(DayTab.allCases) { tabItem in Button(action: { @@ -25,6 +25,8 @@ public struct TimetableView: View { TimetableListView(store: store) Spacer() } + .background(Color(.backgroundColorset)) + .frame(maxWidth: .infinity) } } From 05a550e5f18ea3724906ab8bc1e5816957df27bc Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Sat, 15 Jun 2024 12:14:51 +0900 Subject: [PATCH 06/15] Fixed basic colors --- .../TimetableFeature/TimetableListView.swift | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index 4ccb86dbe..d0f341f1a 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -38,13 +38,16 @@ public struct TimetableListView: View { } public var body: some View { - List { - ForEach(store.timetableItems, id: \.self) { item in - TimeGroupMiniList(contents: item) - } - } - .onAppear { - store.send(.onAppear) + ScrollView{ + LazyVStack { + ForEach(store.timetableItems, id: \.self) { item in + TimeGroupMiniList(contents: item) + } + }.scrollContentBackground(.hidden) + + .onAppear { + store.send(.onAppear) + }.background(Color(.backgroundColorset)) } } } @@ -59,13 +62,14 @@ struct TimeGroupMiniList: View { Text("|") Text(contents.endsTimeString) Spacer() - } + }.foregroundColor(Color(.onSurfaceColorset)) VStack { ForEach(contents.items, id: \.self) { item in ListViewItem(listItem: item) } } - } + }.background(Color.clear) + } } @@ -80,7 +84,7 @@ struct ListViewItem: View { TagView(tagText: lang, highlight: false) } Spacer() - Image(systemName: listItem.isFavorite ? "heart.fill" : "heart").foregroundColor(Color.gray) + Image(systemName: listItem.isFavorite ? "heart.fill" : "heart").foregroundColor(Color(.onSurfaceColorset)) } Text(listItem.title).font(.title) ForEach(listItem.speakers, id: \.self){ speaker in @@ -89,10 +93,10 @@ struct ListViewItem: View { } - }.padding(10) + }.foregroundColor(Color(.onSurfaceColorset)).padding(10) .overlay( RoundedRectangle(cornerRadius: 5) - .stroke(Color.gray, lineWidth: 1) + .stroke(Color(.onSurfaceColorset), lineWidth: 1) ) } } @@ -106,8 +110,8 @@ struct TagView: View { Image(systemName: "diamond.fill").resizable().frame(width: 11,height: 11).foregroundColor(.green) .padding(-3) } - Text(tagText).foregroundColor (highlight ? Color.green : Color.gray) - }.padding(EdgeInsets(top: 2,leading: 7,bottom: 2,trailing: 7)).border(highlight ? Color.green : Color.gray).padding(-2) + Text(tagText).foregroundColor (highlight ? Color.green : Color(.onSurfaceColorset)) + }.padding(EdgeInsets(top: 2,leading: 7,bottom: 2,trailing: 7)).border(highlight ? Color.green : Color(.onSurfaceColorset)).padding(-2) } } From bd6d4277c1788b2da4778d193324a57bf1ba6cf5 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Sat, 15 Jun 2024 12:18:04 +0900 Subject: [PATCH 07/15] Minor layout fixes --- app-ios/Sources/TimetableFeature/TimetableListView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index d0f341f1a..5b6ed1fbf 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -62,7 +62,7 @@ struct TimeGroupMiniList: View { Text("|") Text(contents.endsTimeString) Spacer() - }.foregroundColor(Color(.onSurfaceColorset)) + }.padding(10).foregroundColor(Color(.onSurfaceColorset)) VStack { ForEach(contents.items, id: \.self) { item in ListViewItem(listItem: item) From a864ca1545d06a915fce3f447d895f88f1ac7d29 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 16 Jun 2024 22:23:31 +0900 Subject: [PATCH 08/15] Update app-ios/Sources/TimetableFeature/TimetableListView.swift Co-authored-by: Hiroya Hinomori --- app-ios/Sources/TimetableFeature/TimetableListView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index 5b6ed1fbf..002ca1cb3 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -9,7 +9,7 @@ public struct TimetableView: View { } public var body: some View { - VStack() { + VStack { HStack { ForEach(DayTab.allCases) { tabItem in Button(action: { From b4fdc4658ccac4ddbf5c95b2991da84e39b5c635 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Sun, 16 Jun 2024 23:03:13 +0900 Subject: [PATCH 09/15] Addressed problems brought up in pull request review. --- .../Sources/TimetableFeature/SampleData.swift | 276 +++++++++++++ .../TimetableFeature/TimetableCore.swift | 363 ------------------ .../TimetableFeature/TimetableListView.swift | 8 +- 3 files changed, 282 insertions(+), 365 deletions(-) create mode 100644 app-ios/Sources/TimetableFeature/SampleData.swift diff --git a/app-ios/Sources/TimetableFeature/SampleData.swift b/app-ios/Sources/TimetableFeature/SampleData.swift new file mode 100644 index 000000000..1a9fbb98f --- /dev/null +++ b/app-ios/Sources/TimetableFeature/SampleData.swift @@ -0,0 +1,276 @@ +// +// File.swift +// +// +// Created by CHARLES BOND on 2024/06/16. +// + +import Foundation + +public enum DayTab: String, CaseIterable, Identifiable { + public var id : RawValue { rawValue } + + case day1 = "Day1" + case day2 = "Day2" + case day3 = "Day3" +} + +public struct TimetableTimeGroupItems: Identifiable, Equatable, Hashable { + public var id: String { + UUID().uuidString + } + + public let startsTimeString: String + public let endsTimeString: String + public let items: [TimetableItem] + + public init(startsTimeString: String, endsTimeString: String, items: [TimetableItem]) { + self.startsTimeString = startsTimeString + self.endsTimeString = endsTimeString + self.items = items + } +} + +public struct TimetableItem: Equatable, Hashable { + let id: String //Not used yet + let title: String + let startsAt: Date + let endsAt: Date + let category: String + let sessionType: String + let room: String + let targetAudience: String + let languages: [String] + let asset: String + let levels: [String] + let speakers: [String] + + let isFavorite: Bool + + //TODO: This object is likely to change a lot when we get live data changes +} + +public struct SampleData { + public let day1Results = [ + TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: try! Date("2024-09-11T12:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-11T13:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: try! Date("2024-09-11T12:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-11T13:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: try! Date("2024-09-11T12:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-11T13:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false) + ]), + TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: try! Date("2024-09-11T13:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-11T14:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: try! Date("2024-09-11T13:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-11T14:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false + ), + TimetableItem( + id: "", + title: "DroidKaigiアプリで見るアーキテクチャの変遷", + startsAt: try! Date("2024-09-11T13:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-11T14:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Maria Rodriguez"], + isFavorite:false) + ]) + ] + + public let day2Results = [ + TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ + TimetableItem( + id: "", + title: "A Beginner's Guide to Understanding the Latest Android Technology", + startsAt: try! Date("2024-09-12T12:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-12T13:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Kelvin Lueilwitz"], + isFavorite:false), + TimetableItem( + id: "", + title: "How to Stay Updated on the Newest Android Technology Innovations", + startsAt: try! Date("2024-09-12T12:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-12T13:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Mallory Turner"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate Guide to Exploring the Latest Android Technology Features", + startsAt: try! Date("2024-09-12T12:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-12T13:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Clementina Mills"], + isFavorite:false) + ]), + TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ + TimetableItem( + id: "", + title: "A Beginner's Guide to Understanding the Latest Android Technology", + startsAt: try! Date("2024-09-12T13:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-12T14:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Kelvin Lueilwitz"], + isFavorite:false), + TimetableItem( + id: "", + title: "How to Stay Updated on the Newest Android Technology Innovations", + startsAt: try! Date("2024-09-12T13:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-12T14:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Mallory Turner"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate Guide to Exploring the Latest Android Technology Features", + startsAt: try! Date("2024-09-12T13:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-12T14:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Clementina Mills"], + isFavorite:false) + ]) + ] + + public let day3Results = [ + TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ + TimetableItem( + id: "", + title: "Why Should You Invest in the Newest Android Technology?", + startsAt: try! Date("2024-09-13T12:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-13T13:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Waldo Torp"], + isFavorite:false), + TimetableItem( + id: "", + title: "5 Ways the Newest Android Technology is Changing the Tech Industry", + startsAt: try! Date("2024-09-13T12:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-13T13:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Baron Stracke"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", + startsAt: try! Date("2024-09-13T12:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-13T13:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Carole Volkman"], + isFavorite:false) + ]), + TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ + TimetableItem( + id: "", + title: "Why Should You Invest in the Newest Android Technology?", + startsAt: try! Date("2024-09-13T13:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-13T14:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Waldo Torp"], + isFavorite:false), + TimetableItem( + id: "", + title: "5 Ways the Newest Android Technology is Changing the Tech Industry", + startsAt: try! Date("2024-09-13T13:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-13T14:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Baron Stracke"], + isFavorite:false), + TimetableItem( + id: "", + title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", + startsAt: try! Date("2024-09-13T13:00:00Z", strategy: .iso8601), + endsAt: try! Date("2024-09-13T14:00:00Z", strategy: .iso8601), + category: "", + sessionType: "", + room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], + asset:"", levels: [""], + speakers: ["Carole Volkman"], + isFavorite:false) + ]) + ] +} diff --git a/app-ios/Sources/TimetableFeature/TimetableCore.swift b/app-ios/Sources/TimetableFeature/TimetableCore.swift index bee5357ef..48be187f6 100644 --- a/app-ios/Sources/TimetableFeature/TimetableCore.swift +++ b/app-ios/Sources/TimetableFeature/TimetableCore.swift @@ -44,368 +44,5 @@ public struct TimetableReducer { } } -public enum DayTab: String, CaseIterable, Identifiable { - public var id : RawValue { rawValue } - - case day1 = "Day1" - case day2 = "Day2" - case day3 = "Day3" -} - -public struct TimetableTimeGroupItems: Identifiable, Equatable, Hashable { - public var id: String { - UUID().uuidString - } - public var startsTimeString: String - public var endsTimeString: String - public var items: [TimetableItem] - - public init(startsTimeString: String, endsTimeString: String, items: [TimetableItem]) { - self.startsTimeString = startsTimeString - self.endsTimeString = endsTimeString - self.items = items - } -} - -public struct TimetableItem: Equatable, Hashable { - let id: String //Not used yet - let title: String - let startsAt: String - let endsAt: String - let category: String - let sessionType: String - let room: String - let targetAudience: String - let languages: [String] - let asset: String - let levels: [String] - let speakers: [String] - - let isFavorite: Bool - - - // TODO: The actual class will look more like this -// public abstract val id: TimetableItemId -// public abstract val title: MultiLangText -// public abstract val startsAt: Instant -// public abstract val endsAt: Instant -// public abstract val category: TimetableCategory -// public abstract val sessionType: TimetableSessionType -// public abstract val room: TimetableRoom -// public abstract val targetAudience: String -// public abstract val language: TimetableLanguage -// public abstract val asset: TimetableAsset -// public abstract val levels: PersistentList -// public abstract val speakers: PersistentList -} - -public struct SampleData { - public let day1Data = [ - TimetableItem( - id: "", - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Maria Rodriguez"], - isFavorite:false - ), - TimetableItem( - id: "", - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Maria Rodriguez"], - isFavorite:false - ), - TimetableItem( - id: "", - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Maria Rodriguez"], - - isFavorite:false) - ] - - public let day2Data = [ - TimetableItem( - id: "", - title: "A Beginner's Guide to Understanding the Latest Android Technology", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Kelvin Lueilwitz"], - isFavorite:false), - TimetableItem( - id: "", - title: "How to Stay Updated on the Newest Android Technology Innovations", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Mallory Turner"], - isFavorite:false), - TimetableItem( - id: "", - title: "The Ultimate Guide to Exploring the Latest Android Technology Features", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Clementina Mills"], - isFavorite:false) - ] - - public let day3Data = [ - TimetableItem( - id: "", - title: "Why Should You Invest in the Newest Android Technology?", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Waldo Torp"], - isFavorite:false), - TimetableItem( - id: "", - title: "5 Ways the Newest Android Technology is Changing the Tech Industry", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Baron Stracke"], - isFavorite:false), - TimetableItem( - id: "", - title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Carole Volkman"], - isFavorite:false) - ] - - public let day1Results = [ - TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ - TimetableItem( - id: "", - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Maria Rodriguez"], - isFavorite:false - ), - TimetableItem( - id: "", - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Maria Rodriguez"], - isFavorite:false - ), - TimetableItem( - id: "", - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Maria Rodriguez"], - isFavorite:false) - ]), - TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ - TimetableItem( - id: "", - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - startsAt: "13:00PM", endsAt: "14:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Maria Rodriguez"], - isFavorite:false - ), - TimetableItem( - id: "", - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - startsAt: "13:00PM", endsAt: "14:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Maria Rodriguez"], - isFavorite:false - ), - TimetableItem( - id: "", - title: "DroidKaigiアプリで見るアーキテクチャの変遷", - startsAt: "13:00PM", endsAt: "14:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Maria Rodriguez"], - isFavorite:false) - ]) - ] - - public let day2Results = [ - TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ - TimetableItem( - id: "", - title: "A Beginner's Guide to Understanding the Latest Android Technology", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Kelvin Lueilwitz"], - isFavorite:false), - TimetableItem( - id: "", - title: "How to Stay Updated on the Newest Android Technology Innovations", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Mallory Turner"], - isFavorite:false), - TimetableItem( - id: "", - title: "The Ultimate Guide to Exploring the Latest Android Technology Features", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Clementina Mills"], - isFavorite:false) - ]), - TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ - TimetableItem( - id: "", - title: "A Beginner's Guide to Understanding the Latest Android Technology", - startsAt: "13:00PM", endsAt: "14:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Kelvin Lueilwitz"], - isFavorite:false), - TimetableItem( - id: "", - title: "How to Stay Updated on the Newest Android Technology Innovations", - startsAt: "13:00PM", endsAt: "14:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Mallory Turner"], - isFavorite:false), - TimetableItem( - id: "", - title: "The Ultimate Guide to Exploring the Latest Android Technology Features", - startsAt: "13:00PM", endsAt: "14:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Clementina Mills"], - isFavorite:false) - ]) - ] - - public let day3Results = [ - TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ - TimetableItem( - id: "", - title: "Why Should You Invest in the Newest Android Technology?", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Waldo Torp"], - isFavorite:false), - TimetableItem( - id: "", - title: "5 Ways the Newest Android Technology is Changing the Tech Industry", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Baron Stracke"], - isFavorite:false), - TimetableItem( - id: "", - title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", - startsAt: "12:00PM", endsAt: "13:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Carole Volkman"], - isFavorite:false) - ]), - TimetableTimeGroupItems(startsTimeString:"13:00", endsTimeString:"14:00", items: [ - TimetableItem( - id: "", - title: "Why Should You Invest in the Newest Android Technology?", - startsAt: "13:00PM", endsAt: "14:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Waldo Torp"], - isFavorite:false), - TimetableItem( - id: "", - title: "5 Ways the Newest Android Technology is Changing the Tech Industry", - startsAt: "13:00PM", endsAt: "14:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Baron Stracke"], - isFavorite:false), - TimetableItem( - id: "", - title: "The Ultimate List of Resources for Learning More About the Latest Android Technology", - startsAt: "13:00PM", endsAt: "14:00PM", - category: "", - sessionType: "", - room: "Arctic Fox", targetAudience: "", languages: ["EN", "JA"], - asset:"", levels: [""], - speakers: ["Carole Volkman"], - isFavorite:false) - ]) - ] -} diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index 5b6ed1fbf..02a030818 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -110,8 +110,12 @@ struct TagView: View { Image(systemName: "diamond.fill").resizable().frame(width: 11,height: 11).foregroundColor(.green) .padding(-3) } - Text(tagText).foregroundColor (highlight ? Color.green : Color(.onSurfaceColorset)) - }.padding(EdgeInsets(top: 2,leading: 7,bottom: 2,trailing: 7)).border(highlight ? Color.green : Color(.onSurfaceColorset)).padding(-2) + Text(tagText).foregroundColor(highlight ? Color.green : Color(.onSurfaceColorset)) + } + .padding( + EdgeInsets(top: 2,leading: 7, bottom: 2, trailing: 7)) + .border(highlight ? Color.green : Color(.onSurfaceColorset)) + .padding(-2) } } From a905d7a2050909cfbc7b74ba63c0cf91bb7ba3f7 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Mon, 17 Jun 2024 23:24:20 +0900 Subject: [PATCH 10/15] Responded to pull request comments --- app-ios/Sources/TimetableFeature/TimetableCore.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app-ios/Sources/TimetableFeature/TimetableCore.swift b/app-ios/Sources/TimetableFeature/TimetableCore.swift index 48be187f6..8c97eb711 100644 --- a/app-ios/Sources/TimetableFeature/TimetableCore.swift +++ b/app-ios/Sources/TimetableFeature/TimetableCore.swift @@ -9,8 +9,8 @@ public struct TimetableReducer { public struct State: Equatable { var timetableItems: [TimetableTimeGroupItems] = [] //Should be simple objects - public init(timetableItems: [TimetableTimeGroupItems]? = []) { - self.timetableItems = timetableItems ?? [] + public init(timetableItems: [TimetableTimeGroupItems] = []) { + self.timetableItems = timetableItems } } From 5221c866123df90c21fe7c467468d516fe3da205 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 18 Jun 2024 21:25:20 +0900 Subject: [PATCH 11/15] Update app-ios/Sources/TimetableFeature/TimetableListView.swift Co-authored-by: Usuda Shin <59346949+shin-usu@users.noreply.github.com> --- app-ios/Sources/TimetableFeature/TimetableListView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index c796e75be..7857836b1 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -62,7 +62,7 @@ struct TimeGroupMiniList: View { Text("|") Text(contents.endsTimeString) Spacer() - }.padding(10).foregroundColor(Color(.onSurfaceColorset)) + }.padding(10).foregroundStyle(Color(.onSurfaceColorset)) VStack { ForEach(contents.items, id: \.self) { item in ListViewItem(listItem: item) From 30ddc0ee88090236d1efe5997c322064e5f954e8 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Tue, 18 Jun 2024 22:14:27 +0900 Subject: [PATCH 12/15] responded to pull request comments. --- .../Contents.json | 38 +++++++++++++++++++ .../Contents.json | 38 +++++++++++++++++++ .../Contents.json | 38 +++++++++++++++++++ .../Contents.json | 38 +++++++++++++++++++ .../TimetableFeature/TimetableListView.swift | 10 ++--- ...tableCore.swift => TimetableReducer.swift} | 0 .../Tests/TimetableTests/TimetableTests.swift | 2 +- 7 files changed, 158 insertions(+), 6 deletions(-) create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Green Select.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Orange Select.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Purple Select.colorset.colorset/Contents.json create mode 100644 app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Yellow Select.colorset.colorset/Contents.json rename app-ios/Sources/TimetableFeature/{TimetableCore.swift => TimetableReducer.swift} (100%) diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Green Select.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Green Select.colorset.colorset/Contents.json new file mode 100644 index 000000000..023079bf8 --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Green Select.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x61", + "green" : "0xE7", + "red" : "0x45" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x61", + "green" : "0xE7", + "red" : "0x45" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Orange Select.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Orange Select.colorset.colorset/Contents.json new file mode 100644 index 000000000..1dd98ec3b --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Orange Select.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x4B", + "green" : "0x97", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x4B", + "green" : "0x97", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Purple Select.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Purple Select.colorset.colorset/Contents.json new file mode 100644 index 000000000..69a6c4c3a --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Purple Select.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0x85", + "red" : "0xBB" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0x85", + "red" : "0xBB" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Yellow Select.colorset.colorset/Contents.json b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Yellow Select.colorset.colorset/Contents.json new file mode 100644 index 000000000..21d78d2c9 --- /dev/null +++ b/app-ios/Sources/TimetableFeature/Resource/Media.xcassets/Yellow Select.colorset.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3C", + "green" : "0xD3", + "red" : "0xDD" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3C", + "green" : "0xD3", + "red" : "0xDD" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index c796e75be..4176bcf9c 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -16,7 +16,7 @@ public struct TimetableView: View { store.send(.selectDay(tabItem)) }, label: { //TODO: Only selected button should be green and underlined - Text(tabItem.rawValue).foregroundColor(.green) + Text(tabItem.rawValue).foregroundColor(Color(.greenSelectColorset)) .underline() }) } @@ -107,14 +107,14 @@ struct TagView: View { public var body: some View { HStack { if highlight { - Image(systemName: "diamond.fill").resizable().frame(width: 11,height: 11).foregroundColor(.green) + Image(systemName: "diamond.fill").resizable().frame(width: 11,height: 11).foregroundColor(Color(.greenSelectColorset)) .padding(-3) } - Text(tagText).foregroundColor(highlight ? Color.green : Color(.onSurfaceColorset)) + Text(tagText).foregroundColor(highlight ? Color(.greenSelectColorset) : Color(.onSurfaceColorset)) } .padding( EdgeInsets(top: 2,leading: 7, bottom: 2, trailing: 7)) - .border(highlight ? Color.green : Color(.onSurfaceColorset)) + .border(highlight ? Color(.greenSelectColorset) : Color(.onSurfaceColorset)) .padding(-2) } } @@ -126,7 +126,7 @@ struct PhotoView: View { public var body: some View { HStack { - Image(systemName:photo).resizable().frame(width: 32,height: 32).foregroundColor(.green) + Image(systemName:photo).resizable().frame(width: 32,height: 32).foregroundColor(Color(.greenSelectColorset)) Text(name) } } diff --git a/app-ios/Sources/TimetableFeature/TimetableCore.swift b/app-ios/Sources/TimetableFeature/TimetableReducer.swift similarity index 100% rename from app-ios/Sources/TimetableFeature/TimetableCore.swift rename to app-ios/Sources/TimetableFeature/TimetableReducer.swift diff --git a/app-ios/Tests/TimetableTests/TimetableTests.swift b/app-ios/Tests/TimetableTests/TimetableTests.swift index a34fa03fd..382dbe5ff 100644 --- a/app-ios/Tests/TimetableTests/TimetableTests.swift +++ b/app-ios/Tests/TimetableTests/TimetableTests.swift @@ -8,7 +8,7 @@ final class TimetableTests: XCTestCase { TimetableReducer() } await store.send(.onAppear) { - $0.timetableItems = SampleData.init().day1Data + $0.timetableItems = SampleData.init().day1Results } } } From d0bd648710d6129977fb79839b616a4611944c12 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Fri, 21 Jun 2024 00:18:54 +0900 Subject: [PATCH 13/15] pull request fixes. --- app-ios/Package.resolved | 119 +++++++++++++++++- .../Sources/TimetableFeature/SampleData.swift | 9 +- 2 files changed, 119 insertions(+), 9 deletions(-) diff --git a/app-ios/Package.resolved b/app-ios/Package.resolved index deb99f4e2..d9da7f803 100644 --- a/app-ios/Package.resolved +++ b/app-ios/Package.resolved @@ -1,6 +1,24 @@ { - "originHash" : "afca4b8d5816f3c4c5b6379bf8d871bbb7b24b7dc679c5d99474b4d2430552e3", + "originHash" : "fc296cbf51ba156d83c222f42852e5fa16b6bcd01ef05b8c01c34d58995a19e3", "pins" : [ + { + "identity" : "abseil-cpp-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/abseil-cpp-binary.git", + "state" : { + "revision" : "748c7837511d0e6a507737353af268484e1745e2", + "version" : "1.2024011601.1" + } + }, + { + "identity" : "app-check", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/app-check.git", + "state" : { + "revision" : "076b241a625e25eac22f8849be256dfb960fcdfe", + "version" : "10.19.1" + } + }, { "identity" : "combine-schedulers", "kind" : "remoteSourceControl", @@ -10,6 +28,96 @@ "version" : "1.0.0" } }, + { + "identity" : "firebase-ios-sdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/firebase-ios-sdk.git", + "state" : { + "revision" : "9d17b500cd98d9a7009751ad62f802e152e97021", + "version" : "10.26.0" + } + }, + { + "identity" : "googleappmeasurement", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleAppMeasurement.git", + "state" : { + "revision" : "16244d177c4e989f87b25e9db1012b382cfedc55", + "version" : "10.25.0" + } + }, + { + "identity" : "googledatatransport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleDataTransport.git", + "state" : { + "revision" : "a637d318ae7ae246b02d7305121275bc75ed5565", + "version" : "9.4.0" + } + }, + { + "identity" : "googleutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleUtilities.git", + "state" : { + "revision" : "57a1d307f42df690fdef2637f3e5b776da02aad6", + "version" : "7.13.3" + } + }, + { + "identity" : "grpc-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/grpc-binary.git", + "state" : { + "revision" : "e9fad491d0673bdda7063a0341fb6b47a30c5359", + "version" : "1.62.2" + } + }, + { + "identity" : "gtm-session-fetcher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/gtm-session-fetcher.git", + "state" : { + "revision" : "0382ca27f22fb3494cf657d8dc356dc282cd1193", + "version" : "3.4.1" + } + }, + { + "identity" : "interop-ios-for-google-sdks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/interop-ios-for-google-sdks.git", + "state" : { + "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648", + "version" : "100.0.0" + } + }, + { + "identity" : "leveldb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/leveldb.git", + "state" : { + "revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1", + "version" : "1.22.5" + } + }, + { + "identity" : "nanopb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/nanopb.git", + "state" : { + "revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1", + "version" : "2.30910.0" + } + }, + { + "identity" : "promises", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/promises.git", + "state" : { + "revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac", + "version" : "2.4.0" + } + }, { "identity" : "swift-case-paths", "kind" : "remoteSourceControl", @@ -91,6 +199,15 @@ "version" : "1.1.7" } }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "9f0c76544701845ad98716f3f6a774a892152bcb", + "version" : "1.26.0" + } + }, { "identity" : "swift-syntax", "kind" : "remoteSourceControl", diff --git a/app-ios/Sources/TimetableFeature/SampleData.swift b/app-ios/Sources/TimetableFeature/SampleData.swift index 1a9fbb98f..753ddf668 100644 --- a/app-ios/Sources/TimetableFeature/SampleData.swift +++ b/app-ios/Sources/TimetableFeature/SampleData.swift @@ -1,10 +1,3 @@ -// -// File.swift -// -// -// Created by CHARLES BOND on 2024/06/16. -// - import Foundation public enum DayTab: String, CaseIterable, Identifiable { @@ -50,7 +43,7 @@ public struct TimetableItem: Equatable, Hashable { //TODO: This object is likely to change a lot when we get live data changes } -public struct SampleData { +internal struct SampleData { public let day1Results = [ TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ TimetableItem( From 14bbe2a21927c5cd494f130876a08bca390431d0 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Sun, 23 Jun 2024 22:14:56 +0900 Subject: [PATCH 14/15] Fixes to address concerns from pull request review. --- .../Sources/TimetableFeature/SampleData.swift | 8 ++++---- .../TimetableFeature/TimetableListView.swift | 18 +++++++++--------- .../TimetableFeature/TimetableReducer.swift | 10 ++++++---- .../Tests/TimetableTests/TimetableTests.swift | 2 +- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/app-ios/Sources/TimetableFeature/SampleData.swift b/app-ios/Sources/TimetableFeature/SampleData.swift index 753ddf668..a56f3df3a 100644 --- a/app-ios/Sources/TimetableFeature/SampleData.swift +++ b/app-ios/Sources/TimetableFeature/SampleData.swift @@ -43,8 +43,8 @@ public struct TimetableItem: Equatable, Hashable { //TODO: This object is likely to change a lot when we get live data changes } -internal struct SampleData { - public let day1Results = [ +struct SampleData { + let day1Results = [ TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ TimetableItem( id: "", @@ -121,7 +121,7 @@ internal struct SampleData { ]) ] - public let day2Results = [ + let day2Results = [ TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ TimetableItem( id: "", @@ -194,7 +194,7 @@ internal struct SampleData { ]) ] - public let day3Results = [ + let day3Results = [ TimetableTimeGroupItems(startsTimeString:"12:00", endsTimeString:"13:00", items: [ TimetableItem( id: "", diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index 8d5ef2dc6..04230e611 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -16,7 +16,7 @@ public struct TimetableView: View { store.send(.selectDay(tabItem)) }, label: { //TODO: Only selected button should be green and underlined - Text(tabItem.rawValue).foregroundColor(Color(.greenSelectColorset)) + Text(tabItem.rawValue).foregroundStyle(Color(.greenSelectColorset)) .underline() }) } @@ -55,7 +55,7 @@ public struct TimetableListView: View { struct TimeGroupMiniList: View { let contents: TimetableTimeGroupItems - public var body: some View { + var body: some View { HStack { VStack { Text(contents.startsTimeString) @@ -84,7 +84,7 @@ struct ListViewItem: View { TagView(tagText: lang, highlight: false) } Spacer() - Image(systemName: listItem.isFavorite ? "heart.fill" : "heart").foregroundColor(Color(.onSurfaceColorset)) + Image(systemName: listItem.isFavorite ? "heart.fill" : "heart").foregroundStyle(Color(.onSurfaceColorset)) } Text(listItem.title).font(.title) ForEach(listItem.speakers, id: \.self){ speaker in @@ -93,7 +93,7 @@ struct ListViewItem: View { } - }.foregroundColor(Color(.onSurfaceColorset)).padding(10) + }.foregroundStyle(Color(.onSurfaceColorset)).padding(10) .overlay( RoundedRectangle(cornerRadius: 5) .stroke(Color(.onSurfaceColorset), lineWidth: 1) @@ -104,13 +104,13 @@ struct ListViewItem: View { struct TagView: View { let tagText: String let highlight: Bool - public var body: some View { + var body: some View { HStack { if highlight { - Image(systemName: "diamond.fill").resizable().frame(width: 11,height: 11).foregroundColor(Color(.greenSelectColorset)) + Image(systemName: "diamond.fill").resizable().frame(width: 11,height: 11).foregroundStyle(Color(.greenSelectColorset)) .padding(-3) } - Text(tagText).foregroundColor(highlight ? Color(.greenSelectColorset) : Color(.onSurfaceColorset)) + Text(tagText).foregroundStyle(highlight ? Color(.greenSelectColorset) : Color(.onSurfaceColorset)) } .padding( EdgeInsets(top: 2,leading: 7, bottom: 2, trailing: 7)) @@ -124,9 +124,9 @@ struct PhotoView: View { let photo: String let name: String - public var body: some View { + var body: some View { HStack { - Image(systemName:photo).resizable().frame(width: 32,height: 32).foregroundColor(Color(.greenSelectColorset)) + Image(systemName:photo).resizable().frame(width: 32,height: 32).foregroundStyle(Color(.greenSelectColorset)) Text(name) } } diff --git a/app-ios/Sources/TimetableFeature/TimetableReducer.swift b/app-ios/Sources/TimetableFeature/TimetableReducer.swift index 8c97eb711..f040c8313 100644 --- a/app-ios/Sources/TimetableFeature/TimetableReducer.swift +++ b/app-ios/Sources/TimetableFeature/TimetableReducer.swift @@ -3,6 +3,8 @@ import Foundation @Reducer public struct TimetableReducer { + let sampleData = SampleData() + public init() {} @ObservableState @@ -23,20 +25,20 @@ public struct TimetableReducer { Reduce { state, action in switch action { case .onAppear: - state.timetableItems = SampleData.init().day1Results + state.timetableItems = sampleData.day1Results return .none case .selectDay(let dayTab): //TODO: Replace with real data switch dayTab { case .day1: - state.timetableItems = SampleData.init().day1Results + state.timetableItems = sampleData.day1Results return .none case .day2: - state.timetableItems = SampleData.init().day2Results + state.timetableItems = sampleData.day2Results return .none case .day3: - state.timetableItems = SampleData.init().day3Results + state.timetableItems = sampleData.day3Results return .none } } diff --git a/app-ios/Tests/TimetableTests/TimetableTests.swift b/app-ios/Tests/TimetableTests/TimetableTests.swift index 382dbe5ff..8a2534948 100644 --- a/app-ios/Tests/TimetableTests/TimetableTests.swift +++ b/app-ios/Tests/TimetableTests/TimetableTests.swift @@ -8,7 +8,7 @@ final class TimetableTests: XCTestCase { TimetableReducer() } await store.send(.onAppear) { - $0.timetableItems = SampleData.init().day1Results + $0.timetableItems = SampleData().day1Results } } } From d58c73d43a38f9bc9aa792ca052dd5f9030cbcf5 Mon Sep 17 00:00:00 2001 From: CHARLES BOND Date: Sun, 23 Jun 2024 22:22:23 +0900 Subject: [PATCH 15/15] Fixed last pull request item. --- app-ios/Sources/TimetableFeature/TimetableListView.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index 04230e611..ba9c493f7 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -30,14 +30,14 @@ public struct TimetableView: View { } } -public struct TimetableListView: View { +struct TimetableListView: View { private let store: StoreOf public init(store: StoreOf) { self.store = store } - public var body: some View { + var body: some View { ScrollView{ LazyVStack { ForEach(store.timetableItems, id: \.self) { item in