Skip to content

Commit ff61bb5

Browse files
authored
[Woo POS][Design System] Update onSuccess color, remove legacy text colors, and misc design updates (#15119)
2 parents 1035b7c + fbbc635 commit ff61bb5

File tree

37 files changed

+59
-204
lines changed

37 files changed

+59
-204
lines changed

WooCommerce/Classes/POS/Colors/Color+POSColorPalette.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ extension Color {
4646
static var posAlert: Color { Color(.posAlert) }
4747
static var posOnAlert: Color { Color(.posOnAlert) }
4848

49-
// MARK: - Text Colors
50-
static var posPrimaryText: Color { Color(.posPrimaryText) }
51-
static var posSecondaryText: Color { Color(.posSecondaryText) }
52-
static var posTertiaryText: Color { Color(.posTertiaryText) }
53-
5449
// MARK: - Other
5550
static var posShadow: Color { Color(.posShadow) }
5651
}

WooCommerce/Classes/POS/Colors/POSColorPalette.xcassets/posOnSuccess.colorset/Contents.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"color-space" : "srgb",
66
"components" : {
77
"alpha" : "1.000",
8-
"blue" : "0xFF",
9-
"green" : "0xFF",
10-
"red" : "0xFF"
8+
"blue" : "0x17",
9+
"green" : "0x15",
10+
"red" : "0x10"
1111
}
1212
},
1313
"idiom" : "universal"
@@ -23,9 +23,9 @@
2323
"color-space" : "srgb",
2424
"components" : {
2525
"alpha" : "1.000",
26-
"blue" : "0xFF",
27-
"green" : "0xFF",
28-
"red" : "0xFF"
26+
"blue" : "0x17",
27+
"green" : "0x15",
28+
"red" : "0x10"
2929
}
3030
},
3131
"idiom" : "universal"

WooCommerce/Classes/POS/Colors/POSColorPalette.xcassets/posPrimaryText.colorset/Contents.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

WooCommerce/Classes/POS/Colors/POSColorPalette.xcassets/posSecondaryText.colorset/Contents.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

WooCommerce/Classes/POS/Colors/POSColorPalette.xcassets/posTertiaryText.colorset/Contents.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

WooCommerce/Classes/POS/Presentation/Card Present Payments/Reader Messages/PointOfSaleCardPresentPaymentPreparingForPaymentMessageViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ private extension PointOfSaleCardPresentPaymentPreparingForPaymentMessageViewMod
1313
comment: "Title shown on the Point of Sale checkout while the reader is being prepared."
1414
)
1515
static let message = NSLocalizedString(
16-
"pointOfSale.cardPresent.preparingForPayment.message",
17-
value: "Preparing card for payment",
16+
"pointOfSale.cardPresent.preparingReaderForPayment.message",
17+
value: "Preparing reader for payment",
1818
comment: "Message shown on the Point of Sale checkout while the reader is being prepared."
1919
)
2020
}

WooCommerce/Classes/POS/Presentation/CardReaderConnection/CardReaderConnectionStatusView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private extension CardReaderConnectionStatusView {
8888
var connectedFontColor: Color {
8989
switch backgroundAppearance {
9090
case .primary:
91-
.posPrimaryText
91+
.posOnSurface
9292
case .secondary:
9393
POSFloatingControlView.secondaryFontColor
9494
}
@@ -97,7 +97,7 @@ private extension CardReaderConnectionStatusView {
9797
var disconnectedFontColor: Color {
9898
switch backgroundAppearance {
9999
case .primary:
100-
.posPrimaryText
100+
.posOnSurface
101101
case .secondary:
102102
POSFloatingControlView.secondaryFontColor
103103
}

WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/PointOfSaleItemListEmptyView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ struct PointOfSaleItemListEmptyView: View {
1414
.resizable()
1515
.aspectRatio(contentMode: .fit)
1616
.frame(width: Constants.iconSize, height: Constants.iconSize)
17-
.foregroundColor(.posSecondaryText)
17+
.foregroundColor(.posOnSurfaceVariantHighest)
1818
Text(title)
19-
.foregroundStyle(Color.posSecondaryText)
19+
.foregroundStyle(Color.posOnSurfaceVariantHighest)
2020
.font(.posHeading)
2121
Text(subtitle)
22-
.foregroundStyle(Color.posSecondaryText)
22+
.foregroundStyle(Color.posOnSurfaceVariantHighest)
2323
.font(.posBodyLargeRegular())
2424
.padding([.leading, .trailing])
2525
Text(hint)
26-
.foregroundStyle(Color.posSecondaryText)
26+
.foregroundStyle(Color.posOnSurfaceVariantHighest)
2727
.font(.posBodyLargeRegular())
2828
.padding([.leading, .trailing])
2929
Spacer()

WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/PointOfSaleItemListErrorView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ struct PointOfSaleItemListErrorView: View {
1818
.padding(.bottom)
1919
Text(error.title)
2020
.accessibilityAddTraits(.isHeader)
21-
.foregroundStyle(Color.posPrimaryText)
21+
.foregroundStyle(Color.posOnSurface)
2222
.font(.posHeading)
2323
.padding(.bottom, PointOfSaleItemListErrorLayout.verticalPadding)
2424
Text(error.subtitle)
25-
.foregroundStyle(Color.posPrimaryText)
25+
.foregroundStyle(Color.posOnSurface)
2626
.font(.posBodyLargeRegular())
2727
.padding([.leading, .trailing])
2828
.padding(.bottom, PointOfSaleItemListErrorLayout.verticalPadding)

WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/PointOfSaleItemListFullscreenView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ struct PointOfSaleItemListFullscreenView<Content: View>: View {
88
VStack(alignment: .center, spacing: PointOfSaleItemListErrorLayout.headerSpacing) {
99
POSHeaderTitleView(
1010
title: Localization.title,
11-
foregroundColor: .posSecondaryText
11+
foregroundColor: .posOnSurfaceVariantHighest
1212
)
1313
Spacer()
1414
}

0 commit comments

Comments
 (0)