Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename BuiltInReader / LocalMobileReader references to TapToPay #15380

Merged
merged 5 commits into from
Mar 28, 2025

Conversation

staskus
Copy link
Contributor

@staskus staskus commented Mar 18, 2025

Depends on Stripe Terminal SDK update 4.2.0

Assigning everyone for a review for awareness. One is enough.

Description

A recent StripeSDK update renamed all the appleBuiltIn / localMobile references to TapToPay to match the branding.

I think it makes sense to do the same for Woo iOS codebase. It also helps with consistency, since we have all three used throughout the codebase: builtIn, local, tapToPay.

I didn't rename events to keep the analytics data consistent.

Steps to reproduce

  • CI should build
  • Test TTP payment to make sure images appear in modals

Testing information

Tested on iPhone 14 Pro 17.7

Screenshots


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on all devices (phone/tablet) and no regressions are adde

@staskus staskus added type: task An internally driven task. feature: mobile payments Related to mobile payments / card present payments / Woo Payments. labels Mar 18, 2025
@staskus staskus added this to the 22.0 milestone Mar 18, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Mar 18, 2025

2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖

This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:

  • The tracks events must be validated in the Tracks system.
  • Verify the internal Tracks spreadsheet has also been updated.
  • Please consider registering any new events.
  • The PR must be assigned the category: tracks label.

Generated by 🚫 Danger

@staskus staskus added the category: tracks Related to analytics, including Tracks Events. label Mar 18, 2025
@staskus staskus marked this pull request as ready for review March 18, 2025 15:55
@staskus staskus mentioned this pull request Mar 18, 2025
4 tasks
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Mar 18, 2025

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr15380-4eb5b84
Version22.0
Bundle IDcom.automattic.alpha.woocommerce
Commit4eb5b84
App Center BuildWooCommerce - Prototype Builds #13443
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@staskus staskus modified the milestones: 22.0, 22.1 Mar 21, 2025
Base automatically changed from task/stripe-sdk-update-4.2.0 to trunk March 27, 2025 08:46
@staskus staskus force-pushed the task/consistent-tap-to-pay-naming branch from a1abb8c to 9fd3115 Compare March 27, 2025 09:03
@staskus staskus requested review from jaclync, joshheald and iamgabrielma and removed request for jaclync, joshheald and iamgabrielma March 27, 2025 09:08
@joshheald joshheald self-assigned this Mar 27, 2025
Copy link
Contributor

@joshheald joshheald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works well. Thanks for tidying this up, it's a pain but much simpler if we can refer to one name...

Comment on lines 49 to 51
CardReader(serial: "APPLE-BUILT-IN-SIMULATOR-1",
vendorIdentifier: "SIMULATOR",
name: "Simulated Apple Built In Reader",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal, but maybe worth updating these strings too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these ones can be updated 👍

@@ -1257,7 +1257,7 @@ extension WooAnalyticsEvent {

enum CardReaderType: String {
case external
case builtIn = "built_in"
case tapToPay = "built_in"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is deliberately left, to keep the analytics comparable over time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I kept all the analytics strings deliberately unchanged.

Comment on lines +362 to +368
case cardReaderSelectTypeTapToPayTapped = "card_present_select_reader_type_built_in_tapped"
case cardReaderSelectTypeBluetoothTapped = "card_present_select_reader_type_bluetooth_tapped"
case cardReaderDiscoveryFailed = "card_reader_discovery_failed"
case cardReaderConnectionFailed = "card_reader_connection_failed"
case cardReaderConnectionSuccess = "card_reader_connection_success"
case cardReaderDisconnectTapped = "card_reader_disconnect_tapped"
case manageCardReadersBuiltInReaderAutoDisconnect = "manage_card_readers_automatic_disconnect_built_in_reader"
case manageCardReadersTapToPayReaderAutoDisconnect = "manage_card_readers_automatic_disconnect_built_in_reader"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing these strings are deliberately left, to keep the analytics comparable over time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I kept all the analytics strings deliberately unchanged.

@staskus staskus enabled auto-merge March 28, 2025 07:26
@staskus staskus merged commit 7c87081 into trunk Mar 28, 2025
13 checks passed
@staskus staskus deleted the task/consistent-tap-to-pay-naming branch March 28, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tracks Related to analytics, including Tracks Events. feature: mobile payments Related to mobile payments / card present payments / Woo Payments. type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants