Skip to content
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 Payment Method Rows UI #9681

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

toluo-stripe
Copy link
Contributor

@toluo-stripe toluo-stripe commented Nov 20, 2024

Summary

Compose UI for Link Payment Method Rows

Motivation

JIRA

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

com stripe android link ui wallet_PaymentDetailsListItemScreenShotTest_test BankAccountEnabled DarkTheme,DefaultFont

com stripe android link ui wallet_PaymentDetailsListItemScreenShotTest_test BankAccountEnabled LightTheme,DefaultFont

com stripe android link ui wallet_PaymentDetailsListItemScreenShotTest_test CardDisabledAndSelected LightTheme,LargeFont

com stripe android link ui wallet_PaymentDetailsListItemScreenShotTest_test CardEnabled LightTheme,DefaultFont

Changelog

Copy link
Contributor

github-actions bot commented Nov 20, 2024

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │            compressed            │          uncompressed          
          ├───────────┬───────────┬──────────┼──────────┬──────────┬──────────
 APK      │ old       │ new       │ diff     │ old      │ new      │ diff     
──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼──────────
      dex │   3.9 MiB │   3.9 MiB │   +212 B │  8.5 MiB │  8.5 MiB │   +284 B 
     arsc │   2.3 MiB │   2.3 MiB │ +2.4 KiB │  2.3 MiB │  2.3 MiB │ +2.4 KiB 
 manifest │     5 KiB │     5 KiB │      0 B │ 24.9 KiB │ 24.9 KiB │      0 B 
      res │ 904.1 KiB │ 906.3 KiB │ +2.3 KiB │  1.4 MiB │  1.4 MiB │ +4.5 KiB 
   native │   2.6 MiB │   2.6 MiB │      0 B │    6 MiB │    6 MiB │      0 B 
    asset │   1.6 MiB │   1.6 MiB │     -2 B │  1.6 MiB │  1.6 MiB │     -2 B 
    other │   1.4 MiB │   1.4 MiB │   +210 B │  1.6 MiB │  1.6 MiB │   +496 B 
──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼──────────
    total │  12.6 MiB │  12.6 MiB │ +5.1 KiB │ 21.5 MiB │ 21.5 MiB │ +7.7 KiB 

 DEX     │ old   │ new   │ diff       
─────────┼───────┼───────┼────────────
   files │     1 │     1 │  0         
 strings │ 40361 │ 40361 │  0 (+3 -3) 
   types │ 13920 │ 13920 │  0 (+0 -0) 
 classes │ 11605 │ 11605 │  0 (+0 -0) 
 methods │ 59302 │ 59302 │  0 (+1 -1) 
  fields │ 39539 │ 39545 │ +6 (+9 -3) 

 ARSC    │ old  │ new  │ diff       
─────────┼──────┼──────┼────────────
 configs │  243 │  243 │  0         
 entries │ 6197 │ 6203 │ +6 (+6 -0)
APK
     compressed      │     uncompressed     │                               
──────────┬──────────┼───────────┬──────────┤                               
 size     │ diff     │ size      │ diff     │ path                          
──────────┼──────────┼───────────┼──────────┼───────────────────────────────
  2.3 MiB │ +2.4 KiB │   2.3 MiB │ +2.4 KiB │ ∆ resources.arsc              
  1.1 KiB │ +1.1 KiB │   2.5 KiB │ +2.5 KiB │ + res/mU1.xml                 
    633 B │   +633 B │   1.2 KiB │ +1.2 KiB │ + res/FG1.xml                 
    557 B │   +557 B │     880 B │   +880 B │ + res/vB.xml                  
  3.9 MiB │   +212 B │   8.5 MiB │   +284 B │ ∆ classes.dex                 
 50.1 KiB │   +115 B │ 118.3 KiB │   +248 B │ ∆ META-INF/MANIFEST.MF        
 53.4 KiB │    +96 B │ 118.3 KiB │   +248 B │ ∆ META-INF/CERT.SF            
    662 B │    +31 B │   1.2 KiB │    -68 B │ ∆ res/FG.xml                  
  7.8 KiB │     -2 B │   7.6 KiB │     -2 B │ ∆ assets/dexopt/baseline.prof 
  1.2 KiB │     -1 B │   1.2 KiB │      0 B │ ∆ META-INF/CERT.RSA           
──────────┼──────────┼───────────┼──────────┼───────────────────────────────
  6.3 MiB │ +5.1 KiB │  11.1 MiB │ +7.7 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff      
  ───────┼───────┼───────────
   40361 │ 40361 │ 0 (+3 -3) 
  
  + LinkColors(componentBackground=
  + VJJJJJJJJJJLJJJJL
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"7af9f1c","r8-mode":"full","version":"8.7.14"}
  
  - LinkColors(componentBorder=
  - VJJJJJJJJLJJJJL
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"9488a95","r8-mode":"full","version":"8.7.14"}
  

METHODS:

   old   │ new   │ diff      
  ───────┼───────┼───────────
   59302 │ 59302 │ 0 (+1 -1) 
  
  + u6.b <init>(long, long, long, long, long, long, long, long, long, long, b0, long, long, long, long, a0)
  
  - u6.b <init>(long, long, long, long, long, long, long, long, b0, long, long, long, long, a0)
  

FIELDS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   39539 │ 39545 │ +6 (+9 -3) 
  
  + u6.a C: long
  + u6.a D: long
  + u6.a E: long
  + u6.a F: long
  + u6.b i: long
  + u6.b k: b0
  + u6.b n: long
  + u6.b o: long
  + u6.b p: a0
  
  - u6.b i: b0
  - u6.b k: long
  - u6.b n: a0
ARSC
ENTRIES:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   6197 │ 6203 │ +6 (+6 -0) 
  + drawable/stripe_link_add_green
  + drawable/stripe_link_bank
  + drawable/stripe_link_chevron
  + string/stripe_wallet_bank
  + string/stripe_wallet_last4_prefix
  + string/stripe_wallet_passthrough_description

@toluo-stripe toluo-stripe force-pushed the tolu/link/payment_method_rows branch 2 times, most recently from f2827b1 to 36b7739 Compare November 20, 2024 23:17
@toluo-stripe toluo-stripe changed the title Tolu/link/payment method rows Link Payment Method Rows UI Nov 21, 2024
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
@toluo-stripe toluo-stripe marked this pull request as ready for review November 21, 2024 18:27
@toluo-stripe toluo-stripe requested review from a team as code owners November 21, 2024 18:27
<!-- Default name for bank account payment method when bank name is unavailable -->
<string name="stripe_wallet_bank">Bank</string>
<!-- Accessibility description for Passthrough payment method -->
<string name="stripe_wallet_passthrough_description" translatable="false">Passthrough</string>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this not translatable? I would think that this word doesn't make sense in many languages

Comment on lines 50 to 53
@JvmStatic
@Parameterized.Parameters(name = "{0}")
@SuppressWarnings("LongMethod")
fun data(): List<TestCase> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the screenshot tests where there's only one parameter, it doesn't seem to give us many benefits to make the test parameterized. I think it would make it harder for us to track down a test case that's failing and is also a bit less readable than e.g. using a helper function which would enable us to include just the relevant parameters for that test case

onMenuButtonClick = onMenuButtonClick
)
}
TabRowDefaults.Divider(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the divider be included in the list itself, rather than on each individual list item? This seems like it would give us less control over something like not having a divider shown at the bottom of the list

}

val showWarning = (paymentDetails as? Card)?.isExpired ?: false
if (showWarning && !isSelected) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we not show the warning if the PM is selected? That is kind of surprising -- presumably a user would still want to know if their card is expired especially if they had selected that card

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants