Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build All Previews and Updated with @Previewable #323

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
481 changes: 60 additions & 421 deletions Basic-Car-Maintenance.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,53 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/app-check.git",
"state" : {
"revision" : "3b62f154d00019ae29a71e9738800bb6f18b236d",
"version" : "10.19.2"
"revision" : "21fe1af9be463a359aaf8d96789ef73fc3760d09",
"version" : "11.0.1"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk.git",
"state" : {
"revision" : "eca84fd638116dd6adb633b5a3f31cc7befcbb7d",
"version" : "10.29.0"
"revision" : "f909f901bfba9e27e4e9da83242a4915d6dd64bb",
"version" : "11.3.0"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "fe727587518729046fc1465625b9afd80b5ab361",
"version" : "10.28.0"
"revision" : "93406fd21b85e66e2d6dbf50b472161fd75c3f1f",
"version" : "11.3.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "a637d318ae7ae246b02d7305121275bc75ed5565",
"version" : "9.4.0"
"revision" : "617af071af9aa1d6a091d59a202910ac482128f9",
"version" : "10.1.0"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "57a1d307f42df690fdef2637f3e5b776da02aad6",
"version" : "7.13.3"
"revision" : "53156c7ec267db846e6b64c9f4c4e31ba4cf75eb",
"version" : "8.0.2"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "e9fad491d0673bdda7063a0341fb6b47a30c5359",
"version" : "1.62.2"
"revision" : "f56d8fc3162de9a498377c7b6cea43431f4f5083",
"version" : "1.65.1"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@
}

#Preview {
AddMaintenanceView(vehicles: sampleVehicles) { _ in }
@Previewable @State var sampleVehicle = [
Vehicle(id : "1" , name: "Lexus", make: "Lexus", model: "White"),
Vehicle( id : "2" , name: "Dani Impreza", make: "Subaru", model: "Impreza")

Check warning on line 103 in Basic-Car-Maintenance/Shared/Dashboard/Views/AddMaintenanceView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)

Check warning on line 103 in Basic-Car-Maintenance/Shared/Dashboard/Views/AddMaintenanceView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

There should be no space before and one after any comma (comma)
]

Check warning on line 104 in Basic-Car-Maintenance/Shared/Dashboard/Views/AddMaintenanceView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)

Check warning on line 104 in Basic-Car-Maintenance/Shared/Dashboard/Views/AddMaintenanceView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

There should be no space before and one after any comma (comma)
AddMaintenanceView(vehicles: sampleVehicle) { _ in }
}

let sampleVehicles = [
Vehicle(name: "Lexus", make: "Lexus", model: "White"),
Vehicle(name: "Test", make: "Lexus", model: "White")
]

2 changes: 1 addition & 1 deletion Basic-Car-Maintenance/Shared/Models/AlertItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import Foundation
import FirebaseFirestoreSwift
import FirebaseFirestore
import SwiftData

struct AlertItem: Codable, Identifiable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Mikaela Caron on 8/25/23.
//

import FirebaseFirestoreSwift
import FirebaseFirestore
import Foundation

struct MaintenanceEvent: Codable, Identifiable, Hashable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import Foundation
import FirebaseFirestoreSwift
import FirebaseFirestore
Copy link
Owner

Choose a reason for hiding this comment

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

Please put all the packages back to the way they were and then I can review the rest of the files


struct OdometerReading: Codable, Identifiable, Hashable {
@DocumentID var id: String?
Expand Down
2 changes: 1 addition & 1 deletion Basic-Car-Maintenance/Shared/Models/Vehicle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Mikaela Caron on 8/25/23.
//

import FirebaseFirestoreSwift
import FirebaseFirestore
import Foundation

struct Vehicle: Codable, Identifiable, Hashable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import FirebaseFirestore
import FirebaseFirestoreSwift
import Foundation

@Observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@
}

#Preview {
AddOdometerReadingView(vehicles: sampleVehicles) { _ in }
@Previewable @State var sampleVehicle = [
Vehicle(id : "1" , name: "Nate Forester", make: "Subaru", model: "Forester"),
Vehicle( id : "2" , name: "Dani Impreza", make: "Subaru", model: "Impreza")

Check warning on line 93 in Basic-Car-Maintenance/Shared/Odometer/Views/AddOdometerReadingView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)

Check warning on line 93 in Basic-Car-Maintenance/Shared/Odometer/Views/AddOdometerReadingView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

There should be no space before and one after any comma (comma)
]

Check warning on line 94 in Basic-Car-Maintenance/Shared/Odometer/Views/AddOdometerReadingView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)

Check warning on line 94 in Basic-Car-Maintenance/Shared/Odometer/Views/AddOdometerReadingView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

There should be no space before and one after any comma (comma)

AddOdometerReadingView(vehicles: sampleVehicle) { _ in }
}

let sampleVehicle = [
Vehicle(name: "Nate Forester", make: "Subaru", model: "Forester"),
Vehicle(name: "Dani Impreza", make: "Subaru", model: "Impreza")
]
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,15 @@ struct EditOdometerReadingView: View {
}

#Preview {
@Previewable @State var sampleVehicles = [
Vehicle(id: "1", name: "Nate Forester", make: "Subaru", model: "Forester")
]
@Previewable @State var sampleReading = OdometerReading(date: Date(),
distance: 100,
isMetric: false,
vehicleID: "1")

EditOdometerReadingView(
selectedReading: OdometerReading(date: Date(),
distance: 0,
isMetric: false,
vehicleID: ""),
vehicles: []) { _ in }
selectedReading: sampleReading,
vehicles: sampleVehicles) { _ in }
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
//
// Created by Mikaela Caron on 9/11/23.
//

import FirebaseFirestore
import FirebaseFirestoreSwift
import FirebaseFirestore
import Foundation

@Observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import SwiftUI
import FirebaseAnalyticsSwift
import FirebaseAnalytics

struct FirebaseAnalyticsModifier: ViewModifier {

Expand Down
Loading