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
Render FC auth flow in bottom sheet #8443
Render FC auth flow in bottom sheet #8443
Conversation
9c2bf0c
to
22aa61d
Compare
2988217
to
f02ce7c
Compare
Diffuse output:
APK
|
32aa4ea
to
356b9f3
Compare
f02ce7c
to
13064ba
Compare
356b9f3
to
70aa981
Compare
13064ba
to
6301f92
Compare
70aa981
to
e7377df
Compare
11c31f1
to
5c2b4b9
Compare
a68be8e
to
67a5214
Compare
5c2b4b9
to
3871dbd
Compare
7cc1963
to
2152938
Compare
4d6e9d6
to
9d78fe8
Compare
9d78fe8
to
204e240
Compare
<item name="colorAccent">@color/stripe_accent_color_default</item> | ||
<item name="colorControlNormal">@color/stripe_control_normal_color_default</item> | ||
<item name="colorPrimary">@color/stripe_toolbar_color_default</item> | ||
<item name="colorPrimaryDark">@color/stripe_toolbar_color_default_dark</item> | ||
<item name="titleTextColor">@color/stripe_title_text_color</item> | ||
<item name="android:textColorSecondary">@color/stripe_text_color_secondary</item> | ||
<item name="android:windowIsTranslucent">true</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding these attributes into the base theme, just like PaymentSheet.
/** | ||
* handle state changes here. | ||
*/ | ||
private suspend fun handleViewEffect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the view effect handling here to allow it to be called from Compose.
@@ -130,7 +130,7 @@ internal class FinancialConnectionsSheetViewModel @Inject constructor( | |||
val manifest = sync.manifest | |||
val isInstantDebits = stateFlow.value.isInstantDebits | |||
val nativeAuthFlowEnabled = nativeRouter.nativeAuthFlowEnabled(manifest, isInstantDebits) | |||
viewModelScope.launch { nativeRouter.logExposure(manifest, isInstantDebits) } | |||
nativeRouter.logExposure(manifest, isInstantDebits) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive-by fix: This doesn’t need to be suspending anymore.
initialPane = state.initialPane, | ||
testMode = state.testMode, | ||
val bottomSheetState = rememberStripeBottomSheetState( | ||
initialValue = ModalBottomSheetValue.Expanded, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We launch this expanded, because FinancialConnectionsSheetActivity
is already open.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing! Did a bunch of testing (app2app, web-flow, etc) and 👨🍳
Summary
This pull request is a follow-up to #8442. It transitions the Financial Connections auth flow from a full-screen view to a sheet.
Motivation
Testing
Screen recording
Recording
sheet.webm
Changelog