Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Display a “default” badge for the default PM #4333
Display a “default” badge for the default PM #4333
Changes from 70 commits
1403094
71c5516
e3ecc2c
fb86faa
b283446
9ed5ed2
e689449
3c36c97
c749e6e
aac6ae1
90e15a4
b25eb4b
16e6b0c
5936f96
5cd59d6
54a8073
0fca0dc
c8bd06b
c226e09
4d146b6
f858536
8d1c90b
c70c6a1
d999b9e
ac5189a
ffcf6e4
403fdcb
c8fbfef
2f515cd
0a92c87
a89890c
bd51b31
3c69384
f239d20
5fad2d3
4da3034
f83164f
05407cc
60cd77c
fe79f55
ea5228f
eaae456
623ffe3
7022a11
f5fbd58
05a0a04
1794106
cb12138
efb682f
b592b55
74c9db8
a28440e
b6d712e
d4dedf5
f9d0996
0c52f28
8f30c22
d6ea0c6
04b187d
8d7509c
afcfc48
b88ce62
6dba918
626f4d5
734345e
f6844ec
063fcb1
3867417
6670834
f05cdcb
ff08f77
53b894a
8382a93
22e2b02
6bcc425
304aa41
9dd0cfb
10de2e9
d27f4c8
9d16dec
bdda2bb
9048ed0
dd6dedb
238e94e
9b76fa9
53a55c8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 PaymentSheetVerticalViewController, we have this logic for the initialSelection
This seems to indicate that the first payment method can become the default. Is this true? Ultimately, i'm trying to wrap my head around when we would access defaultPaymentMethod vs defaultOrFirst.
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.
From my understanding, the selected payment method should be the default if it exists or the first payment method in the customer's list of saved payment methods. However, the default badge itself should only be displayed if there is a set default in the elementsSession customer.
So we access defaultOrFirst when trying to determine the selected payment method, while we access defaultPaymentMethod to determine if the default badge should be shown and which payment method to show it on.
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.
Ah thanks for the explanation!
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'm guessing customerSheet changes will come at a later time?
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.
Bella said that the CustomerSheet should not ever display a default badge because it's implied that the selected payment method in CustomerSheet is your default.
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.
What's the harm in making all the cells the new size to account for the possible default badge? What happens if we use the old size? Would be preferred if we can avoid swapping sizes.
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 main issue there is that in the Figma, the height of the sheet changes when edit mode is on, but if we just increase the size of the cells constantly, then there will just be extra space under the PMs and the height won't change.