-
Notifications
You must be signed in to change notification settings - Fork 657
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
Show promo badge in bank form #9734
Conversation
9511890
to
2e443dd
Compare
Diffuse output:
APK
|
6fa3485
to
2efdef9
Compare
@@ -41,8 +50,14 @@ internal data class BankFormScreenState( | |||
val financialConnectionsSessionId: String?, | |||
val mandateText: ResolvableString, | |||
val isVerifyingWithMicrodeposits: Boolean, | |||
val eligibleForIncentive: Boolean = false, |
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 currently hard-coded to false, but will eventually be set in the bank auth flow.
2efdef9
to
fa657c7
Compare
fa657c7
to
01500e5
Compare
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.
looks great!
if (context.isEnglishLanguage) { | ||
"Get $text" | ||
} else { | ||
text | ||
} |
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.
No action - I guess this is a backend limitation, but shouldn't we get complete text from backend?
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 only get the formatted amount from the backend. That’s the way we intended it, since we need this in multiple places with different text (or none) around it.
private val Context.isEnglishLanguage: Boolean | ||
get() { | ||
val currentLocale: Locale = if (SDK_INT >= N) { | ||
resources.configuration.locales[0] | ||
} else { | ||
@Suppress("DEPRECATION") | ||
resources.configuration.locale | ||
} | ||
|
||
return currentLocale.language == Locale.ENGLISH.language | ||
} |
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.
[nit] Likely useful on other scenarios, could be moved to a common module
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.
I honestly don’t want to further encourage this pattern, so I’ll keep it here for now 😅
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.
A test with a very long bank name would be great to ensure the badge is still visible and correctly placed
4e35829
to
b07a81e
Compare
Fix layout issue with super-long bank name and validate with screenshot test.
b07a81e
to
99bd861
Compare
* Show promo badge in bank form * Address code review feedback Fix layout issue with super-long bank name and validate with screenshot test.
* Initial camera implementation # Conflicts: # connect-example/src/main/java/com/stripe/android/connect/example/ui/features/payouts/PayoutsExampleActivity.kt # connect/src/main/java/com/stripe/android/connect/PayoutsView.kt # Conflicts: # connect/src/main/java/com/stripe/android/connect/PayoutsView.kt # connect/src/main/java/com/stripe/android/connect/webview/StripeConnectWebViewClient.kt # Conflicts: # connect-example/src/main/java/com/stripe/android/connect/example/ui/features/payouts/PayoutsExampleActivity.kt # connect/src/main/java/com/stripe/android/connect/EmbeddedComponentManager.kt # connect/src/main/java/com/stripe/android/connect/PayoutsView.kt * Update request code * Update example activity * Refactor permission, handle within manager * Fix leftover merge conflicts # Conflicts: # connect/src/main/java/com/stripe/android/connect/webview/StripeConnectWebViewContainer.kt * WIP * Fix merge * Fix build issues * fix activity * Fix suspend function * refactor with activity oncreate * Show promo badge in bank form (#9734) * Show promo badge in bank form * Address code review feedback Fix layout issue with super-long bank name and validate with screenshot test. * Add Embedded Appearance params to AppearanceBottomSheetDialogFragment (#9727) * Add Embedded Appearance params to AppearanceBottomSheetDialogFragment * [MOBILESDK-2480]update text style for bacs secondary button type (#9745) * update text style for bacs secondary button type * screenshots for screenshot tests * Apply suggestions from code review Capitalize comment and add period Co-authored-by: Bella Koch <160939932+amk-stripe@users.noreply.github.com> * crypto payment method (#9753) * Better handle process death for all confirmation flow cases in `DefaultConfirmationHandler` (#9754) * Fix lints, remove unneeded cancellation function * Add tests * Fix tests * Add/fix logging * Fix lint from log line * Fix main thread * Update connect/src/main/java/com/stripe/android/connect/webview/StripeConnectWebViewContainer.kt Co-authored-by: lng-stripe <91862945+lng-stripe@users.noreply.github.com> * Update connect/src/main/java/com/stripe/android/connect/EmbeddedComponentManager.kt Co-authored-by: lng-stripe <91862945+lng-stripe@users.noreply.github.com> * unsupported behavior to log warning * Fix docstrings * Update crashing behavior for camera permission request * Move functions around for clarity * Update tests * Update and fix tests * Fix detekt lints * Fix main activity * Remove unnecessary fragment, move logger out of constructor * Clean up lib restriction * Remove unnecessary unconfined test dispatcher * Update api * Lint fixes --------- Co-authored-by: Till Hellmund <tillh@stripe.com> Co-authored-by: tjclawson-stripe <163896025+tjclawson-stripe@users.noreply.github.com> Co-authored-by: Tian Zhao <tianzhao@stripe.com> Co-authored-by: Bella Koch <160939932+amk-stripe@users.noreply.github.com> Co-authored-by: ericzhang-stripe <94195995+ericzhang-stripe@users.noreply.github.com> Co-authored-by: Samer Alabi <141707240+samer-stripe@users.noreply.github.com> Co-authored-by: lng-stripe <91862945+lng-stripe@users.noreply.github.com>
Summary
This pull request adds the promo badge in the account details section of the bank form.
Motivation
CONSUMERBANK-566
Testing
Screenshots
Changelog