Skip to content

Commit

Permalink
Merge branch 'trunk' into task/14122-tax-store-update
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeichigo authored Dec 2, 2024
2 parents 9f0ec32 + 036321b commit ae17583
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 83 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [*] Jetpack Setup: Fixed an issue with magic link handling when the app is cold started. [https://github.com/woocommerce/woocommerce-ios/pull/14502]
- [*] Product Tags: Improved the tag list screen by displaying the cached items on first load and fixed issue clearing all tags [https://github.com/woocommerce/woocommerce-ios/pull/14511]
- [**] Media Library: On sites logged in with application password, when picking image from WordPress Media Library, all images will now load correctly. [https://github.com/woocommerce/woocommerce-ios/pull/14444]
- [*] Payments onboarding: the custom background color of the "Choose your Payment Provider" UI when both WooPayments and Stripe Extension are available was removed to enable use cases with different container background colors. [https://github.com/woocommerce/woocommerce-ios/pull/14546]
- [*] Media: Media upload will work for sites without XML-RPC. [https://github.com/woocommerce/woocommerce-ios/pull/14537]
- [Internal] Updated CoreDataManager to be thread-safe [https://github.com/woocommerce/woocommerce-ios/pull/14534]
- [Internal] Updated storage usage in CouponStore [https://github.com/woocommerce/woocommerce-ios/pull/14530]
Expand Down
2 changes: 0 additions & 2 deletions WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ extension WooAnalyticsEvent {
case couponManagement = "coupon_management"
/// Shown in store setup task list
case storeSetup = "store_setup"
/// Tap to Pay on iPhone feedback button shown in the Payments menu after the first payment with TTP
case tapToPayFirstPaymentPaymentsMenu
/// Shown in Product details form for a AI generated product
case productCreationAI = "product_creation_ai"
/// Shown in the order form after adding a shipping line
Expand Down
4 changes: 0 additions & 4 deletions WooCommerce/Classes/Extensions/UIImage+Woo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1561,10 +1561,6 @@ extension UIImage {
UIImage(imageLiteralResourceName: "unlimited-products-icon")
}

static var feedbackOutlineIcon: UIImage {
UIImage(named: "icon-feedback-outline")!
}

static var appPasswordTutorialImage: UIImage {
UIImage(named: "app-password-tutorial-1")!
}
Expand Down
8 changes: 0 additions & 8 deletions WooCommerce/Classes/System/WooConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,6 @@ extension WooConstants {
case inAppFeedback = "https://automattic.survey.fm/woo-app-general-feedback-user-survey"
#endif

/// URL for the Tap to Pay first payment survey
///
#if DEBUG
case tapToPayFirstPaymentFeedback = "https://automattic.survey.fm/woo-app-tap-to-pay-survey"
#else
case tapToPayFirstPaymentFeedback = "https://automattic.survey.fm/woo-app-–-first-ttp-survey"
#endif

/// URL for the products feedback survey
///
case productsFeedback = "https://automattic.survey.fm/woo-app-feature-feedback-products"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ struct InPersonPaymentsSelectPluginRow: View {
.background(
RoundedRectangle(cornerRadius: 8)
.stroke(borderColor, lineWidth: 1)
.background(Color(.tertiarySystemBackground))
)
.contentShape(Rectangle()) // Ensures the whole HStack is tappable.
.accessibilityElement(children: .combine)
.accessibilityLabel(name)
.accessibilityRemoveTraits([.isImage])
Expand Down Expand Up @@ -82,7 +82,6 @@ struct InPersonPaymentsSelectPluginView: View {
.padding(.top, 32)
.padding(.horizontal, 16)
.padding(.bottom, 24)
.background(Color(.tertiarySystemBackground).ignoresSafeArea())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,6 @@ struct InPersonPaymentsMenu: View {
}
.buttonStyle(.scrollViewRow)
}

PaymentsRow(image: Image(uiImage: .feedbackOutlineIcon.withRenderingMode(.alwaysTemplate)),
title: Localization.tapToPayOnIPhoneFeedback)
.accessibility(addTraits: .isButton)
.foregroundColor(Color(uiColor: .textLink))
.onTapGesture {
viewModel.tapToPayFeedbackTapped()
}
.sheet(isPresented: $viewModel.presentTapToPayFeedback) {
Survey(source: .tapToPayFirstPayment)
}
.renderedIf(viewModel.shouldShowTapToPayFeedbackRow)
} header: {
Text(Localization.tapToPaySectionTitle.uppercased())
.accessibilityAddTraits(.isHeader)
Expand Down Expand Up @@ -379,12 +367,6 @@ private extension InPersonPaymentsMenu {
"of Tap to Pay on iPhone, relevant to the store territory."
).localizedCapitalized

static let tapToPayOnIPhoneFeedback = NSLocalizedString(
"menu.payments.tapToPay.feedback.row.title",
value: "Share Feedback",
comment: "Navigates to a screen to share feedback about Tap to Pay on iPhone."
).localizedCapitalized

static let done = NSLocalizedString(
"menu.payments.wooPaymentsPayouts.navigation.done.button.title",
value: "Done",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ final class InPersonPaymentsMenuViewModel: ObservableObject {
@Published private(set) var shouldShowPaymentOptionsSection: Bool = false
@Published private(set) var shouldShowPayoutSummary: Bool = false
@Published private(set) var setUpTryOutTapToPayRowTitle: String = Localization.setUpTapToPayOnIPhoneRowTitle
@Published private(set) var shouldShowTapToPayFeedbackRow: Bool = true
@Published private(set) var shouldBadgeTapToPayOnIPhone: Bool = false
@Published private(set) var shouldDisableManageCardReaders: Bool = true
@Published var backgroundOnboardingInProgress: Bool = false
Expand All @@ -33,7 +32,6 @@ final class InPersonPaymentsMenuViewModel: ObservableObject {
@Published var presentCustomAmountAfterDismissingCollectPaymentMigrationSheet: Bool = false
@Published var presentSetUpTryOutTapToPay: Bool = false
@Published var presentAboutTapToPay: Bool = false
@Published var presentTapToPayFeedback: Bool = false
@Published var presentPurchaseCardReader: Bool = false
@Published var presentManageCardReaders: Bool = false
@Published var presentCardReaderManuals: Bool = false
Expand Down Expand Up @@ -190,10 +188,6 @@ final class InPersonPaymentsMenuViewModel: ObservableObject {
analytics.track(.aboutTapToPayOnIPhoneTapped)
}

func tapToPayFeedbackTapped() {
presentTapToPayFeedback = true
}

func purchaseCardReaderTapped() {
presentPurchaseCardReader = true
analytics.track(.paymentsMenuOrderCardReaderTapped)
Expand Down Expand Up @@ -406,7 +400,6 @@ private extension InPersonPaymentsMenuViewModel {
deviceSupportsTapToPay

await updateSetUpTryTapToPay()
await updateTapToPayFeedbackRowVisibility()
}

var countryEnabledForTapToPay: Bool {
Expand All @@ -419,15 +412,6 @@ private extension InPersonPaymentsMenuViewModel {
setUpTryOutTapToPayRowTitle = tapToPayWasPreviouslyUsed ? Localization.tryOutTapToPayOnIPhoneRowTitle : Localization.setUpTapToPayOnIPhoneRowTitle
shouldAlwaysHideSetUpButtonOnAboutTapToPay = tapToPayWasPreviouslyUsed
}

func updateTapToPayFeedbackRowVisibility() async {
guard let firstTapToPayTransactionDate = await dependencies.cardReaderSupportDeterminer.firstTapToPayTransactionDate(),
let thirtyDaysAgo = Calendar.current.date(byAdding: DateComponents(day: -30), to: Date()) else {
return self.shouldShowTapToPayFeedbackRow = false
}

shouldShowTapToPayFeedbackRow = firstTapToPayTransactionDate >= thirtyDaysAgo
}
}

// MARK: - Deeplink navigation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ struct ReceiptEmailView: View {
@ObservedObject var viewModel: ReceiptEmailViewModel

var body: some View {
NavigationView {
NavigationStack {
VStack {
VStack(spacing: 0) {
Divider()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ extension SurveyViewController {
case orderCreation
case couponManagement
case storeSetup
case tapToPayFirstPayment
case productCreationAI
case orderFormShippingLines

Expand Down Expand Up @@ -111,11 +110,6 @@ extension SurveyViewController {
.asURL()
.tagPlatform("ios")
.tagAppVersion(Bundle.main.bundleVersion())
case .tapToPayFirstPayment:
return WooConstants.URLs.tapToPayFirstPaymentFeedback
.asURL()
.tagPlatform("ios")
.tagAppVersion(Bundle.main.bundleVersion())
case .productCreationAI:
return WooConstants.URLs.productCreationAIFeedback
.asURL()
Expand All @@ -139,7 +133,6 @@ extension SurveyViewController {
.orderCreation,
.couponManagement,
.storeSetup,
.tapToPayFirstPayment,
.productCreationAI,
.orderFormShippingLines:
return Localization.giveFeedback
Expand All @@ -163,8 +156,6 @@ extension SurveyViewController {
return .couponManagement
case .storeSetup:
return .storeSetup
case .tapToPayFirstPayment:
return .tapToPayFirstPaymentPaymentsMenu
case .productCreationAI:
return .productCreationAI
case .orderFormShippingLines:
Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit ae17583

Please sign in to comment.