Skip to content

Commit a2d9ad1

Browse files
committed
Merge remote-tracking branch 'origin/trunk' into localization-improvements-part-4-delete-unused-localization-code
2 parents 1615390 + 600cab1 commit a2d9ad1

File tree

105 files changed

+1232
-908
lines changed

Some content is hidden

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

105 files changed

+1232
-908
lines changed

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
1919
return true
2020
case .productSKUInputScanner:
2121
return true
22-
case .canadaInPersonPayments:
23-
return buildConfig == .localDeveloper || buildConfig == .alpha
2422
case .inbox:
2523
return buildConfig == .localDeveloper || buildConfig == .alpha
2624
case .bulkEditProductVariations:

Experiments/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ public enum FeatureFlag: Int {
3838
///
3939
case productSKUInputScanner
4040

41-
/// Support for In-Person Payments in Canada
42-
///
43-
case canadaInPersonPayments
44-
4541
/// Displays the Inbox option under the Hub Menu.
4642
///
4743
case inbox

Gemfile.lock

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
GIT
2+
remote: [email protected]:wordpress-mobile/release-toolkit
3+
revision: 48bf4f8ee18079154b2054b3014bed9f114416d6
4+
branch: trunk
5+
specs:
6+
fastlane-plugin-wpmreleasetoolkit (4.1.0)
7+
activesupport (~> 5)
8+
bigdecimal (~> 1.4)
9+
buildkit (~> 1.5)
10+
chroma (= 0.2.0)
11+
diffy (~> 3.3)
12+
git (~> 1.3)
13+
jsonlint (~> 0.3)
14+
nokogiri (~> 1.11)
15+
octokit (~> 4.18)
16+
parallel (~> 1.14)
17+
progress_bar (~> 1.3)
18+
rake (>= 12.3, < 14.0)
19+
rake-compiler (~> 1.0)
20+
121
GEM
222
remote: https://rubygems.org/
323
specs:
@@ -165,20 +185,6 @@ GEM
165185
xcpretty-travis-formatter (>= 0.0.3)
166186
fastlane-plugin-appcenter (1.11.1)
167187
fastlane-plugin-sentry (1.11.1)
168-
fastlane-plugin-wpmreleasetoolkit (4.1.0)
169-
activesupport (~> 5)
170-
bigdecimal (~> 1.4)
171-
buildkit (~> 1.5)
172-
chroma (= 0.2.0)
173-
diffy (~> 3.3)
174-
git (~> 1.3)
175-
jsonlint (~> 0.3)
176-
nokogiri (~> 1.11)
177-
octokit (~> 4.18)
178-
parallel (~> 1.14)
179-
progress_bar (~> 1.3)
180-
rake (>= 12.3, < 14.0)
181-
rake-compiler (~> 1.0)
182188
ffi (1.15.4)
183189
fourflusher (2.3.1)
184190
fuzzy_match (2.0.4)
@@ -247,15 +253,15 @@ GEM
247253
nap (1.1.0)
248254
naturally (2.2.1)
249255
netrc (0.11.0)
250-
nokogiri (1.13.4)
256+
nokogiri (1.13.6)
251257
mini_portile2 (~> 2.8.0)
252258
racc (~> 1.4)
253-
nokogiri (1.13.4-x86_64-darwin)
259+
nokogiri (1.13.6-x86_64-darwin)
254260
racc (~> 1.4)
255261
octokit (4.22.0)
256262
faraday (>= 0.9)
257263
sawyer (~> 0.8.0, >= 0.5.3)
258-
oj (3.13.11)
264+
oj (3.13.13)
259265
optimist (3.0.1)
260266
options (2.3.2)
261267
optparse (0.1.1)
@@ -281,7 +287,7 @@ GEM
281287
uber (< 0.2.0)
282288
retriable (3.1.2)
283289
rexml (3.2.5)
284-
rmagick (3.2.0)
290+
rmagick (4.2.5)
285291
rouge (2.0.7)
286292
rubocop (1.25.1)
287293
parallel (~> 1.10)
@@ -359,9 +365,9 @@ DEPENDENCIES
359365
fastlane (~> 2)
360366
fastlane-plugin-appcenter (~> 1.6)
361367
fastlane-plugin-sentry (~> 1.0)
362-
fastlane-plugin-wpmreleasetoolkit (~> 4.1)
368+
fastlane-plugin-wpmreleasetoolkit!
363369
rake (~> 12.3)
364-
rmagick (~> 3.2.0)
370+
rmagick (~> 4.1)
365371
rubocop (~> 1.25)
366372
rubocop-rake (~> 0.6)
367373
xcode-install

RELEASE-NOTES.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
*** PLEASE FOLLOW THIS FORMAT: [<priority indicator, more stars = higher priority>] <description> [<PR URL>]
22

3+
9.4
4+
-----
5+
6+
37
9.3
48
-----
9+
- [***] In-Person Payments is now available for merchants using WooCommerce Payments in Canada. [https://github.com/woocommerce/woocommerce-ios/pull/6954]
510
- [*] In-Person Payments: Accessibility improvement [https://github.com/woocommerce/woocommerce-ios/pull/6869, https://github.com/woocommerce/woocommerce-ios/pull/6886, https://github.com/woocommerce/woocommerce-ios/pull/6906]
611
- [*] Orders: Now it's possible to select and copy text from the notes on an order. [https://github.com/woocommerce/woocommerce-ios/pull/6894]
712
- [*] Support Arabic numerals on amount fields. [https://github.com/woocommerce/woocommerce-ios/pull/6891]
813
- [*] Product Selector: Enabled selecting all variations on variable product rows. [https://github.com/woocommerce/woocommerce-ios/pull/6899]
14+
- [internal] Order Creation: Adding new products, shipping, fee, or customer details to an order now blocks the UI immediately while the order is syncing remotely. [https://github.com/woocommerce/woocommerce-ios/pull/6974]
915

16+
- [*] Coupons: Now it's possible to update discount types for coupons. [https://github.com/woocommerce/woocommerce-ios/pull/6935]
17+
1018
9.2
1119
-----
1220
- [***] Experimental Features: Coupons editing and deletion features are now enabled as part of coupon management. [https://github.com/woocommerce/woocommerce-ios/pull/6853]

Storage/Storage/Model/Copiable/Models+Copiable.generated.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ extension GeneralAppSettings {
99
installationDate: NullableCopiableProp<Date> = .copy,
1010
feedbacks: CopiableProp<[FeedbackType: FeedbackSettings]> = .copy,
1111
isViewAddOnsSwitchEnabled: CopiableProp<Bool> = .copy,
12-
isCanadaInPersonPaymentsSwitchEnabled: CopiableProp<Bool> = .copy,
1312
isProductSKUInputScannerSwitchEnabled: CopiableProp<Bool> = .copy,
1413
isCouponManagementSwitchEnabled: CopiableProp<Bool> = .copy,
1514
knownCardReaders: CopiableProp<[String]> = .copy,
@@ -19,7 +18,6 @@ extension GeneralAppSettings {
1918
let installationDate = installationDate ?? self.installationDate
2019
let feedbacks = feedbacks ?? self.feedbacks
2120
let isViewAddOnsSwitchEnabled = isViewAddOnsSwitchEnabled ?? self.isViewAddOnsSwitchEnabled
22-
let isCanadaInPersonPaymentsSwitchEnabled = isCanadaInPersonPaymentsSwitchEnabled ?? self.isCanadaInPersonPaymentsSwitchEnabled
2321
let isProductSKUInputScannerSwitchEnabled = isProductSKUInputScannerSwitchEnabled ?? self.isProductSKUInputScannerSwitchEnabled
2422
let isCouponManagementSwitchEnabled = isCouponManagementSwitchEnabled ?? self.isCouponManagementSwitchEnabled
2523
let knownCardReaders = knownCardReaders ?? self.knownCardReaders
@@ -30,7 +28,6 @@ extension GeneralAppSettings {
3028
installationDate: installationDate,
3129
feedbacks: feedbacks,
3230
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
33-
isCanadaInPersonPaymentsSwitchEnabled: isCanadaInPersonPaymentsSwitchEnabled,
3431
isProductSKUInputScannerSwitchEnabled: isProductSKUInputScannerSwitchEnabled,
3532
isCouponManagementSwitchEnabled: isCouponManagementSwitchEnabled,
3633
knownCardReaders: knownCardReaders,

Storage/Storage/Model/GeneralAppSettings.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
2424
///
2525
public let isViewAddOnsSwitchEnabled: Bool
2626

27-
/// The state for the In-Person Payments in Canada feature switch
28-
///
29-
public let isCanadaInPersonPaymentsSwitchEnabled: Bool
30-
3127
/// The state(`true` or `false`) for the Product SKU Input Scanner feature switch.
3228
///
3329
public let isProductSKUInputScannerSwitchEnabled: Bool
@@ -51,7 +47,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
5147
public init(installationDate: Date?,
5248
feedbacks: [FeedbackType: FeedbackSettings],
5349
isViewAddOnsSwitchEnabled: Bool,
54-
isCanadaInPersonPaymentsSwitchEnabled: Bool,
5550
isProductSKUInputScannerSwitchEnabled: Bool,
5651
isCouponManagementSwitchEnabled: Bool,
5752
knownCardReaders: [String],
@@ -60,7 +55,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
6055
self.installationDate = installationDate
6156
self.feedbacks = feedbacks
6257
self.isViewAddOnsSwitchEnabled = isViewAddOnsSwitchEnabled
63-
self.isCanadaInPersonPaymentsSwitchEnabled = isCanadaInPersonPaymentsSwitchEnabled
6458
self.isProductSKUInputScannerSwitchEnabled = isProductSKUInputScannerSwitchEnabled
6559
self.isCouponManagementSwitchEnabled = isCouponManagementSwitchEnabled
6660
self.knownCardReaders = knownCardReaders
@@ -89,7 +83,6 @@ public struct GeneralAppSettings: Codable, Equatable, GeneratedCopiable {
8983
installationDate: installationDate,
9084
feedbacks: updatedFeedbacks,
9185
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
92-
isCanadaInPersonPaymentsSwitchEnabled: isCanadaInPersonPaymentsSwitchEnabled,
9386
isProductSKUInputScannerSwitchEnabled: isProductSKUInputScannerSwitchEnabled,
9487
isCouponManagementSwitchEnabled: isCouponManagementSwitchEnabled,
9588
knownCardReaders: knownCardReaders,
@@ -108,7 +101,6 @@ extension GeneralAppSettings {
108101
self.installationDate = try container.decodeIfPresent(Date.self, forKey: .installationDate)
109102
self.feedbacks = try container.decodeIfPresent([FeedbackType: FeedbackSettings].self, forKey: .feedbacks) ?? [:]
110103
self.isViewAddOnsSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isViewAddOnsSwitchEnabled) ?? false
111-
self.isCanadaInPersonPaymentsSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isCanadaInPersonPaymentsSwitchEnabled) ?? false
112104
self.isProductSKUInputScannerSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isProductSKUInputScannerSwitchEnabled) ?? false
113105
self.isCouponManagementSwitchEnabled = try container.decodeIfPresent(Bool.self, forKey: .isCouponManagementSwitchEnabled) ?? false
114106
self.knownCardReaders = try container.decodeIfPresent([String].self, forKey: .knownCardReaders) ?? []

Storage/StorageTests/Model/AppSettings/GeneralAppSettingsTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ final class GeneralAppSettingsTests: XCTestCase {
6161
let previousSettings = GeneralAppSettings(installationDate: installationDate,
6262
feedbacks: feedbackSettings,
6363
isViewAddOnsSwitchEnabled: true,
64-
isCanadaInPersonPaymentsSwitchEnabled: true,
6564
isProductSKUInputScannerSwitchEnabled: true,
6665
isCouponManagementSwitchEnabled: true,
6766
knownCardReaders: readers,
@@ -82,7 +81,6 @@ final class GeneralAppSettingsTests: XCTestCase {
8281
assertEqual(newSettings.knownCardReaders, readers)
8382
assertEqual(newSettings.lastEligibilityErrorInfo, eligibilityInfo)
8483
assertEqual(newSettings.isViewAddOnsSwitchEnabled, false)
85-
assertEqual(newSettings.isCanadaInPersonPaymentsSwitchEnabled, true)
8684
assertEqual(newSettings.isProductSKUInputScannerSwitchEnabled, true)
8785
assertEqual(newSettings.isCouponManagementSwitchEnabled, true)
8886
assertEqual(newSettings.lastJetpackBenefitsBannerDismissedTime, jetpackBannerDismissedDate)
@@ -93,7 +91,6 @@ private extension GeneralAppSettingsTests {
9391
func createGeneralAppSettings(installationDate: Date? = nil,
9492
feedbacks: [FeedbackType: FeedbackSettings] = [:],
9593
isViewAddOnsSwitchEnabled: Bool = false,
96-
isCanadaInPersonPaymentsSwitchEnabled: Bool = false,
9794
isProductSKUInputScannerSwitchEnabled: Bool = false,
9895
isCouponManagementSwitchEnabled: Bool = false,
9996
knownCardReaders: [String] = [],
@@ -102,7 +99,6 @@ private extension GeneralAppSettingsTests {
10299
GeneralAppSettings(installationDate: installationDate,
103100
feedbacks: feedbacks,
104101
isViewAddOnsSwitchEnabled: isViewAddOnsSwitchEnabled,
105-
isCanadaInPersonPaymentsSwitchEnabled: isCanadaInPersonPaymentsSwitchEnabled,
106102
isProductSKUInputScannerSwitchEnabled: isProductSKUInputScannerSwitchEnabled,
107103
isCouponManagementSwitchEnabled: isCouponManagementSwitchEnabled,
108104
knownCardReaders: knownCardReaders,

WooCommerce/Classes/Authentication/Navigation Exceptions/ULErrorViewController.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ final class ULErrorViewController: UIViewController {
4848
configurePrimaryButton()
4949
configureSecondaryButton()
5050

51+
configureButtonLabels()
52+
5153
setUnifiedMargins(forWidth: view.frame.width)
5254

5355
viewModel.viewDidLoad()
@@ -86,7 +88,6 @@ private extension ULErrorViewController {
8688
extraInfoButton.applyLinkButtonStyle()
8789
extraInfoButton.contentEdgeInsets = Constants.extraInfoCustomInsets
8890
extraInfoButton.setTitle(viewModel.auxiliaryButtonTitle, for: .normal)
89-
extraInfoButton.titleLabel?.numberOfLines = 2
9091
extraInfoButton.titleLabel?.textAlignment = .center
9192
extraInfoButton.on(.touchUpInside) { [weak self] _ in
9293
self?.didTapAuxiliaryButton()
@@ -108,6 +109,14 @@ private extension ULErrorViewController {
108109
}
109110
}
110111

112+
func configureButtonLabels() {
113+
let buttons = [extraInfoButton, primaryButton, secondaryButton]
114+
for button in buttons {
115+
button?.titleLabel?.numberOfLines = 0
116+
button?.titleLabel?.lineBreakMode = .byWordWrapping
117+
}
118+
}
119+
111120

112121
/// This logic is lifted from WPAuthenticator's LoginPrologueViewController
113122
/// This View Controller will be provided to WPAuthenticator. WPAuthenticator
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import Yosemite
2+
import Foundation
3+
4+
private extension CardPresentPaymentsPlugin {
5+
var setupURLSectionPath: String {
6+
switch self {
7+
case .wcPay:
8+
return "woocommerce_payments"
9+
case .stripe:
10+
return "stripe"
11+
}
12+
}
13+
}
14+
15+
/// Encapsulates the logic related to the provision of the Site URLs that point to plugins related content
16+
///
17+
extension Site {
18+
/// Site's plugins section in wp-admin.
19+
///
20+
var pluginsURL: String {
21+
adminURL + "plugins.php"
22+
}
23+
24+
/// Payment plugin settings in wp-admin. This can be helpful when the plugin needs to be setup completely.
25+
///
26+
func pluginSettingsSectionURL(from plugin: CardPresentPaymentsPlugin) -> String {
27+
adminURL + "admin.php?page=wc-settings&tab=checkout&section=" + plugin.setupURLSectionPath
28+
}
29+
}

WooCommerce/Classes/Extensions/UIImage+Woo.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,24 @@ extension UIImage {
293293
return UIImage.gridicon(.filter)
294294
}
295295

296+
/// Fixed cart discount icon
297+
///
298+
static var fixedCartDiscountIcon: UIImage {
299+
return UIImage(named: "icon-fixed-cart-discount")!
300+
}
301+
302+
/// Fixed product discount icon
303+
///
304+
static var fixedProductDiscountIcon: UIImage {
305+
return UIImage(named: "icon-fixed-product-discount")!
306+
}
307+
308+
/// Percentage discount icon
309+
///
310+
static var percentageDiscountIcon: UIImage {
311+
return UIImage(named: "icon-percentage-discount")!
312+
}
313+
296314
/// Gift Icon (with a red dot at the top right corner)
297315
///
298316
static var giftWithTopRightRedDotImage: UIImage {

0 commit comments

Comments
 (0)