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

[MBL-1495] [MBL-1502] PPO UI implementation #2186

Merged
merged 19 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
stevestreza-ksr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ extension GraphAPI.MoneyFragment: Equatable {
}
}

private let templateTestImageURL = Bundle.framework.url(forResource: "snapshot-test-image", withExtension: "png")!
private let templateTestImage = Kingfisher.Source.provider(LocalFileImageDataProvider(fileURL: templateTestImageURL))

extension PPOProjectCardModel {
#if targetEnvironment(simulator)
public static let previewTemplates: [PPOProjectCardModel] = [
Expand All @@ -211,7 +208,7 @@ extension PPOProjectCardModel {
alerts: [
.init(type: .warning, icon: .time, message: "Address locks in 8 hours")
],
image: templateTestImage,
image: .network(URL(string: "https:///")!),
title: "Sugardew Island - Your cozy farm shop let’s pretend this is a way way way longer title",
pledge: .init(amount: "50.00", currency: .usd, symbol: "$"),
creatorName: "rokaplay truncate if longer than",
Expand All @@ -232,7 +229,7 @@ extension PPOProjectCardModel {
.init(type: .warning, icon: .alert, message: "Survey available"),
.init(type: .warning, icon: .time, message: "Address locks in 48 hours")
],
image: templateTestImage,
image: .network(URL(string: "https:///")!),
title: "Sugardew Island - Your cozy farm shop let’s pretend this is a way way way longer title",
pledge: .init(amount: "50.00", currency: .usd, symbol: "$"),
creatorName: "rokaplay truncate if longer than",
Expand All @@ -252,7 +249,7 @@ extension PPOProjectCardModel {
message: "Pledge will be dropped in 6 days"
)
],
image: templateTestImage,
image: .network(URL(string: "https:///")!),
title: "Sugardew Island - Your cozy farm shop let’s pretend this is a way way way longer title",
pledge: .init(amount: "50.00", currency: .usd, symbol: "$"),
creatorName: "rokaplay truncate if longer than",
Expand All @@ -272,7 +269,7 @@ extension PPOProjectCardModel {
message: "Pledge will be dropped in 6 days"
)
],
image: templateTestImage,
image: .network(URL(string: "https:///")!),
title: "Sugardew Island - Your cozy farm shop let’s pretend this is a way way way longer title",
pledge: .init(amount: "50.00", currency: .usd, symbol: "$"),
creatorName: "rokaplay truncate if longer than",
Expand All @@ -287,7 +284,7 @@ extension PPOProjectCardModel {
alerts: [
.init(type: .warning, icon: .alert, message: "Survey available")
],
image: templateTestImage,
image: .network(URL(string: "https:///")!),
title: "Sugardew Island - Your cozy farm shop let’s pretend this is a way way way longer title",
pledge: .init(amount: "50.00", currency: .usd, symbol: "$"),
creatorName: "rokaplay truncate if longer than",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ struct PPOProjectDetails: View {
var body: some View {
HStack {
KFImage(source: self.image)
.placeholder({
Color(.ksr_support_200)
})
.resizable()
.clipShape(Constants.imageShape)
.aspectRatio(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Kickstarter-iOS/TestHelpers/snapshot-test-image.png
Binary file not shown.
4 changes: 0 additions & 4 deletions Kickstarter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,6 @@
A7F6F0C11DC7EBF7002C118C /* DateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F6F0C01DC7EBF7002C118C /* DateProtocol.swift */; };
A7FC8C061C8F1DEA00C3B49B /* CircleAvatarImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FC8C051C8F1DEA00C3B49B /* CircleAvatarImageView.swift */; };
AA1023E42CABD2AE007800B5 /* PPOContainerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA1023E32CABD2AE007800B5 /* PPOContainerViewModel.swift */; };
AA1844CA2CD2A9E9008B0FEC /* snapshot-test-image.png in Resources */ = {isa = PBXBuildFile; fileRef = AA1844C92CD2A9E8008B0FEC /* snapshot-test-image.png */; };
AA645E972C770D620034705A /* DesignSystemViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6049D0102A9CF6840015BB0D /* DesignSystemViewController.swift */; };
AA645E9C2C7725FB0034705A /* PagedContainerViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA645E9A2C7725FB0034705A /* PagedContainerViewModelTests.swift */; };
AA645E9E2C772C650034705A /* PagedTabBarTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA645E9D2C772C650034705A /* PagedTabBarTests.swift */; };
Expand Down Expand Up @@ -2805,7 +2804,6 @@
A7F761761C85FACB005405ED /* LoginToutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = LoginToutViewController.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
A7FC8C051C8F1DEA00C3B49B /* CircleAvatarImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CircleAvatarImageView.swift; sourceTree = "<group>"; };
AA1023E32CABD2AE007800B5 /* PPOContainerViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PPOContainerViewModel.swift; sourceTree = "<group>"; };
AA1844C92CD2A9E8008B0FEC /* snapshot-test-image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "snapshot-test-image.png"; sourceTree = "<group>"; };
AA645E9A2C7725FB0034705A /* PagedContainerViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PagedContainerViewModelTests.swift; sourceTree = "<group>"; };
AA645E9D2C772C650034705A /* PagedTabBarTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PagedTabBarTests.swift; sourceTree = "<group>"; };
AA6682222CB86EEB00C8522E /* PPOProjectCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PPOProjectCardModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -6447,7 +6445,6 @@
A7ED20201E83237F00BFFA01 /* TestHelpers */ = {
isa = PBXGroup;
children = (
AA1844C92CD2A9E8008B0FEC /* snapshot-test-image.png */,
A7ED20211E83237F00BFFA01 /* Combos.swift */,
37096C3122BC23AD003D1F40 /* MockAppEnvironment.swift */,
37096C2F22BC238C003D1F40 /* MockFeedbackGenerator.swift */,
Expand Down Expand Up @@ -7607,7 +7604,6 @@
014D629D1E6E5B070033D2BD /* BackerDashboardEmptyStateCell.xib in Resources */,
D6C3845C210B9AC400ADB671 /* SettingsNewslettersTopCell.xib in Resources */,
77FD8B44216D6167000A95AC /* LoadingBarButtonItemView.xib in Resources */,
AA1844CA2CD2A9E9008B0FEC /* snapshot-test-image.png in Resources */,
D6A7AB401FDAF3EC007B20AE /* ThanksCategoryCell.xib in Resources */,
59673C8B1D50EC920035AFD9 /* Video.storyboard in Resources */,
77F9A9B22135FC9B0082A11E /* FindFriendsCell.xib in Resources */,
Expand Down