Skip to content

Commit 8755175

Browse files
committed
Make PaddedLabel and apply POS styles
1 parent dba9c7d commit 8755175

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Details/Order Summary Section/SummaryTableViewCell.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class SummaryTableViewCell: UITableViewCell {
1414

1515
/// Shows the sales channel if appropiate, at the moment only Point of Sale
1616
///
17-
@IBOutlet private weak var salesChannelLabel: UILabel!
17+
@IBOutlet private weak var salesChannelLabel: PaddedLabel!
1818

1919
/// Label: Payment Status
2020
///
@@ -104,8 +104,7 @@ private extension SummaryTableViewCell {
104104

105105
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.pointOfSaleOrdersi1) {
106106
salesChannelLabel.isHidden = false
107-
salesChannelLabel.applyFootnoteStyle()
108-
salesChannelLabel.accessibilityIdentifier = "summary-table-view-cell-sales-channel-label"
107+
configureSalesChannelLabel()
109108
} else {
110109
salesChannelLabel.isHidden = true
111110
}
@@ -119,6 +118,13 @@ private extension SummaryTableViewCell {
119118
configureIconForVoiceOver()
120119
}
121120

121+
func configureSalesChannelLabel() {
122+
salesChannelLabel.numberOfLines = 1
123+
salesChannelLabel.textInsets = UIEdgeInsets(top: 4, left: 8, bottom: 4, right: 8)
124+
salesChannelLabel.applySalesChannelStyle()
125+
salesChannelLabel.accessibilityIdentifier = "summary-table-view-cell-sales-channel-label"
126+
}
127+
122128
@objc func editWasTapped() {
123129
onEditTouchUp?()
124130
}

WooCommerce/Classes/ViewRelated/Orders/Order Details/Order Summary Section/SummaryTableViewCell.xib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<nil key="textColor"/>
2727
<nil key="highlightedColor"/>
2828
</label>
29-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sales Channel" textAlignment="right" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kU8-dT-4zl" userLabel="Sales Channel Label">
29+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="255" verticalHuggingPriority="255" text="Sales Channel" textAlignment="right" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kU8-dT-4zl" userLabel="Sales Channel Label" customClass="PaddedLabel" customModule="WooCommerce" customModuleProvider="target">
3030
<rect key="frame" x="146" y="0.0" width="142" height="40"/>
3131
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
3232
<nil key="textColor"/>

0 commit comments

Comments
 (0)