Skip to content

Commit 5a44075

Browse files
authored
[Blaze] Enhance loading UI for product image in Blaze Campaign Creation form (#15098)
2 parents 7158e89 + c6a5deb commit 5a44075

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

RELEASE-NOTES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
*** PLEASE FOLLOW THIS FORMAT: [<priority indicator, more stars = higher priority>] <description> [<PR URL>]
22
*** 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).
3+
34
21.8
45
-----
5-
6+
- [*] 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]
67

78
21.7
89
-----

WooCommerce/Classes/ViewRelated/Blaze/CampaignCreation/BlazeCampaignCreationForm.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ private extension BlazeCampaignCreationForm {
274274
.resizable()
275275
.aspectRatio(contentMode: .fit)
276276
.cornerRadius(Layout.cornerRadius)
277+
.redacted(reason: viewModel.isLoadingProductImage ? .placeholder : [])
278+
.shimmering(active: viewModel.isLoadingProductImage)
277279

278280
// Tagline
279281
Text(viewModel.isLoadingAISuggestions ? "Placeholder tagline" : viewModel.tagline)

WooCommerce/Classes/ViewRelated/Blaze/CampaignCreation/BlazeCampaignCreationFormViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ final class BlazeCampaignCreationFormViewModel: ObservableObject {
214214
@Published private(set) var error: BlazeCampaignCreationError?
215215
private var suggestions: [BlazeAISuggestion] = []
216216

217-
@Published private var isLoadingProductImage: Bool = false
217+
@Published private(set) var isLoadingProductImage: Bool = true
218218

219219
var canEditAd: Bool {
220220
!isLoadingAISuggestions

0 commit comments

Comments
 (0)