-
Notifications
You must be signed in to change notification settings - Fork 697
Fix Forms when there is only one payment method available #11914
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
base: master
Are you sure you want to change the base?
Conversation
|
Diffuse output: APK |
abc45be to
78bc502
Compare
amk-stripe
left a comment
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.
should we also have screenshot tests for this? The tests you added seem like they would catch a regression but if they fail, it's a little hard to understand the impact. Vs in a screenshot test, it would be pretty obvious
| } | ||
|
|
||
| private fun shouldShowHeader(selectedCode: String, showsWalletHeader: Boolean): Boolean { | ||
| return if (selectedCode == PaymentMethod.Type.Card.code) !showsWalletHeader else true |
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.
| return if (selectedCode == PaymentMethod.Type.Card.code) !showsWalletHeader else true | |
| return (selectedCode != PaymentMethod.Type.Card.code) || !showsWalletHeader |
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 bit easier to read and should return the same values
Summary
Update
PaymentElementandVerticalModeFormUIto showVerticalModeFormHeaderUIif there is only one non card payment method.Motivation
Fix empty form display
Testing
Screen.Recording.2025-11-09.at.7.50.39.PM.mov