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

[Blaze] Enhance loading UI for product image in Blaze Campaign Creation form #15098

Merged
merged 3 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
*** PLEASE FOLLOW THIS FORMAT: [<priority indicator, more stars = higher priority>] <description> [<PR URL>]
*** Use [*****] to indicate smoke tests of all critical flows should be run on the final IPA before release (e.g. major library or OS update).

21.8
-----

- [*] Improved image loading in Blaze Campaign Creation: displays a redacted and shimmering effects when loading product image and falls back to a placeholder if no image is available. [https://github.com/woocommerce/woocommerce-ios/pull/15098]

21.7
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ private extension BlazeCampaignCreationForm {
.resizable()
.aspectRatio(contentMode: .fit)
.cornerRadius(Layout.cornerRadius)
.redacted(reason: viewModel.isLoadingProductImage ? .placeholder : [])
.shimmering(active: viewModel.isLoadingProductImage)

// Tagline
Text(viewModel.isLoadingAISuggestions ? "Placeholder tagline" : viewModel.tagline)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ final class BlazeCampaignCreationFormViewModel: ObservableObject {
@Published private(set) var error: BlazeCampaignCreationError?
private var suggestions: [BlazeAISuggestion] = []

@Published private var isLoadingProductImage: Bool = false
@Published private(set) var isLoadingProductImage: Bool = true

var canEditAd: Bool {
!isLoadingAISuggestions
Expand Down