-
Notifications
You must be signed in to change notification settings - Fork 645
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
Update PaymentSheet
bottom paddings & error padding
#9198
Update PaymentSheet
bottom paddings & error padding
#9198
Conversation
@@ -223,7 +223,7 @@ internal sealed interface PaymentSheetScreen { | |||
|
|||
@Composable | |||
override fun Content(modifier: Modifier) { | |||
AddPaymentMethod(interactor = interactor, modifier) | |||
AddPaymentMethod(interactor = interactor) |
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 weren't passing the modifier for the VerticalModeFormUI
as well. Looks like because the form applies its own padding. Should we move the default modifier that applies 8.dp
as bottom padding into the individual screens?
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 don't think the individual screens should be responsible for their own padding. In this case, we would need to add 8.dp to all the screens individually? So it just makes more sense to apply that padding globally.
Rather than doing this, I think we should remove the padding from the forms, if we need to
Diffuse output:
APK
|
478a44e
to
6a11c5e
Compare
6a11c5e
to
f4413bf
Compare
PaymentSheet
bottom paddings with errorPaymentSheet
bottom paddings & error padding
@@ -223,7 +223,7 @@ internal sealed interface PaymentSheetScreen { | |||
|
|||
@Composable | |||
override fun Content(modifier: Modifier) { | |||
AddPaymentMethod(interactor = interactor, modifier) | |||
AddPaymentMethod(interactor = interactor) |
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 don't think the individual screens should be responsible for their own padding. In this case, we would need to add 8.dp to all the screens individually? So it just makes more sense to apply that padding globally.
Rather than doing this, I think we should remove the padding from the forms, if we need to
internal val verticalModeBottomContentPadding = 20.dp | ||
internal val horizontalModeBottomContentPadding = 8.dp | ||
internal val horizontalModeBottomContentPadding = 20.dp |
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.
if these have the same value, do we need to set this per-screen at all? Or can we just use 20.dp as bottom content padding in PaymentSheetScreen?
Dropping this for now. Will be re-visited during embedded. |
Summary
Update
PaymentSheet
bottom paddings & error paddingMotivation
Design decided to put the error message above the bottom content padding but with some extra padding between it and the rest of the card content. Also more accurately updated the
PaymentSheet
padding so that horizontal and vertical mode are matched.Mock
Testing