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/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/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/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/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/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/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/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/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/SampleData.swift b/app-ios/Sources/TimetableFeature/SampleData.swift new file mode 100644 index 000000000..a56f3df3a --- /dev/null +++ b/app-ios/Sources/TimetableFeature/SampleData.swift @@ -0,0 +1,269 @@ +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 +} + +struct SampleData { + 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) + ]) + ] + + 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) + ]) + ] + + 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 deleted file mode 100644 index 355a677b0..000000000 --- a/app-ios/Sources/TimetableFeature/TimetableCore.swift +++ /dev/null @@ -1,111 +0,0 @@ -import ComposableArchitecture -import Foundation - -@Reducer -public struct TimetableReducer { - public init() {} - - @ObservableState - public struct State: Equatable { - var timetableItems: [TimetableItem] = [] //Should be simple objects - - public init(timetableItems: [TimetableItem]? = []) { - self.timetableItems = timetableItems ?? [] - } - } - - public enum Action { - case onAppear - case selectDay(DayTab) - } - - public var body: some Reducer { - Reduce { state, action in - switch action { - case .onAppear: - state.timetableItems = SampleData.init().day1Data - return .none - case .selectDay(let dayTab): - //TODO: Replace with real data - - switch dayTab { - case .day1: - state.timetableItems = SampleData.init().day1Data - return .none - case .day2: - state.timetableItems = SampleData.init().day2Data - return .none - case .day3: - state.timetableItems = SampleData.init().day3Data - return .none - } - } - } - } -} - -public enum DayTab: String, CaseIterable, Identifiable { - public var id : RawValue { rawValue } - - case day1 = "Day1" - case day2 = "Day2" - case day3 = "Day3" -} - -public struct TimetableItem: Equatable, Hashable { - let room: String - let languages: [String] - let title: String - let speaker: String - let startTime: String - let endTime: String - let isFavorite: Bool -} - -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 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 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) - ] -} - diff --git a/app-ios/Sources/TimetableFeature/TimetableListView.swift b/app-ios/Sources/TimetableFeature/TimetableListView.swift index aae8d0fe6..ba9c493f7 100644 --- a/app-ios/Sources/TimetableFeature/TimetableListView.swift +++ b/app-ios/Sources/TimetableFeature/TimetableListView.swift @@ -15,7 +15,8 @@ public struct TimetableView: View { Button(action: { store.send(.selectDay(tabItem)) }, label: { - Text(tabItem.rawValue).foregroundColor(.green) + //TODO: Only selected button should be green and underlined + Text(tabItem.rawValue).foregroundStyle(Color(.greenSelectColorset)) .underline() }) } @@ -24,26 +25,54 @@ public struct TimetableView: View { TimetableListView(store: store) Spacer() } + .background(Color(.backgroundColorset)) + .frame(maxWidth: .infinity) } } -public struct TimetableListView: View { +struct TimetableListView: View { private let store: StoreOf public init(store: StoreOf) { self.store = store } - public var body: some View { - ForEach(store.timetableItems, id: \.self) { item in - ListViewItem(listItem: item) - } - .onAppear { - store.send(.onAppear) + var body: some View { + ScrollView{ + LazyVStack { + ForEach(store.timetableItems, id: \.self) { item in + TimeGroupMiniList(contents: item) + } + }.scrollContentBackground(.hidden) + + .onAppear { + store.send(.onAppear) + }.background(Color(.backgroundColorset)) } } } +struct TimeGroupMiniList: View { + let contents: TimetableTimeGroupItems + + var body: some View { + HStack { + VStack { + Text(contents.startsTimeString) + Text("|") + Text(contents.endsTimeString) + Spacer() + }.padding(10).foregroundStyle(Color(.onSurfaceColorset)) + VStack { + ForEach(contents.items, id: \.self) { item in + ListViewItem(listItem: item) + } + } + }.background(Color.clear) + + } +} + struct ListViewItem: View { let listItem: TimetableItem @@ -55,16 +84,19 @@ 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").foregroundStyle(Color(.onSurfaceColorset)) } 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) + + }.foregroundStyle(Color(.onSurfaceColorset)).padding(10) .overlay( RoundedRectangle(cornerRadius: 5) - .stroke(Color.gray, lineWidth: 1) + .stroke(Color(.onSurfaceColorset), lineWidth: 1) ) } } @@ -72,14 +104,18 @@ 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(.green) + Image(systemName: "diamond.fill").resizable().frame(width: 11,height: 11).foregroundStyle(Color(.greenSelectColorset)) .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).foregroundStyle(highlight ? Color(.greenSelectColorset) : Color(.onSurfaceColorset)) + } + .padding( + EdgeInsets(top: 2,leading: 7, bottom: 2, trailing: 7)) + .border(highlight ? Color(.greenSelectColorset) : Color(.onSurfaceColorset)) + .padding(-2) } } @@ -88,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(.green) + Image(systemName:photo).resizable().frame(width: 32,height: 32).foregroundStyle(Color(.greenSelectColorset)) Text(name) } } @@ -98,7 +134,7 @@ struct PhotoView: View { #Preview { TimetableView( - store: .init(initialState: .init(timetableItems: SampleData.init().day1Data), + store: .init(initialState: .init(timetableItems: SampleData.init().day1Results), reducer: { TimetableReducer() }) ) } @@ -107,7 +143,7 @@ struct PhotoView: View { TimetableListView( store: .init( initialState: - .init(timetableItems: SampleData.init().day1Data), + .init(timetableItems: SampleData.init().day1Results), reducer: { TimetableReducer() } ) ) diff --git a/app-ios/Sources/TimetableFeature/TimetableReducer.swift b/app-ios/Sources/TimetableFeature/TimetableReducer.swift new file mode 100644 index 000000000..f040c8313 --- /dev/null +++ b/app-ios/Sources/TimetableFeature/TimetableReducer.swift @@ -0,0 +1,50 @@ +import ComposableArchitecture +import Foundation + +@Reducer +public struct TimetableReducer { + let sampleData = SampleData() + + public init() {} + + @ObservableState + public struct State: Equatable { + var timetableItems: [TimetableTimeGroupItems] = [] //Should be simple objects + + public init(timetableItems: [TimetableTimeGroupItems] = []) { + self.timetableItems = timetableItems + } + } + + public enum Action { + case onAppear + case selectDay(DayTab) + } + + public var body: some Reducer { + Reduce { state, action in + switch action { + case .onAppear: + state.timetableItems = sampleData.day1Results + return .none + case .selectDay(let dayTab): + //TODO: Replace with real data + + switch dayTab { + case .day1: + state.timetableItems = sampleData.day1Results + return .none + case .day2: + state.timetableItems = sampleData.day2Results + return .none + case .day3: + state.timetableItems = sampleData.day3Results + return .none + } + } + } + } +} + + + diff --git a/app-ios/Tests/TimetableTests/TimetableTests.swift b/app-ios/Tests/TimetableTests/TimetableTests.swift index a34fa03fd..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().day1Data + $0.timetableItems = SampleData().day1Results } } }