Skip to content

Commit 39e1a9d

Browse files
committed
Merge branch develop into issue/2282-rearrange-order-details-section
2 parents b67271e + f22bf57 commit 39e1a9d

File tree

75 files changed

+1983
-753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1983
-753
lines changed

Networking/Networking.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@
18391839
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
18401840
GCC_WARN_UNUSED_FUNCTION = YES;
18411841
GCC_WARN_UNUSED_VARIABLE = YES;
1842-
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
1842+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
18431843
MTL_ENABLE_DEBUG_INFO = NO;
18441844
SDKROOT = iphoneos;
18451845
SWIFT_COMPILATION_MODE = wholemodule;
@@ -1865,7 +1865,7 @@
18651865
DYLIB_INSTALL_NAME_BASE = "@rpath";
18661866
INFOPLIST_FILE = Networking/Info.plist;
18671867
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1868-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1868+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
18691869
LD_RUNPATH_SEARCH_PATHS = (
18701870
"$(inherited)",
18711871
"@executable_path/Frameworks",
@@ -1953,7 +1953,7 @@
19531953
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
19541954
GCC_WARN_UNUSED_FUNCTION = YES;
19551955
GCC_WARN_UNUSED_VARIABLE = YES;
1956-
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
1956+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
19571957
MTL_ENABLE_DEBUG_INFO = YES;
19581958
ONLY_ACTIVE_ARCH = YES;
19591959
SDKROOT = iphoneos;
@@ -2011,7 +2011,7 @@
20112011
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
20122012
GCC_WARN_UNUSED_FUNCTION = YES;
20132013
GCC_WARN_UNUSED_VARIABLE = YES;
2014-
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
2014+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
20152015
MTL_ENABLE_DEBUG_INFO = NO;
20162016
SDKROOT = iphoneos;
20172017
SWIFT_COMPILATION_MODE = wholemodule;
@@ -2037,7 +2037,7 @@
20372037
DYLIB_INSTALL_NAME_BASE = "@rpath";
20382038
INFOPLIST_FILE = Networking/Info.plist;
20392039
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
2040-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
2040+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
20412041
LD_RUNPATH_SEARCH_PATHS = (
20422042
"$(inherited)",
20432043
"@executable_path/Frameworks",
@@ -2067,7 +2067,7 @@
20672067
DYLIB_INSTALL_NAME_BASE = "@rpath";
20682068
INFOPLIST_FILE = Networking/Info.plist;
20692069
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
2070-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
2070+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
20712071
LD_RUNPATH_SEARCH_PATHS = (
20722072
"$(inherited)",
20732073
"@executable_path/Frameworks",

Podfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@ target 'WooCommerce' do
3131

3232
pod 'Gridicons', '~> 1.0'
3333

34-
pod 'WordPressAuthenticator', '~> 1.16.0-beta.4'
3534
# To allow pod to pick up beta versions use -beta. E.g., 1.1.7-beta.1
36-
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => ''
35+
pod 'WordPressAuthenticator', '~> 1.16.0-beta.5'
3736
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => ''
37+
# pod 'WordPressShared', :git => 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', :branch => ''
3838
# pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS'
3939

40-
# pod 'WordPressShared', :git => 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', :branch => ''
4140
pod 'WordPressShared', '~> 1.8.16'
4241

4342
pod 'WordPressUI', '~> 1.6.0'

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ PODS:
4949
- WordPress-Aztec-iOS (1.11.0)
5050
- WordPress-Editor-iOS (1.11.0):
5151
- WordPress-Aztec-iOS (= 1.11.0)
52-
- WordPressAuthenticator (1.16.0-beta.4):
52+
- WordPressAuthenticator (1.16.0-beta.5):
5353
- 1PasswordExtension (= 1.8.6)
5454
- Alamofire (= 4.8)
5555
- CocoaLumberjack (~> 3.5)
@@ -101,7 +101,7 @@ DEPENDENCIES:
101101
- KeychainAccess (~> 3.2)
102102
- Kingfisher (~> 5.11.0)
103103
- WordPress-Editor-iOS (~> 1.11.0)
104-
- WordPressAuthenticator (~> 1.16.0-beta.4)
104+
- WordPressAuthenticator (~> 1.16.0-beta.5)
105105
- WordPressShared (~> 1.8.16)
106106
- WordPressUI (~> 1.6.0)
107107
- Wormholy (~> 1.6.0)
@@ -172,7 +172,7 @@ SPEC CHECKSUMS:
172172
UIDeviceIdentifier: 44f805037d21b94394821828f4fcaba34b38c2d0
173173
WordPress-Aztec-iOS: 050b34d4c3adfb7c60363849049b13d60683b348
174174
WordPress-Editor-iOS: 304098424f1051cb271546c99f906aac296b1b81
175-
WordPressAuthenticator: c1325eaa78b55e6d76a036ccad58f00221133d55
175+
WordPressAuthenticator: 464f19a6afd4342daeb70ac40b583c02fdd62072
176176
WordPressKit: 84045e236949248632a2c644149e5657733011bb
177177
WordPressShared: 1bc316ed162f42af4e0fa2869437e9e28b532b01
178178
WordPressUI: cbe8cce4bd529caf5969750c34ba2d2026a342a9
@@ -188,6 +188,6 @@ SPEC CHECKSUMS:
188188
ZendeskSupportProvidersSDK: e183d32abac888c448469e2005c4a5a8c3ed73f0
189189
ZendeskSupportSDK: e52f37fa8bcba91f024b81025869fe5a2860f741
190190

191-
PODFILE CHECKSUM: dbb315153e9e7c8dd4dd49950c6913a8613dbe84
191+
PODFILE CHECKSUM: 5e2d323a9e3ee0c3aa9e71400a53de7e1147c597
192192

193193
COCOAPODS: 1.9.1

RELEASE-NOTES.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
4.4
2+
-----
3+
- In Order Details, the Payment card is now shown right after the Products and Refunded Products cards.
4+
15
4.3
26
-----
37
- Products: now the Product details can be edited and saved outside Products tab (e.g. from Order details or Top Performers).
8+
- [internal]: the navigation to the password entry screen has changed and can cause regressions. See https://git.io/JflDW for testing details.
49
- [internal] Refactored some API calls for fetching a Note, Product, and Product Review.
510
- Products: we improved our VoiceOver support in Product Price settings
611
- In Settings > Experimental Features, a Products switch is now available for turning Products M2 features on and off for simple products (default off for beta testing). Products M2 features: update product images, product settings, viewing and sharing a product.
7-
- In Order Details, the Payment card is now shown right after the Products and Refunded Products cards.
12+
- The WIP banner on the Products tab is now collapsed by default for more vertical space.
13+
- Dropped iOS 11 support. From now we support iOS 12 and later.
814

915

1016
4.2

Storage/Storage.xcodeproj/project.pbxproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@
956956
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
957957
GCC_WARN_UNUSED_FUNCTION = YES;
958958
GCC_WARN_UNUSED_VARIABLE = YES;
959-
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
959+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
960960
MTL_ENABLE_DEBUG_INFO = NO;
961961
SDKROOT = iphoneos;
962962
SWIFT_COMPILATION_MODE = wholemodule;
@@ -982,7 +982,7 @@
982982
DYLIB_INSTALL_NAME_BASE = "@rpath";
983983
INFOPLIST_FILE = Storage/Info.plist;
984984
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
985-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
985+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
986986
LD_RUNPATH_SEARCH_PATHS = (
987987
"$(inherited)",
988988
"@executable_path/Frameworks",
@@ -1006,7 +1006,7 @@
10061006
CODE_SIGN_STYLE = Automatic;
10071007
DEVELOPMENT_TEAM = PZYM8XX95Q;
10081008
INFOPLIST_FILE = StorageTests/Info.plist;
1009-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1009+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
10101010
LD_RUNPATH_SEARCH_PATHS = (
10111011
"$(inherited)",
10121012
"@executable_path/Frameworks",
@@ -1073,7 +1073,7 @@
10731073
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
10741074
GCC_WARN_UNUSED_FUNCTION = YES;
10751075
GCC_WARN_UNUSED_VARIABLE = YES;
1076-
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
1076+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
10771077
MTL_ENABLE_DEBUG_INFO = YES;
10781078
ONLY_ACTIVE_ARCH = YES;
10791079
SDKROOT = iphoneos;
@@ -1131,7 +1131,7 @@
11311131
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
11321132
GCC_WARN_UNUSED_FUNCTION = YES;
11331133
GCC_WARN_UNUSED_VARIABLE = YES;
1134-
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
1134+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
11351135
MTL_ENABLE_DEBUG_INFO = NO;
11361136
SDKROOT = iphoneos;
11371137
SWIFT_COMPILATION_MODE = wholemodule;
@@ -1157,7 +1157,7 @@
11571157
DYLIB_INSTALL_NAME_BASE = "@rpath";
11581158
INFOPLIST_FILE = Storage/Info.plist;
11591159
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1160-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1160+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
11611161
LD_RUNPATH_SEARCH_PATHS = (
11621162
"$(inherited)",
11631163
"@executable_path/Frameworks",
@@ -1187,7 +1187,7 @@
11871187
DYLIB_INSTALL_NAME_BASE = "@rpath";
11881188
INFOPLIST_FILE = Storage/Info.plist;
11891189
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1190-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1190+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
11911191
LD_RUNPATH_SEARCH_PATHS = (
11921192
"$(inherited)",
11931193
"@executable_path/Frameworks",
@@ -1211,7 +1211,7 @@
12111211
CODE_SIGN_STYLE = Automatic;
12121212
DEVELOPMENT_TEAM = PZYM8XX95Q;
12131213
INFOPLIST_FILE = StorageTests/Info.plist;
1214-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1214+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
12151215
LD_RUNPATH_SEARCH_PATHS = (
12161216
"$(inherited)",
12171217
"@executable_path/Frameworks",
@@ -1236,7 +1236,7 @@
12361236
CODE_SIGN_STYLE = Automatic;
12371237
DEVELOPMENT_TEAM = PZYM8XX95Q;
12381238
INFOPLIST_FILE = StorageTests/Info.plist;
1239-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1239+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
12401240
LD_RUNPATH_SEARCH_PATHS = (
12411241
"$(inherited)",
12421242
"@executable_path/Frameworks",

WooCommerce/Classes/Analytics/WooAnalyticsStat.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,41 @@ public enum WooAnalyticsStat: String {
267267
case productShippingSettingsDoneButtonTapped = "product_shipping_settings_done_button_tapped"
268268
case productInventorySettingsDoneButtonTapped = "product_inventory_settings_done_button_tapped"
269269

270+
// Product Images Events
271+
//
272+
case productImageSettingsDoneButtonTapped = "product_image_settings_done_button_tapped"
273+
case productDetailAddImageTapped = "product_detail_add_image_tapped"
274+
case productImageSettingsAddImagesButtonTapped = "product_image_settings_add_images_button_tapped"
275+
case productImageSettingsAddImagesSourceTapped = "product_image_settings_add_images_source_tapped"
276+
case productImageSettingsDeleteImageButtonTapped = "product_image_settings_delete_image_button_tapped"
277+
278+
// Product More Menu
279+
//
280+
case productDetailViewProductButtonTapped = "product_detail_view_external_tapped"
281+
case productDetailShareButtonTapped = "product_detail_share_button_tapped"
282+
283+
// Product Settings
284+
//
285+
case productDetailViewSettingsButtonTapped = "product_detail_view_settings_button_tapped"
286+
case productSettingsDoneButtonTapped = "product_settings_done_button_tapped"
287+
case productSettingsStatusTapped = "product_settings_status_tapped"
288+
case productSettingsVisibilityTapped = "product_settings_visibility_tapped"
289+
case productSettingsCatalogVisibilityTapped = "product_settings_catalog_visibility_tapped"
290+
case productDetailViewShortDescriptionTapped = "product_detail_view_short_description_tapped"
291+
case productShortDescriptionDoneButtonTapped = "product_short_description_done_button_tapped"
292+
case productSettingsSlugTapped = "product_settings_slug_tapped"
293+
case productSettingsPurchaseNoteTapped = "product_settings_purchase_note_tapped"
294+
case productSettingsMenuOrderTapped = "product_settings_menu_order_tapped"
295+
296+
// Product List Sorting/Filtering
297+
//
298+
case productListViewSortingOptionsTapped = "product_list_view_sorting_options_tapped"
299+
case productSortingListOptionSelected = "product_sorting_list_option_selected"
300+
case productListViewFilterOptionsTapped = "product_list_view_filter_options_tapped"
301+
case productFilterListShowProductsButtonTapped = "product_filter_list_show_products_button_tapped"
302+
case productFilterListClearMenuButtonTapped = "product_filter_list_clear_menu_button_tapped"
303+
case productFilterListDismissButtonTapped = "product_filter_list_dismiss_button_tapped"
304+
270305
// Readonly Product Variations Events
271306
//
272307
case productDetailsProductVariantsTapped = "product_detail_view_product_variants_tapped"

WooCommerce/Classes/Extensions/Date+Woo.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ extension Date {
106106

107107
return selfYear == otherYear
108108
}
109+
110+
/// Returns `true` if `self` is in the same day as `other`.
111+
///
112+
func isSameDay(as other: Date, using calendar: Calendar = .current) -> Bool {
113+
calendar.isDate(self, inSameDayAs: other)
114+
}
109115
}
110116

111117

WooCommerce/Classes/Extensions/DateFormatter+Helpers.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,12 @@ extension DateFormatter {
138138
formatter.setLocalizedDateFormatFromTemplate("yyyy")
139139
return formatter
140140
}()
141+
142+
/// Localized date formatter that generates the time only. Example, “11:23 AM”.
143+
///
144+
static let timeFormatter: DateFormatter = {
145+
let formatter = DateFormatter()
146+
formatter.setLocalizedDateFormatFromTemplate("hh:mm a")
147+
return formatter
148+
}()
141149
}

WooCommerce/Classes/Tools/Zendesk/ZendeskManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ private extension ZendeskManager {
578578
}
579579
}()
580580

581-
let networkCarrier = CTTelephonyNetworkInfo().subscriberCellularProvider
581+
let networkCarrier = CTTelephonyNetworkInfo().serviceSubscriberCellularProviders?.first?.value
582582
let carrierName = networkCarrier?.carrierName ?? Constants.unknownValue
583583
let carrierCountryCode = networkCarrier?.isoCountryCode ?? Constants.unknownValue
584584

WooCommerce/Classes/ViewModels/Order Details/OrderDetailsDataSource.swift

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,6 @@ final class OrderDetailsDataSource: NSObject {
3838
///
3939
var trackingIsReachable: Bool = false
4040

41-
/// For example, #560 Pamela Nguyen
42-
///
43-
var summaryTitle: String? {
44-
if let billingAddress = order.billingAddress {
45-
return "#\(order.number) \(billingAddress.firstName) \(billingAddress.lastName)"
46-
}
47-
return "#\(order.number)"
48-
}
49-
50-
/// For example, Oct 1, 2019 at 2:31 PM
51-
///
52-
private var summaryDateCreated: String {
53-
return order.dateModified.relativelyFormattedUpdateString
54-
}
55-
5641
/// Closure to be executed when the cell was tapped.
5742
///
5843
var onCellAction: ((CellActionType, IndexPath?) -> Void)?
@@ -512,18 +497,16 @@ private extension OrderDetailsDataSource {
512497
}
513498

514499
private func configureSummary(cell: SummaryTableViewCell) {
515-
cell.title = summaryTitle
516-
cell.dateCreated = summaryDateCreated
500+
let cellViewModel = SummaryTableViewCellViewModel(
501+
order: order,
502+
status: lookUpOrderStatus(for: order)
503+
)
504+
505+
cell.configure(cellViewModel)
506+
517507
cell.onEditTouchUp = { [weak self] in
518508
self?.onCellAction?(.summary, nil)
519509
}
520-
521-
522-
let status = lookUpOrderStatus(for: order)?.status ?? OrderStatusEnum(rawValue: order.statusKey)
523-
let statusName = lookUpOrderStatus(for: order)?.name ?? order.statusKey
524-
let presentation = SummaryTableViewCellPresentation(status: status, statusName: statusName)
525-
526-
cell.display(presentation: presentation)
527510
}
528511
}
529512

0 commit comments

Comments
 (0)