Skip to content

Commit

Permalink
Unified cell to show shipping notice in order detail
Browse files Browse the repository at this point in the history
  • Loading branch information
pmusolino committed Nov 12, 2019
1 parent b0f13bb commit 69b5bca
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private extension OrderDetailsDataSource {
configureShippingMethod(cell: cell)
case let cell as WooBasicTableViewCell where row == .billingDetail:
configureBillingDetail(cell: cell)
case let cell as LeftImageMultilineTableViewCell where row == .shippingNotice:
case let cell as TopLeftImageTableViewCell where row == .shippingNotice:
configureShippingNotice(cell: cell)
case let cell as LeftImageTableViewCell where row == .addOrderNote:
configureNewNote(cell: cell)
Expand Down Expand Up @@ -228,12 +228,12 @@ private extension OrderDetailsDataSource {
)
}

func configureShippingNotice(cell: LeftImageMultilineTableViewCell) {
func configureShippingNotice(cell: TopLeftImageTableViewCell) {
let cellTextContent = NSLocalizedString(
"This order is using extensions to calculate shipping. The shipping methods shown might be incomplete.",
comment: "Shipping notice row label when there is more than one shipping method")
cell.leftImage = Icons.shippingNoticeIcon
cell.labelText = cellTextContent
cell.imageView?.image = Icons.shippingNoticeIcon
cell.textLabel?.text = cellTextContent
cell.selectionStyle = .none

cell.accessibilityTraits = .staticText
Expand Down Expand Up @@ -603,7 +603,7 @@ extension OrderDetailsDataSource {
case .trackingAdd:
return LeftImageTableViewCell.reuseIdentifier
case .shippingNotice:
return LeftImageMultilineTableViewCell.reuseIdentifier
return TopLeftImageTableViewCell.reuseIdentifier
case .addOrderNote:
return LeftImageTableViewCell.reuseIdentifier
case .orderNoteHeader:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ extension OrderDetailsViewModel {
///
func registerTableViewCells(_ tableView: UITableView) {
let cells = [
LeftImageMultilineTableViewCell.self,
TopLeftImageTableViewCell.self,
LeftImageTableViewCell.self,
CustomerNoteTableViewCell.self,
CustomerInfoTableViewCell.self,
Expand Down

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions WooCommerce/WooCommerce.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@
45C8B2662316AB460002FA77 /* BillingAddressTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C8B2642316AB460002FA77 /* BillingAddressTableViewCell.swift */; };
45C8B2672316AB460002FA77 /* BillingAddressTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 45C8B2652316AB460002FA77 /* BillingAddressTableViewCell.xib */; };
45C8B2692316B2440002FA77 /* BillingAddressTableViewCellTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C8B2682316B2440002FA77 /* BillingAddressTableViewCellTests.swift */; };
45E186372372D8D0009241F3 /* LeftImageMultilineTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45E186352372D8D0009241F3 /* LeftImageMultilineTableViewCell.swift */; };
45E186382372D8D0009241F3 /* LeftImageMultilineTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 45E186362372D8D0009241F3 /* LeftImageMultilineTableViewCell.xib */; };
74036CC0211B882100E462C2 /* PeriodDataViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74036CBF211B882100E462C2 /* PeriodDataViewController.swift */; };
740382DB2267D94100A627F4 /* LargeImageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 740382D92267D94100A627F4 /* LargeImageTableViewCell.swift */; };
740382DC2267D94100A627F4 /* LargeImageTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 740382DA2267D94100A627F4 /* LargeImageTableViewCell.xib */; };
Expand Down Expand Up @@ -556,8 +554,6 @@
45C8B2642316AB460002FA77 /* BillingAddressTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BillingAddressTableViewCell.swift; sourceTree = "<group>"; };
45C8B2652316AB460002FA77 /* BillingAddressTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BillingAddressTableViewCell.xib; sourceTree = "<group>"; };
45C8B2682316B2440002FA77 /* BillingAddressTableViewCellTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BillingAddressTableViewCellTests.swift; sourceTree = "<group>"; };
45E186352372D8D0009241F3 /* LeftImageMultilineTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftImageMultilineTableViewCell.swift; sourceTree = "<group>"; };
45E186362372D8D0009241F3 /* LeftImageMultilineTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LeftImageMultilineTableViewCell.xib; sourceTree = "<group>"; };
6DC4526F9A7357761197EBF0 /* Pods_WooCommerceTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WooCommerceTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74036CBF211B882100E462C2 /* PeriodDataViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeriodDataViewController.swift; sourceTree = "<group>"; };
740382D92267D94100A627F4 /* LargeImageTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LargeImageTableViewCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2018,8 +2014,6 @@
740382DA2267D94100A627F4 /* LargeImageTableViewCell.xib */,
CE1EC8EA20B8A3FF009762BF /* LeftImageTableViewCell.swift */,
CE1EC8EB20B8A3FF009762BF /* LeftImageTableViewCell.xib */,
45E186352372D8D0009241F3 /* LeftImageMultilineTableViewCell.swift */,
45E186362372D8D0009241F3 /* LeftImageMultilineTableViewCell.xib */,
B5BE75DA213F1D1E00909A14 /* OverlayMessageView.swift */,
B5BE75DC213F1D3D00909A14 /* OverlayMessageView.xib */,
CE0F17CD22A8105800964A63 /* ReadMoreTableViewCell.swift */,
Expand Down Expand Up @@ -2338,7 +2332,6 @@
CE21B3E120FFC59700A259D5 /* ProductDetailsTableViewCell.xib in Resources */,
CE35F11C2343F3B1007B2A6B /* TwoColumnHeadlineFootnoteTableViewCell.xib in Resources */,
CE85FD5320F677770080B73E /* Dashboard.storyboard in Resources */,
45E186382372D8D0009241F3 /* LeftImageMultilineTableViewCell.xib in Resources */,
B56DB3CF2049BFAA00D4AA8E /* Main.storyboard in Resources */,
CE21B3D820FE669A00A259D5 /* BasicTableViewCell.xib in Resources */,
74334F37214AB130006D6AC5 /* ProductTableViewCell.xib in Resources */,
Expand Down Expand Up @@ -2614,7 +2607,6 @@
B58B4AC02108FF6100076FDD /* Array+Helpers.swift in Sources */,
B5A56BF0219F2CE90065A902 /* VerticalButton.swift in Sources */,
748C7780211E18A600814F2C /* OrderStats+Woo.swift in Sources */,
45E186372372D8D0009241F3 /* LeftImageMultilineTableViewCell.swift in Sources */,
D831E2DC230E0558000037D0 /* Authentication.swift in Sources */,
024A543422BA6F8F00F4F38E /* DeveloperEmailChecker.swift in Sources */,
D8736B5A22F07D7100A14A29 /* MainTabViewModel.swift in Sources */,
Expand Down

0 comments on commit 69b5bca

Please sign in to comment.