[Android] Rename CheckoutEventProcessor → CheckoutListener, drop stale callbacks#132
Open
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
89c10c1 to
d4da055
Compare
d27977c to
7dceb15
Compare
8b0659f to
8afa420
Compare
7dceb15 to
86ecd8b
Compare
8afa420 to
14a4aac
Compare
14a4aac to
57bb1fe
Compare
86ecd8b to
9aa6c02
Compare
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changes are you making?
Renames
CheckoutEventProcessor→CheckoutListeneron Android (withDefaultCheckoutEventProcessor→DefaultCheckoutListener) and drops two methods now owned by the protocol layer:onCheckoutCompleted→ useCheckoutProtocol.completeonCheckoutLinkClicked→ useCheckoutCommunicationClient.openExternalUrl(...)Removes the legacy code paths that fed those callbacks: the
COMPLETEDcase inCheckoutBridge, the external-link branch inCheckoutWebView's URL override, and the legacy intent-launching defaults onDefaultCheckoutEventProcessor.A few behavior tweaks to keep parity with the previous Android implementation:
ec.completenow invalidates the preload cache (was done by the oldonCheckoutViewCompletepath)ec.window.open_requestno longer filters URI schemes at the bridge — any URI is forwarded toopenExternalUrl(...)so apps can handlemailto:/tel:/custom schemes themselvesopenExternalUrl(...)is absent or returnsfalse, the bridge returns a JSON-RPC error instead of acknowledging successFallbackWebViewkeeps confirmation-page detection and forwards a partialec.complete(order ID only) to the client, so recovered checkouts still notify the host app. Follow-up: wire the full ECP bridge into the fallback path.Internal field/class names follow the rename for consistency (
CheckoutWebViewEventProcessor→CheckoutWebViewListener,eventProcessor→listenerthroughout). README andlib/api/lib.apiare updated.Note: The React Native Android wrapper extends
DefaultCheckoutEventProcessorand overridesonCheckoutCompleted— it will need a follow-up PR to rename the extends clause and route completion throughCheckoutProtocol.complete.How to test
./gradlew :lib:test :lib:apiCheck :lib:detekt :lib:lintReleaseCheckoutProtocol.completehandler inCartViewModelfires (clears cart and pops back to the product screen)Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)