-
Notifications
You must be signed in to change notification settings - Fork 644
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
Create empty manage PMs screen #8523
Conversation
|
||
@Composable | ||
override fun Content(viewModel: BaseSheetViewModel, modifier: Modifier) { | ||
Text("Manage your saved PMs here") |
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.
In a follow up, I will make this a column of SavedPaymentMethodRowButtons
null | ||
} | ||
} | ||
createForCompleteFlow(screen, isWalletEnabled) |
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.
ran into a linter issue about this function being too complex, so separated some of it out
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.
The only actually new thing in this file is the PaymentSheetScreen.ManageSavedPaymentMethods branch
onItemSelectedListener: (SupportedPaymentMethod) -> Unit, | ||
imageLoader: StripeImageLoader, | ||
modifier: Modifier = Modifier, | ||
) { | ||
Column(modifier = modifier, verticalArrangement = Arrangement.spacedBy(12.dp)) { | ||
TextButton(onClick = { onViewMorePaymentMethods() }) { |
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.
once we display a saved PM on this screen, that saved PM will have a button "View more" which should have this onClick
behavior
Diffuse output:
APK
|
This reverts commit 050aa72.
import com.stripe.android.uicore.image.StripeImageLoader | ||
|
||
@Composable | ||
internal fun PaymentMethodVerticalLayoutUI( |
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.
Created this new layout for the list of both saved PMs + new PMs (using the existing NewPaymentMethodVerticalLayoutUI). Once there is a saved PM displayed in this layout, it will have a "View more" button and clicking that button should call the onViewMorePaymentMethods function that is included here
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.
Yeah, we will probably keep doing this for a while. I'm hoping to refactor some stuff in this realm too. But I'm on board with this as iterative progress!
StripeR.string.stripe_title_update_card | ||
} | ||
is PaymentSheetScreen.ManageSavedPaymentMethods -> { | ||
R.string.stripe_paymentsheet_select_payment_method |
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.
Can you add a test for this (if it's the final variant).
I've been skipping tests for all the stuff I've added, since it isn't done yet.
Summary
Create empty manage PMs screen
Motivation
Vertical mode! https://jira.corp.stripe.com/browse/MOBILESDK-2031
Testing
Screen recording
empty.manage.screen.mp4