Skip to content

Commit 0d107a9

Browse files
committed
Merge branch 'release/2.7' into issue/1344-dark-mode-product-details
2 parents 1bc5f36 + 0b475ff commit 0d107a9

11 files changed

+126
-6
lines changed

WooCommerce/Classes/Authentication/Epilogue/EmptyStoresTableViewCell.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,17 @@ class EmptyStoresTableViewCell: UITableViewCell {
1616
comment: "Displayed during the Login flow, whenever the user has no woo stores associated.")
1717
}
1818
}
19+
20+
override func awakeFromNib() {
21+
super.awakeFromNib()
22+
23+
configureBackground()
24+
}
25+
}
26+
27+
28+
private extension EmptyStoresTableViewCell {
29+
func configureBackground() {
30+
applyDefaultBackgroundStyle()
31+
}
1932
}

WooCommerce/Classes/Authentication/Epilogue/StoreTableViewCell.swift

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ class StoreTableViewCell: UITableViewCell {
7373

7474
override func awakeFromNib() {
7575
super.awakeFromNib()
76-
nameLabel.textColor = StyleManager.wooSecondary
77-
urlLabel.textColor = StyleManager.wooSecondary
76+
configureBackground()
77+
configureNameLabel()
78+
configureUrlLabel()
7879
}
7980

8081
/// Displays (or hides) the Checkmark ContainerView, based on the `allowsCheckmark` property.
@@ -89,3 +90,18 @@ class StoreTableViewCell: UITableViewCell {
8990
checkmarkImageView.image = displaysCheckmark ? .checkmarkStyledImage : nil
9091
}
9192
}
93+
94+
95+
private extension StoreTableViewCell {
96+
func configureBackground() {
97+
applyDefaultBackgroundStyle()
98+
}
99+
100+
func configureNameLabel() {
101+
nameLabel.textColor = StyleManager.wooSecondary
102+
}
103+
104+
func configureUrlLabel() {
105+
urlLabel.textColor = StyleManager.wooSecondary
106+
}
107+
}

WooCommerce/Classes/ViewRelated/Orders/Cells/ProductDetailsTableViewCell.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class ProductDetailsTableViewCell: UITableViewCell {
8989
configureProductImageView()
9090
configureNameLabel()
9191
configureQuantityLabel()
92+
configureSKULabel()
9293
configurePriceLabel()
9394
configureSelectionStyle()
9495
}

WooCommerce/Classes/ViewRelated/ReusableViews/BasicTableViewCell.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class BasicTableViewCell: UITableViewCell {
55
override func awakeFromNib() {
66
super.awakeFromNib()
77

8+
configureBackground()
89
textLabel?.applyBodyStyle()
910
}
1011

@@ -15,3 +16,10 @@ class BasicTableViewCell: UITableViewCell {
1516
textLabel?.textAlignment = .natural
1617
}
1718
}
19+
20+
21+
private extension BasicTableViewCell {
22+
func configureBackground() {
23+
applyDefaultBackgroundStyle()
24+
}
25+
}

WooCommerce/Classes/ViewRelated/ReusableViews/HeadlineLabelTableViewCell.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,23 @@ final class HeadlineLabelTableViewCell: UITableViewCell {
3232
override func awakeFromNib() {
3333
super.awakeFromNib()
3434

35+
configureBackground()
36+
configureHeadline()
37+
configureBody()
38+
}
39+
}
40+
41+
42+
private extension HeadlineLabelTableViewCell {
43+
func configureBackground() {
44+
applyDefaultBackgroundStyle()
45+
}
46+
47+
func configureHeadline() {
3548
headlineLabel?.applyHeadlineStyle()
49+
}
50+
51+
func configureBody() {
3652
bodyLabel?.applyBodyStyle()
3753
}
3854
}

WooCommerce/Classes/ViewRelated/ReusableViews/StatusListTableViewCell.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ final class StatusListTableViewCell: UITableViewCell {
1818

1919
override func awakeFromNib() {
2020
super.awakeFromNib()
21+
22+
configureBackground()
2123
styleCheckmark()
2224
}
2325

@@ -34,8 +36,15 @@ final class StatusListTableViewCell: UITableViewCell {
3436
super.setSelected(selected, animated: animated)
3537
accessoryType = selected ? .checkmark : .none
3638
}
39+
}
40+
41+
42+
private extension StatusListTableViewCell {
43+
func configureBackground() {
44+
applyDefaultBackgroundStyle()
45+
}
3746

38-
private func styleCheckmark() {
47+
func styleCheckmark() {
3948
tintColor = StyleManager.wooCommerceBrandColor
4049
}
4150
}

WooCommerce/Classes/ViewRelated/ReusableViews/SwitchTableViewCell.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class SwitchTableViewCell: UITableViewCell {
5151
override func awakeFromNib() {
5252
super.awakeFromNib()
5353

54+
configureBackground()
5455
setupTextLabels()
5556
setupSwitch()
5657
setupGestureRecognizers()
@@ -66,6 +67,10 @@ class SwitchTableViewCell: UITableViewCell {
6667
//
6768
private extension SwitchTableViewCell {
6869

70+
func configureBackground() {
71+
applyDefaultBackgroundStyle()
72+
}
73+
6974
func setupTextLabels() {
7075
textLabel?.text = String()
7176
textLabel?.applyBodyStyle()

WooCommerce/Classes/ViewRelated/ReusableViews/TextViewTableViewCell.swift

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,32 @@ class TextViewTableViewCell: UITableViewCell {
3131

3232
override func awakeFromNib() {
3333
super.awakeFromNib()
34-
noteTextView.delegate = self
34+
35+
configureBackground()
36+
configureTextView()
37+
3538
noteIconButton.accessibilityTraits = .image
3639
}
3740
}
3841

42+
3943
extension TextViewTableViewCell: UITextViewDelegate {
4044
func textViewDidChange(_ textView: UITextView) {
4145
onTextChange?(noteTextView.text)
4246
}
4347
}
48+
49+
private extension TextViewTableViewCell {
50+
func configureBackground() {
51+
applyDefaultBackgroundStyle()
52+
}
53+
54+
func configureTextView() {
55+
noteTextView.delegate = self
56+
// Overriding the textview user interface style until Dark Mode
57+
// is fully supported
58+
if #available(iOS 13.0, *) {
59+
noteTextView.overrideUserInterfaceStyle = .light
60+
}
61+
}
62+
}

WooCommerce/Classes/ViewRelated/ReusableViews/TitleAndEditableValueTableViewCell.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ final class TitleAndEditableValueTableViewCell: UITableViewCell {
66

77
override func awakeFromNib() {
88
super.awakeFromNib()
9+
configureBackground()
910
configureAsNonSelectable()
1011
styleTitle()
1112
styleValue()
@@ -14,6 +15,10 @@ final class TitleAndEditableValueTableViewCell: UITableViewCell {
1415

1516

1617
private extension TitleAndEditableValueTableViewCell {
18+
func configureBackground() {
19+
applyDefaultBackgroundStyle()
20+
}
21+
1722
func configureAsNonSelectable() {
1823
selectionStyle = .none
1924
}

WooCommerce/Classes/ViewRelated/ReusableViews/TopLeftImageTableViewCell.swift

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ class TopLeftImageTableViewCell: UITableViewCell {
77
override func awakeFromNib() {
88
super.awakeFromNib()
99

10-
textLabel?.applyBodyStyle()
11-
textLabel?.numberOfLines = 0
10+
configureBackground()
11+
configureTextLabel()
1212
}
1313

1414
override func layoutSubviews() {
@@ -18,6 +18,18 @@ class TopLeftImageTableViewCell: UITableViewCell {
1818
}
1919
}
2020

21+
22+
private extension TopLeftImageTableViewCell {
23+
func configureBackground() {
24+
applyDefaultBackgroundStyle()
25+
}
26+
27+
func configureTextLabel() {
28+
textLabel?.applyBodyStyle()
29+
textLabel?.numberOfLines = 0
30+
}
31+
}
32+
2133
extension TopLeftImageTableViewCell {
2234
struct Constants {
2335
static let iconW = CGFloat(24)

0 commit comments

Comments
 (0)