Skip to content

Commit 0a7c440

Browse files
committed
remove pointOfSaleSettingsi1
1 parent eaa33a0 commit 0a7c440

File tree

4 files changed

+6
-102
lines changed

4 files changed

+6
-102
lines changed

Modules/Sources/Experiments/DefaultFeatureFlagService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
9090
return true
9191
case .pointOfSaleOrdersi2:
9292
return true
93-
case .pointOfSaleSettingsi1:
94-
return true
9593
case .orderAddressMapSearch:
9694
return true
9795
case .pointOfSaleHistoricalOrdersi1:

Modules/Sources/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ public enum FeatureFlag: Int {
187187
///
188188
case pointOfSaleOrdersi2
189189

190-
/// Enables the entry point for Point of Sale Settings
191-
///
192-
case pointOfSaleSettingsi1
193-
194190
/// Enables the CTA to search for an address in the map in order details > shipping address.
195191
///
196192
case orderAddressMapSearch

WooCommerce/Classes/POS/Presentation/CartView.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ struct CartView: View {
2323
abs(offSetPosition) < maxOffset
2424
}
2525

26-
private var isPOSSettingsEnabled: Bool {
27-
featureFlags.isFeatureFlagEnabled(.pointOfSaleSettingsi1)
28-
}
29-
3026
@State private var showBarcodeScanningModal: Bool = false
3127

3228
var body: some View {
@@ -142,10 +138,6 @@ private extension CartView {
142138
"pos.cartView.cartTitle",
143139
value: "Cart",
144140
comment: "Title at the header for the Cart view.")
145-
static let addItemsToCartHint = NSLocalizedString(
146-
"pos.cartView.addItemsToCartHint",
147-
value: "Tap on a product to \n add it to the cart",
148-
comment: "Hint to add products to the Cart when this is empty.")
149141
static let addItemsToCartOrScanHint = NSLocalizedString(
150142
"pos.cartView.addItemsToCartOrScanHint",
151143
value: "Tap on a product to \n add it to the cart, or ",
@@ -206,7 +198,7 @@ private extension CartView {
206198
// SwiftUI doesn't allow us to absolutely pin a view to the centre then position other views relative to it
207199
// Instead, we can centre the text, and then put the image in an offset overlay. Offsetting from the top
208200
// avoids issues when the text size is changed through dynamic type.
209-
Text(isPOSSettingsEnabled ? Localization.addItemsToCartOrScanHint : Localization.addItemsToCartHint)
201+
Text(Localization.addItemsToCartOrScanHint)
210202
.font(Constants.secondaryFont)
211203
.foregroundColor(Color.posOnSurfaceVariantLowest)
212204
.multilineTextAlignment(.center)
@@ -217,7 +209,6 @@ private extension CartView {
217209
.offset(y: -(Constants.shoppingBagImageSize + Constants.emptyViewImageTextSpacing))
218210
.aspectRatio(contentMode: .fit)
219211
}
220-
if isPOSSettingsEnabled {
221212
Button(action: {
222213
analytics.track(.pointOfSaleEmptyCartSetupScannerTapped)
223214
showBarcodeScanningModal = true
@@ -229,7 +220,6 @@ private extension CartView {
229220
Image(systemName: "barcode.viewfinder")
230221
}
231222
})
232-
}
233223
Spacer()
234224
}
235225
.background(backgroundColor.ignoresSafeArea(.all))

WooCommerce/Classes/POS/Presentation/POSFloatingControlView.swift

Lines changed: 5 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,10 @@ struct POSFloatingControlView: View {
2424
self._showSettings = showSettings
2525
}
2626

27-
private var isPOSSettingsEnabled: Bool {
28-
featureFlags.isFeatureFlagEnabled(.pointOfSaleSettingsi1)
29-
}
30-
3127
var body: some View {
3228
HStack {
3329
Menu {
34-
if isPOSSettingsEnabled {
35-
compactOptions()
36-
} else {
37-
completeOptions()
38-
}
30+
compactOptions()
3931
} label: {
4032
VStack {
4133
Spacer()
@@ -85,87 +77,15 @@ private extension POSFloatingControlView {
8577
icon: { Image(systemName: "rectangle.portrait.and.arrow.forward") }
8678
)
8779
}
88-
if featureFlags.isFeatureFlagEnabled(.pointOfSaleSettingsi1) {
89-
Button {
90-
analytics.track(.pointOfSaleSettingsMenuItemTapped)
91-
showSettings = true
92-
} label: {
93-
Label(
94-
title: { Text(Localization.settings) },
95-
icon: { Image(systemName: "gearshape") }
96-
)
97-
}
98-
}
99-
100-
if featureFlags.isFeatureFlagEnabled(.pointOfSaleHistoricalOrdersi1) {
101-
Button {
102-
analytics.track(event: WooAnalyticsEvent.PointOfSale.ordersMenuItemTapped())
103-
showOrders = true
104-
} label: {
105-
Label(
106-
title: { Text(Localization.orders) },
107-
icon: { Image(systemName: "text.document") }
108-
)
109-
}
110-
}
111-
}
112-
113-
@ViewBuilder private func completeOptions() -> some View {
11480
Button {
115-
analytics.track(.pointOfSaleExitMenuItemTapped)
116-
showExitPOSModal = true
81+
analytics.track(.pointOfSaleSettingsMenuItemTapped)
82+
showSettings = true
11783
} label: {
11884
Label(
119-
title: { Text(Localization.exitPointOfSale) },
120-
icon: { Image(systemName: "rectangle.portrait.and.arrow.forward") }
85+
title: { Text(Localization.settings) },
86+
icon: { Image(systemName: "gearshape") }
12187
)
12288
}
123-
Button {
124-
analytics.track(.pointOfSaleGetSupportTapped)
125-
showSupport = true
126-
} label: {
127-
Label(
128-
title: { Text(Localization.getSupport) },
129-
icon: { Image(systemName: "questionmark.circle") }
130-
)
131-
}
132-
Button {
133-
showDocumentation = true
134-
analytics.track(.pointOfSaleViewDocsTapped)
135-
} label: {
136-
Label(
137-
title: { Text(Localization.viewDocumentation) },
138-
icon: { Image(systemName: "info.circle") }
139-
)
140-
}
141-
Button {
142-
showProductRestrictionsModal = true
143-
analytics.track(.pointOfSaleSimpleProductsExplanationDialogShown)
144-
} label: {
145-
Label(
146-
title: { Text(Localization.productRestrictionsInfo) },
147-
icon: { Image(systemName: "magnifyingglass") })
148-
}
149-
Button {
150-
showBarcodeScanningModal = true
151-
analytics.track(.pointOfSaleBarcodeScanningMenuItemTapped)
152-
} label: {
153-
Label(
154-
title: {
155-
Text(Localization.barcodeScanningSetup)
156-
},
157-
icon: { Image(systemName: "barcode.viewfinder") })
158-
}
159-
if featureFlags.isFeatureFlagEnabled(.pointOfSaleSettingsi1) {
160-
Button {
161-
showSettings = true
162-
} label: {
163-
Label(
164-
title: { Text(Localization.settings) },
165-
icon: { Image(systemName: "gearshape") }
166-
)
167-
}
168-
}
16989

17090
if featureFlags.isFeatureFlagEnabled(.pointOfSaleHistoricalOrdersi1) {
17191
Button {

0 commit comments

Comments
 (0)