Skip to content

Commit 992f3db

Browse files
authored
fix: now "Suggested by AI" label is visible in dark mode in Blaze Edit (#15088)
2 parents 5a44075 + 0267b58 commit 992f3db

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
21.8
55
-----
6+
- [*] Now "Suggested by AI" label is visible in dark mode in Blaze campaign creation flow. [https://github.com/woocommerce/woocommerce-ios/pull/15088]
67
- [*] 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]
78

89
21.7

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,17 +326,19 @@ private extension BlazeCampaignCreationForm {
326326
radius: Layout.shadowRadius,
327327
x: 0,
328328
y: Layout.shadowYOffset)
329+
.environment(\.colorScheme, .light)
329330

330331
VStack(spacing: Layout.contentPadding) {
331332
// Label "Suggested by AI"
332333
HStack(spacing: 0) {
333334
Image(uiImage: .sparklesImage)
334335
.renderingMode(.template)
335336
.resizable()
336-
.foregroundColor(Color(uiColor: .textSubtle))
337+
.foregroundColor(Color(.textSubtle))
337338
.frame(width: Layout.sparkleIconSize * scale, height: Layout.sparkleIconSize * scale)
338339

339340
Text(Localization.suggestedByAI)
341+
.foregroundColor(Color(.textSubtle))
340342
.subheadlineStyle()
341343

342344
Spacer()
@@ -358,7 +360,6 @@ private extension BlazeCampaignCreationForm {
358360
.shimmering(active: !viewModel.canEditAd)
359361
}
360362
}
361-
.environment(\.colorScheme, .light)
362363
.padding(Layout.contentPadding)
363364
.background(Color(light: .init(uiColor: .systemGray6),
364365
dark: .init(uiColor: .tertiarySystemBackground)))
@@ -603,6 +604,12 @@ private extension BlazeCampaignCreationForm {
603604

604605
struct BlazeCampaignCreationForm_Previews: PreviewProvider {
605606
static var previews: some View {
606-
BlazeCampaignCreationForm(viewModel: .init(siteID: 123, productID: 123, onCompletion: {}))
607+
Group {
608+
BlazeCampaignCreationForm(viewModel: .init(siteID: 123, productID: 123, onCompletion: {}))
609+
.preferredColorScheme(.light)
610+
611+
BlazeCampaignCreationForm(viewModel: .init(siteID: 123, productID: 123, onCompletion: {}))
612+
.preferredColorScheme(.dark)
613+
}
607614
}
608615
}

0 commit comments

Comments
 (0)