Skip to content

Commit f6b6fce

Browse files
committed
Remove Products M5 feedback banner
1 parent 7f8219a commit f6b6fce

File tree

7 files changed

+16
-45
lines changed

7 files changed

+16
-45
lines changed

Storage/Storage/Model/FeedbackType.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ public enum FeedbackType: String, Codable {
55
///
66
case general
77

8-
/// Identifier for the Products M5: Linked Products, Downloadable Files, Trashing.
9-
///
10-
case productsM5
11-
128
/// Identifier for the Products Variations.
139
///
1410
case productsVariations

WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ extension WooAnalyticsEvent {
5858
public enum FeedbackContext: String {
5959
/// Shown in Stats but is for asking general feedback.
6060
case general
61-
/// Shown in products banner for Milestone 4 features. New product banners should have
62-
/// their own `FeedbackContext` option.
63-
case productsM4 = "products_m4"
6461
/// Shown in products banner for Variations release.
6562
case productsVariations = "products_variations"
6663
/// Shown in shipping labels banner for Milestone 1 features.

WooCommerce/Classes/System/WooConstants.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ extension WooConstants {
7979
case inAppFeedback = "https://automattic.survey.fm/woo-app-general-feedback-user-survey"
8080
#endif
8181

82-
/// URL for the products M4 feedback survey
82+
/// URL for the products feedback survey
8383
///
84-
case productsM4Feedback = "https://automattic.survey.fm/woo-app-feature-feedback-products"
84+
case productsFeedback = "https://automattic.survey.fm/woo-app-feature-feedback-products"
8585

8686
/// URL for the shipping labels M1 feedback survey
8787
///

WooCommerce/Classes/ViewRelated/Products/ProductsTopBannerFactory.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Yosemite
44
struct ProductsTopBannerFactory {
55

66
enum BannerType {
7-
case productsM4
87
case variations
98

109
var title: String {
@@ -13,17 +12,13 @@ struct ProductsTopBannerFactory {
1312

1413
var info: String {
1514
switch self {
16-
case .productsM4:
17-
return Localization.infoFilesAndLinkedProducts
1815
case .variations:
1916
return Localization.infoVariations
2017
}
2118
}
2219

2320
var feedbackContext: WooAnalyticsEvent.FeedbackContext {
2421
switch self {
25-
case .productsM4:
26-
return .productsM4
2722
case .variations:
2823
return .productsVariations
2924
}
@@ -75,10 +70,6 @@ private extension ProductsTopBannerFactory {
7570
static let title = NSLocalizedString("New features available!",
7671
comment: "The title of the top banner on the Products tab.")
7772

78-
static let infoFilesAndLinkedProducts =
79-
NSLocalizedString(
80-
"You can now add downloadable files to a product and link upsell & cross-sell products. No longer want a product? Trash it!",
81-
comment: "The info of the top banner on the Products tab.")
8273
static let infoVariations = NSLocalizedString("You can now create and manage product variations!",
8374
comment: "The info of the top banner on the Products tab.")
8475

WooCommerce/Classes/ViewRelated/Products/ProductsViewController.swift

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ final class ProductsViewController: UIViewController {
162162
configureSyncingCoordinator()
163163
registerTableViewCells()
164164

165-
showTopBannerViewIfNeeded(for: .productsM4)
165+
showTopBannerViewIfNeeded()
166166

167167
/// We sync the local product settings for configuring local sorting and filtering.
168168
/// If there are some info stored when this screen is loaded, the data will be updated using the stored sort/filters.
@@ -397,18 +397,14 @@ private extension ProductsViewController {
397397
private extension ProductsViewController {
398398
/// Fetches products feedback visibility from AppSettingsStore and update products top banner accordingly
399399
///
400-
func showTopBannerViewIfNeeded(for bannerType: ProductsTopBannerFactory.BannerType) {
401-
let action = AppSettingsAction.loadFeedbackVisibility(type: bannerType == .productsM4 ? .productsM5 : .productsVariations) { [weak self] result in
400+
func showTopBannerViewIfNeeded() {
401+
let action = AppSettingsAction.loadFeedbackVisibility(type: .productsVariations) { [weak self] result in
402402
switch result {
403403
case .success(let visible):
404404
if visible {
405-
self?.requestAndShowNewTopBannerView(for: bannerType)
405+
self?.requestAndShowNewTopBannerView(for: .variations)
406406
} else {
407-
if bannerType == .productsM4 {
408-
self?.showTopBannerViewIfNeeded(for: .variations)
409-
} else {
410-
self?.hideTopBannerView()
411-
}
407+
self?.hideTopBannerView()
412408
}
413409
case.failure(let error):
414410
self?.hideTopBannerView()
@@ -427,9 +423,9 @@ private extension ProductsViewController {
427423
expandedStateChangeHandler: { [weak self] in
428424
self?.updateTableHeaderViewHeight()
429425
}, onGiveFeedbackButtonPressed: { [weak self] in
430-
self?.presentProductsFeedback(for: bannerType)
426+
self?.presentProductsFeedback()
431427
}, onDismissButtonPressed: { [weak self] in
432-
self?.dismissProductsBanner(for: bannerType)
428+
self?.dismissProductsBanner()
433429
}, onCompletion: { [weak self] topBannerView in
434430
self?.topBannerContainerView.updateSubview(topBannerView)
435431
self?.topBannerView = topBannerView
@@ -596,16 +592,16 @@ private extension ProductsViewController {
596592

597593
/// Presents products survey
598594
///
599-
func presentProductsFeedback(for bannerType: ProductsTopBannerFactory.BannerType) {
595+
func presentProductsFeedback() {
600596
// Present survey
601-
let navigationController = SurveyCoordinatingController(survey: bannerType == .productsM4 ? .productsM5Feedback : .productsVariationsFeedback)
597+
let navigationController = SurveyCoordinatingController(survey: .productsVariationsFeedback)
602598
present(navigationController, animated: true, completion: nil)
603599
}
604600

605601
/// Mark feedback request as dismissed and update banner visibility
606602
///
607-
func dismissProductsBanner(for bannerType: ProductsTopBannerFactory.BannerType) {
608-
let action = AppSettingsAction.updateFeedbackStatus(type: bannerType == .productsM4 ? .productsM5 : .productsVariations,
603+
func dismissProductsBanner() {
604+
let action = AppSettingsAction.updateFeedbackStatus(type: .productsVariations,
609605
status: .dismissed) { [weak self] result in
610606
if let error = result.failure {
611607
CrashLogging.logError(error)

WooCommerce/Classes/ViewRelated/Survey/SurveyViewController.swift

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ final class SurveyViewController: UIViewController, SurveyViewControllerOutputs
6363
extension SurveyViewController {
6464
enum Source {
6565
case inAppFeedback
66-
case productsM5Feedback
6766
case productsVariationsFeedback
6867
case shippingLabelsRelease1Feedback
6968

@@ -75,14 +74,8 @@ extension SurveyViewController {
7574
.tagPlatform("ios")
7675
.tagAppVersion(Bundle.main.bundleVersion())
7776

78-
case .productsM5Feedback:
79-
return WooConstants.URLs.productsM4Feedback
80-
.asURL()
81-
.tagPlatform("ios")
82-
.tagProductMilestone("5")
83-
.tagAppVersion(Bundle.main.bundleVersion())
8477
case .productsVariationsFeedback:
85-
return WooConstants.URLs.productsM4Feedback
78+
return WooConstants.URLs.productsFeedback
8679
.asURL()
8780
.tagPlatform("ios")
8881
.tagAppVersion(Bundle.main.bundleVersion())
@@ -99,7 +92,7 @@ extension SurveyViewController {
9992
switch self {
10093
case .inAppFeedback:
10194
return Localization.title
102-
case .productsM5Feedback, .productsVariationsFeedback, .shippingLabelsRelease1Feedback:
95+
case .productsVariationsFeedback, .shippingLabelsRelease1Feedback:
10396
return Localization.giveFeedback
10497
}
10598
}
@@ -109,8 +102,6 @@ extension SurveyViewController {
109102
switch self {
110103
case .inAppFeedback:
111104
return .general
112-
case .productsM5Feedback:
113-
return .productsM4
114105
case .productsVariationsFeedback:
115106
return .productsVariations
116107
case .shippingLabelsRelease1Feedback:

Yosemite/Yosemite/Stores/AppSettings/InAppFeedbackCardVisibilityUseCase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct InAppFeedbackCardVisibilityUseCase {
3737
switch feedbackType {
3838
case .general:
3939
return try shouldGeneralFeedbackBeVisible(currentDate: currentDate)
40-
case .productsM5, .productsVariations:
40+
case .productsVariations:
4141
return shouldProductsFeedbackBeVisible()
4242
case .shippingLabelsRelease1:
4343
return shouldShippingLabelsRelease1FeedbackBeVisible()

0 commit comments

Comments
 (0)