-
Notifications
You must be signed in to change notification settings - Fork 257
Venmo compose button #1541
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
Merged
saperi22
merged 44 commits into
ui-components-compose-support
from
venmo-compose-smart-button
Mar 16, 2026
Merged
Venmo compose button #1541
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
ca23e1f
Compiling demo of PayPal smart button on Compose. Doesn't run success…
saperi22 8c859e7
Reorder buttons in demo app
saperi22 f59f019
refactor file name
saperi22 f8d8265
fix button size
saperi22 6cd26f3
fix button size in demo
saperi22 76a263b
Skip modular and store pendingRequest state within composable.
saperi22 2fa41a7
hoist style to parent composable
saperi22 c8356ff
update demo app
saperi22 c17424d
remove unused classes
saperi22 92391ae
linter'
saperi22 c986b62
remember PayPalLauncher and PayPalClient beyond recomposition
saperi22 58a4091
Address PR comments
saperi22 6becf70
surface failure scenarios to host app
saperi22 3c20dd1
persist pending request to data store
saperi22 934b312
linter
saperi22 1545cc0
Cleanup.
saperi22 e41b1fe
Use scope properly
saperi22 c5fdd9a
linter fixes
saperi22 dd12bda
Address PR comments.
saperi22 dca8f06
make function private
saperi22 bccc828
add tests
saperi22 2ffc34c
Add analytics events for paypal compose button flow
saperi22 a18f95c
fix CI
saperi22 698a82c
fix test.
saperi22 b3dbb06
remove viewmodel to simplify flow
saperi22 0faa265
linter
saperi22 f81d931
add kdoc on composable
saperi22 36df6ee
Address PR comments
saperi22 87009fc
Venmo buttons compose UI
saperi22 caad8d8
Update analytics
saperi22 e8cdb91
Venmo compose button
saperi22 136eb7a
update demo app
saperi22 0f4aefd
rename options
saperi22 f9c3d45
Merge branch 'ui-components-compose-support' into venmo-compose-smart…
saperi22 782d957
update checkout values
saperi22 f56dd4d
consolidate extension functions
saperi22 3c4c38b
refactoring
saperi22 c754d45
refactor
saperi22 46cd64d
add kdoc
saperi22 9c87aca
Update repository to take in a moduleName parameter and update tests
saperi22 92e7e86
rename file
saperi22 6b36203
Add exception message
saperi22 69e5ebf
update venmo button content description
saperi22 f7cacfd
update to 3.5.1 of browser switch
saperi22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
11 changes: 11 additions & 0 deletions
11
...ponents/src/main/java/com/braintreepayments/api/uicomponents/compose/ContextExtensions.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.braintreepayments.api.uicomponents.compose | ||
|
|
||
| import android.app.Activity | ||
| import android.content.Context | ||
| import android.content.ContextWrapper | ||
|
|
||
| internal fun Context.findActivity(): Activity? = when (this) { | ||
| is Activity -> this | ||
| is ContextWrapper -> baseContext.findActivity() | ||
| else -> null | ||
| } |
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
11 changes: 11 additions & 0 deletions
11
...s/src/main/java/com/braintreepayments/api/uicomponents/compose/PendingRequestException.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.braintreepayments.api.uicomponents.compose | ||
|
|
||
| import androidx.annotation.RestrictTo | ||
| import com.braintreepayments.api.core.BraintreeException | ||
|
|
||
| /** | ||
| * Error class thrown when there's an issue fetching the pending request to complete the flow. | ||
| */ | ||
| class PendingRequestException @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) constructor( | ||
| message: String? = "Unable to recover pending request. Cannot complete flow." | ||
| ) : BraintreeException(message) |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.