Repository navigation
Add JetPack Compose To Pay Later Button - #1733
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tree/braintree_android into add-basic-pay-later-button
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Looks like the linter is mad about something 🙃 |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
156b932 to
ea14496
Compare
|
will you be able to add the video of the flow, since I see you added a new fragment to demo? |
…/braintree/braintree_android into add-jetpack-compose-to-pay-later
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…edEffect Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
yes, added a demo video above! |
|
hey there please see the video below, I am not able to get the nonce back. Am I testing it wrong? EDIT: this behavior only happens if i have "do not keep activities" enabled - it is a setting on the physical phone that imitates low memory device. I think we should still fix it however Screen.Recording.2026-10-29.at.1.26.14.PM.mov |
|
I'll definitely leave a more detailed review, but I think upon first look the biggest question I have is similar to the XML version, which is whether some of the duplicate code can be pulled out into a new class since the compose PayPalButton and PayLateButton are so similar |
…buttons Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
saralvasquez
left a comment
There was a problem hiding this comment.
Thanks for refactoring all of that! I think this generally looks good, but it looks like there aren't any tests for any of these changes. I know I have a UI test ticket, but could we make sure any functionality needing unit tests is addressed in this PR?
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
yep good call, addressed this in d87ccf9! the shared flow now lives in an internal |
@noguier thanks for catching this! you weren't testing it wrong, and it also happens on main with the existing XML and Compose PayPal buttons. i think the cause is when the Activity is destroyed while PayPal is open, browser-switch registers its launcher under a random key, so the result never reaches the rebuilt Activity and the flow is reported as a cancel. for the fix: XML button in #1748, browser-switch in braintree/browser-switch-android#140. the compose change is ready locally and tested on an emulator, and i'll push it here once browser-switch is released. if the release takes a while, is it ok to merge this first and add the compose change as a follow-up? |
saralvasquez
left a comment
There was a problem hiding this comment.
Thanks for adding those tests! Could you do me a favor and send this through one additional pass with Claude to add any missing test coverage for the compose PayPalButton. I realized this branch had some big refactors so I didn't include those tests in my unit test PR, but still wanna make sure there's coverage there. Otherwise this looks great
|
Also since the problem you uncovered with the nonce not getting returned for "do not keep activities" is a pre-existing issue I'd be fine merging this and following up with the fix later |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary of changes
composable-pay-later-demo.webm
AI Usage
Which AI Agent Was Used?
How was AI used?
learn compose framework and apply changes in accordance to our other composable buttons, refactoring
Estimated AI Code Contribution
Checklist
[ ] Added a changelog entryAuthors