-
Notifications
You must be signed in to change notification settings - Fork 649
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
Link Wallet payment method list UI #9691
Conversation
Diffuse output:
APK
DEX
ARSC
|
a0a90d5
to
b59f90a
Compare
Add screenshots Minor fixes clean up fix test theme Fix screenshots Remove strings remove unused payment details remove alpha Delete screenshots Update strings.xml Update screenshots Fix screenshots
b59f90a
to
df61258
Compare
|
||
onCollapsedWalletRow().performClick() | ||
|
||
onWalletAddPaymentMethodRow().assertIsDisplayed().assertHasClickAction() |
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.
Could you run these tests with shampoo rule and make sure they're not flaky? I've seen test setups like this flake because the compose component is not immediately visible. We could also fix this pre-emptively by adding a composeTestRule.waitUntil call to ensure that the node is visible before asserting anything. You can add these to the helpers themselves (e.g. to the implementation of onWalletAddPaymentMethodRow)
val paymentDetailsList: List<ConsumerPaymentDetails.PaymentDetails>, | ||
val selectedItem: ConsumerPaymentDetails.PaymentDetails?, | ||
val isProcessing: Boolean, | ||
val isExpanded: Boolean |
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.
Does isExpanded need to be part of the state that the VM knows about?
Since this seems very specific to the UI and not actually impacted by anything in the VM, I think we could just include it within the composable itself. Just thinking that would be nice for simplicity + division of responsibilities (ie if the VM doesn't need to know about it, we don't need to worry about setting it properly in the VM, etc)
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.
You're right, I'll take it out
.animateContentSize() | ||
) { | ||
val selectedItem = state.selectedItem | ||
if (state.isExpanded || selectedItem == null) { |
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.
Does this mean that if there is no selected item, then the user won't be able to click the collapse/expand chevron to collapse the PMs list?
That experience sounds potentially annoying -- could we instead just select a PM by default to ensure that the user always has a PM selected to be used in the CollapsedPaymentDetails composable? There are probably other solutions to this too. I feel like we should be able to show the collapsed PM details even if there isn't a selected PM
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 selectedItem
can never be null unless there is no payment method available. In the case where there is no payment method, the user will be redirected the CardCreation screen, but that has not been built yet.
Summary
Payment methods list on wallet screen
Motivation
JIRA
Testing
Screenshots
Screen.Recording.2024-11-26.at.12.38.15.PM.mov
Changelog