Skip to content

Commit b1ebb31

Browse files
committed
Merge branch 'trunk' into issue/6204-remove-stripe-ipp-from-experimental
2 parents 440cc62 + 961f98d commit b1ebb31

File tree

16 files changed

+153
-103
lines changed

16 files changed

+153
-103
lines changed

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
77
switch featureFlag {
88
case .barcodeScanner:
99
return buildConfig == .localDeveloper || buildConfig == .alpha
10-
case .largeTitles:
11-
return true
1210
case .shippingLabelsM2M3:
1311
return true
1412
case .shippingLabelsInternational:

Experiments/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ public enum FeatureFlag: Int {
1010
///
1111
case barcodeScanner
1212

13-
/// Large titles on the main tabs
14-
///
15-
case largeTitles
16-
1713
/// Product Reviews
1814
///
1915
case reviews

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,4 +345,4 @@ DEPENDENCIES
345345
xcpretty-travis-formatter
346346

347347
BUNDLED WITH
348-
2.2.27
348+
2.3.7

WooCommerce/Classes/Extensions/UINavigationBar+Appearance.swift

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,16 @@ extension UINavigationBar {
99
/// Applies the default WC's Appearance
1010
///
1111
class func applyWooAppearance() {
12-
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.largeTitles) {
13-
let appearance = UINavigationBarAppearance()
14-
appearance.configureWithOpaqueBackground()
15-
appearance.backgroundColor = .listForeground
16-
appearance.titleTextAttributes = [.foregroundColor: UIColor.text]
17-
appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.text]
12+
let appearance = UINavigationBarAppearance()
13+
appearance.configureWithOpaqueBackground()
14+
appearance.backgroundColor = .listForeground
15+
appearance.titleTextAttributes = [.foregroundColor: UIColor.text]
16+
appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.text]
1817

19-
UINavigationBar.appearance().tintColor = .accent // The color of bar button items in the navigation bar
20-
UINavigationBar.appearance().standardAppearance = appearance
21-
UINavigationBar.appearance().compactAppearance = appearance
22-
UINavigationBar.appearance().scrollEdgeAppearance = appearance
23-
} else {
24-
let appearance = UINavigationBar.appearance()
25-
appearance.barTintColor = .appBar
26-
appearance.titleTextAttributes = [.foregroundColor: UIColor.white]
27-
appearance.isTranslucent = false
28-
appearance.tintColor = .white
29-
}
18+
UINavigationBar.appearance().tintColor = .accent // The color of bar button items in the navigation bar
19+
UINavigationBar.appearance().standardAppearance = appearance
20+
UINavigationBar.appearance().compactAppearance = appearance
21+
UINavigationBar.appearance().scrollEdgeAppearance = appearance
3022
}
3123

3224
/// Applies UIKit's Default Appearance

WooCommerce/Classes/Styles/UIColor+SemanticColors.swift

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,7 @@ extension UIColor {
158158
/// App Navigation Bar.
159159
///
160160
static var appBar: UIColor {
161-
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.largeTitles) {
162-
return UIColor(light: .white, dark: .black)
163-
} else {
164-
return UIColor(light: .withColorStudio(.wooCommercePurple, shade: .shade60),
165-
dark: .systemColor(.secondarySystemGroupedBackground))
166-
}
161+
UIColor(light: .white, dark: .black)
167162
}
168163

169164
/// App Tab Bar.
@@ -283,11 +278,7 @@ extension UIColor {
283278
/// Color for loading indicators within navigation bars
284279
///
285280
static var navigationBarLoadingIndicator: UIColor {
286-
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.largeTitles) {
287-
return .systemGray
288-
} else {
289-
return .white
290-
}
281+
.systemGray
291282
}
292283

293284
/// SearchBar background color.

WooCommerce/Classes/System/WooTabNavigationController.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@ import UIKit
66
final class WooTabNavigationController: WooNavigationController {
77
init() {
88
super.init(nibName: nil, bundle: nil)
9-
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.largeTitles) {
10-
navigationBar.prefersLargeTitles = true
11-
delegate = self
12-
}
9+
navigationBar.prefersLargeTitles = true
10+
delegate = self
1311
}
1412

1513
required init?(coder aDecoder: NSCoder) {
1614
fatalError("init(coder:) has not been implemented")
1715
}
1816

1917
override var preferredStatusBarStyle: UIStatusBarStyle {
20-
ServiceLocator.featureFlagService.isFeatureFlagEnabled(.largeTitles) ? .default : StyleManager.statusBarLight
18+
.default
2119
}
2220

2321
private func updateNavigationBarAppearance(largeTitleDisplayMode: UINavigationItem.LargeTitleDisplayMode) {

WooCommerce/Classes/Tools/InfiniteScroll/PaginationTracker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ protocol PaginationTrackerDelegate: AnyObject {
1616
/// Keeps track of the pagination for API syncing to support infinite scroll.
1717
final class PaginationTracker {
1818
/// Default Settings
19-
private enum Defaults {
19+
enum Defaults {
2020
static let pageFirstIndex = Store.Default.firstPageNumber
2121
static let pageSize = 25
2222
}

WooCommerce/Classes/ViewRelated/Dashboard/DashboardViewController.swift

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,11 @@ private extension DashboardViewController {
213213
}
214214

215215
func configureDashboardUIContainer() {
216-
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.largeTitles) {
217-
hiddenScrollView.configureForLargeTitleWorkaround()
218-
// Adds the "hidden" scroll view to the root of the UIViewController for large titles.
219-
view.addSubview(hiddenScrollView)
220-
hiddenScrollView.translatesAutoresizingMaskIntoConstraints = false
221-
view.pinSubviewToAllEdges(hiddenScrollView, insets: .zero)
222-
}
216+
hiddenScrollView.configureForLargeTitleWorkaround()
217+
// Adds the "hidden" scroll view to the root of the UIViewController for large titles.
218+
view.addSubview(hiddenScrollView)
219+
hiddenScrollView.translatesAutoresizingMaskIntoConstraints = false
220+
view.pinSubviewToAllEdges(hiddenScrollView, insets: .zero)
223221

224222
// A container view is added to respond to safe area insets from the view controller.
225223
// This is needed when the child view controller's view has to use a frame-based layout
@@ -265,9 +263,7 @@ private extension DashboardViewController {
265263

266264
func reloadDashboardUIStatsVersion(forced: Bool) {
267265
dashboardUIFactory.reloadDashboardUI(onUIUpdate: { [weak self] dashboardUI in
268-
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.largeTitles) {
269-
dashboardUI.scrollDelegate = self
270-
}
266+
dashboardUI.scrollDelegate = self
271267
self?.onDashboardUIUpdate(forced: forced, updatedDashboardUI: dashboardUI)
272268
})
273269
}
@@ -287,8 +283,7 @@ private extension DashboardViewController {
287283
}
288284

289285
func updateUI(site: Site?) {
290-
guard let siteName = site?.name, siteName.isEmpty == false,
291-
ServiceLocator.featureFlagService.isFeatureFlagEnabled(.largeTitles) else {
286+
guard let siteName = site?.name, siteName.isEmpty == false else {
292287
shouldShowStoreNameAsSubtitle = false
293288
storeNameLabel.text = nil
294289
return

WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/InPersonPaymentsMenuViewController.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private extension InPersonPaymentsMenuViewController {
130130
//
131131
extension InPersonPaymentsMenuViewController {
132132
func orderCardReaderWasPressed() {
133-
WebviewHelper.launch(Constants.woocommercePurchaseCardReaderURL, with: self)
133+
WebviewHelper.launch(configurationLoader.configuration.purchaseCardReaderUrl, with: self)
134134
}
135135

136136
func manageCardReaderWasPressed() {
@@ -246,7 +246,6 @@ private enum Row: CaseIterable {
246246
}
247247

248248
private enum Constants {
249-
static let woocommercePurchaseCardReaderURL = URL(string: "https://woocommerce.com/products/m2-card-reader/")!
250249
static let bbposChipper2XBTManualURL = URL(string: "https://developer.bbpos.com/quick_start_guide/Chipper%202X%20BT%20Quick%20Start%20Guide.pdf")!
251250
static let stripeM2ManualURL = URL(string: "https://stripe.com/files/docs/terminal/m2_product_sheet.pdf")!
252251
static let wisepad3ManualURL = URL(string: "https://stripe.com/files/docs/terminal/wp3_product_sheet.pdf")!

WooCommerce/Classes/ViewRelated/Inbox/Inbox.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ struct Inbox: View {
2323
.background(Constants.listForeground)
2424
}
2525
case .empty:
26-
// TODO: 5954 - update empty state
2726
EmptyState(title: Localization.emptyStateTitle,
2827
description: Localization.emptyStateMessage,
2928
image: .emptyInboxNotesImage)

0 commit comments

Comments
 (0)