Skip to content

Commit e5923bc

Browse files
committed
Enhance loading UI for product image in Blaze Campaign Creation form
- Update BlazeCampaignCreationForm.swift to add redacted and shimmering effects when loading product image - Modify isLoadingProductImage visibility in BlazeCampaignCreationFormViewModel.swift to be read-only and set default to true
1 parent f774bf9 commit e5923bc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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)