diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentelement/embedded/manage/ManageNavigator.kt b/paymentsheet/src/main/java/com/stripe/android/paymentelement/embedded/manage/ManageNavigator.kt index 66ad8a6df58..77c61833567 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentelement/embedded/manage/ManageNavigator.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentelement/embedded/manage/ManageNavigator.kt @@ -1,12 +1,15 @@ package com.stripe.android.paymentelement.embedded.manage +import androidx.compose.foundation.layout.Column import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp import com.stripe.android.core.strings.ResolvableString import com.stripe.android.paymentsheet.navigation.NavigationHandler import com.stripe.android.paymentsheet.ui.PaymentSheetTopBarState import com.stripe.android.paymentsheet.ui.UpdatePaymentMethodInteractor import com.stripe.android.paymentsheet.ui.UpdatePaymentMethodUI +import com.stripe.android.paymentsheet.utils.PaymentSheetContentPadding import com.stripe.android.paymentsheet.verticalmode.ManageScreenInteractor import com.stripe.android.paymentsheet.verticalmode.ManageScreenUI import com.stripe.android.uicore.utils.mapAsStateFlow @@ -83,7 +86,10 @@ internal class ManageNavigator private constructor( @Composable override fun Content() { - ManageScreenUI(interactor = interactor) + Column { + ManageScreenUI(interactor = interactor) + PaymentSheetContentPadding(subtractingExtraPadding = 12.dp) + } } override fun close() { @@ -102,7 +108,10 @@ internal class ManageNavigator private constructor( @Composable override fun Content() { - UpdatePaymentMethodUI(interactor = interactor, modifier = Modifier) + Column { + UpdatePaymentMethodUI(interactor = interactor, modifier = Modifier) + PaymentSheetContentPadding(subtractingExtraPadding = 16.dp) + } } } } diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/ui/UpdatePaymentMethodUI.kt b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/ui/UpdatePaymentMethodUI.kt index 289844bda8b..e827fee4ac2 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/ui/UpdatePaymentMethodUI.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/ui/UpdatePaymentMethodUI.kt @@ -133,7 +133,7 @@ private fun DetailsCannotBeChangedText( color = MaterialTheme.stripeColors.subtitle, fontWeight = FontWeight.Normal, modifier = Modifier - .padding(top = 10.dp) + .padding(top = 8.dp) .testTag(UPDATE_PM_DETAILS_SUBTITLE_TEST_TAG) ) } diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/utils/ComposeUtils.kt b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/utils/ComposeUtils.kt index b6d737e9dc8..173d66b53a4 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/utils/ComposeUtils.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/utils/ComposeUtils.kt @@ -7,12 +7,14 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp import com.stripe.android.paymentsheet.R @Composable -internal fun PaymentSheetContentPadding() { +internal fun PaymentSheetContentPadding(subtractingExtraPadding: Dp = 0.dp) { val bottomPadding = dimensionResource(R.dimen.stripe_paymentsheet_button_container_spacing_bottom) - Spacer(modifier = Modifier.requiredHeight(bottomPadding)) + Spacer(modifier = Modifier.requiredHeight(bottomPadding - subtractingExtraPadding)) } @Composable diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen[DarkTheme,DefaultFont,DefaultAppearance].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen[DarkTheme,DefaultFont,DefaultAppearance].png index 49e32b26dbe..264b58e4dcc 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen[DarkTheme,DefaultFont,DefaultAppearance].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen[DarkTheme,DefaultFont,DefaultAppearance].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen[LightTheme,DefaultFont,DefaultAppearance].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen[LightTheme,DefaultFont,DefaultAppearance].png index e43f06e836e..0de3d1f7661 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen[LightTheme,DefaultFont,DefaultAppearance].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen[LightTheme,DefaultFont,DefaultAppearance].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen_withoutRemove[DarkTheme,DefaultFont,DefaultAppearance].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen_withoutRemove[DarkTheme,DefaultFont,DefaultAppearance].png index e468130eb25..9dac816ac5c 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen_withoutRemove[DarkTheme,DefaultFont,DefaultAppearance].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen_withoutRemove[DarkTheme,DefaultFont,DefaultAppearance].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen_withoutRemove[LightTheme,DefaultFont,DefaultAppearance].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen_withoutRemove[LightTheme,DefaultFont,DefaultAppearance].png index d41098911cf..0efe862ed91 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen_withoutRemove[LightTheme,DefaultFont,DefaultAppearance].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.customersheet_CustomerSheetScreenshotTest_testUpdatePaymentMethodScreen_withoutRemove[LightTheme,DefaultFont,DefaultAppearance].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard[].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard[].png index 32fb3abbec0..c6f19fe829e 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard[].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard[].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withRemoveButton[].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withRemoveButton[].png index a5cae68735d..a462cdc5ed4 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withRemoveButton[].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withRemoveButton[].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withRemoveButton_withError[].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withRemoveButton_withError[].png index 09bec4bc64f..b93199fe290 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withRemoveButton_withError[].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withRemoveButton_withError[].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withSetAsDefaultCheckbox[].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withSetAsDefaultCheckbox[].png index 626e1dc6800..6240925773e 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withSetAsDefaultCheckbox[].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCard_withSetAsDefaultCheckbox[].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCbcEligibleCard[].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCbcEligibleCard[].png index 3f142194a6e..56fad3d2e43 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCbcEligibleCard[].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCbcEligibleCard[].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCbcEligibleCard_withoutRemoveButton[].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCbcEligibleCard_withoutRemoveButton[].png index f48d4da9b2a..4d134563fd5 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCbcEligibleCard_withoutRemoveButton[].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forCbcEligibleCard_withoutRemoveButton[].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forSepaDebit_withRemoveButton[].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forSepaDebit_withRemoveButton[].png index ba1ed0927e8..1b9724c5968 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forSepaDebit_withRemoveButton[].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forSepaDebit_withRemoveButton[].png differ diff --git a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forUsBankAccount_withRemoveButton[].png b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forUsBankAccount_withRemoveButton[].png index 812877ed1e6..3cc705cb2bb 100644 Binary files a/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forUsBankAccount_withRemoveButton[].png and b/paymentsheet/src/test/snapshots/images/com.stripe.android.paymentsheet.ui_PaymentSheetScreenUpdatePaymentMethodScreenshotTest_updatePaymentMethodScreen_forUsBankAccount_withRemoveButton[].png differ