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

[PaymentSheet] Fix issue opening the keyboard with small form #4961

Merged
merged 2 commits into from
May 6, 2022

Conversation

michelleb-stripe
Copy link
Contributor

Summary

When google pay is not available and a single LPM with a single input field is shown, when the keyboard is open it is immediately dismissed. Upon investigation this is because the bottom sheet size goes to 0 - clearing the focus of the field prior to bringing up the keyboard.

Motivation

#4570

Testing

  • Added tests
  • Modified tests
  • Manually verified

Changelog

- [Fixed] Fixed issue where text could not be inputted on small forms.

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2022

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: none)
NEW: paymentsheet-example-release-pr.apk (signature: none)

          │           compressed           │          uncompressed          
          ├───────────┬───────────┬────────┼───────────┬───────────┬────────
 APK      │ old       │ new       │ diff   │ old       │ new       │ diff   
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
      dex │  13.7 MiB │  13.7 MiB │ -170 B │  45.7 MiB │  45.7 MiB │ -168 B 
     arsc │   1.7 MiB │   1.7 MiB │    0 B │   1.7 MiB │   1.7 MiB │    0 B 
 manifest │   3.4 KiB │   3.4 KiB │    0 B │  15.2 KiB │  15.2 KiB │    0 B 
      res │ 715.4 KiB │ 715.4 KiB │    0 B │   1.1 MiB │   1.1 MiB │    0 B 
   native │   5.4 MiB │   5.4 MiB │    0 B │  13.4 MiB │  13.4 MiB │    0 B 
    asset │     3 MiB │     3 MiB │  -11 B │     3 MiB │     3 MiB │  -11 B 
    other │  79.9 KiB │  79.9 KiB │    0 B │ 154.7 KiB │ 154.7 KiB │    0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
    total │  24.5 MiB │  24.5 MiB │ -181 B │  65.1 MiB │  65.1 MiB │ -179 B 

         │          raw           │            unique            
         ├────────┬────────┬──────┼────────┬────────┬────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff       
─────────┼────────┼────────┼──────┼────────┼────────┼────────────
   files │      4 │      4 │    0 │        │        │            
 strings │ 221806 │ 221803 │   -3 │ 193811 │ 193810 │ -1 (+2 -3) 
   types │  38702 │  38701 │   -1 │  35459 │  35459 │  0 (+0 -0) 
 classes │  32796 │  32796 │    0 │  32796 │  32796 │  0 (+0 -0) 
 methods │ 198320 │ 198318 │   -2 │ 190980 │ 190979 │ -1 (+0 -1) 
  fields │ 147553 │ 147553 │    0 │ 146569 │ 146569 │  0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  292 │  292 │  0   
 entries │ 5846 │ 5846 │  0
APK
    compressed    │   uncompressed    │                               
─────────┬────────┼──────────┬────────┤                               
 size    │ diff   │ size     │ diff   │ path                          
─────────┼────────┼──────────┼────────┼───────────────────────────────
 3.8 MiB │ -170 B │ 11.3 MiB │ -168 B │ ∆ classes3.dex                
 6.7 KiB │  -11 B │  6.5 KiB │  -11 B │ ∆ assets/dexopt/baseline.prof 
─────────┼────────┼──────────┼────────┼───────────────────────────────
 3.8 MiB │ -181 B │ 11.3 MiB │ -179 B │ (total)
DEX
STRINGS:

   old    │ new    │ diff       
  ────────┼────────┼────────────
   193811 │ 193810 │ -1 (+2 -3) 
  + SMAP
  BaseSheetActivity.kt
  Kotlin
  *S Kotlin
  *F
  + 1 BaseSheetActivity.kt
  com/stripe/android/paymentsheet/ui/BaseSheetActivity
  + 2 Dp.kt
  androidx/compose/ui/unit/DpKt
  + 3 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,345:1
  175#2:346
  254#3,2:347
  254#3,2:349
  254#3,2:351
  254#3,2:353
  254#3,2:355
  *S KotlinDebug
  *F
  + 1 BaseSheetActivity.kt
  com/stripe/android/paymentsheet/ui/BaseSheetActivity
  *L
  209#1:346
  215#1:347,2
  145#1:349,2
  241#1:351,2
  242#1:353,2
  266#1:355,2
  *E
  
  + SMAP
  BaseSheetActivity.kt
  Kotlin
  *S Kotlin
  *F
  + 1 BaseSheetActivity.kt
  com/stripe/android/paymentsheet/ui/BaseSheetActivity_setupHeader_1_1
  + 2 Dp.kt
  androidx/compose/ui/unit/DpKt
  *L
  1#1,345:1
  155#2:346
  *S KotlinDebug
  *F
  + 1 BaseSheetActivity.kt
  com/stripe/android/paymentsheet/ui/BaseSheetActivity_setupHeader_1_1
  *L
  227#1:346
  *E
  
  
  - SMAP
  BaseSheetActivity.kt
  Kotlin
  *S Kotlin
  *F
  + 1 BaseSheetActivity.kt
  com/stripe/android/paymentsheet/ui/BaseSheetActivity
  + 2 Dp.kt
  androidx/compose/ui/unit/DpKt
  + 3 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,349:1
  175#2:350
  254#3,2:351
  254#3,2:353
  254#3,2:355
  254#3,2:357
  254#3,2:359
  *S KotlinDebug
  *F
  + 1 BaseSheetActivity.kt
  com/stripe/android/paymentsheet/ui/BaseSheetActivity
  *L
  213#1:350
  219#1:351,2
  149#1:353,2
  245#1:355,2
  246#1:357,2
  270#1:359,2
  *E
  
  - SMAP
  BaseSheetActivity.kt
  Kotlin
  *S Kotlin
  *F
  + 1 BaseSheetActivity.kt
  com/stripe/android/paymentsheet/ui/BaseSheetActivity_setupHeader_1_1
  + 2 Dp.kt
  androidx/compose/ui/unit/DpKt
  *L
  1#1,349:1
  155#2:350
  *S KotlinDebug
  *F
  + 1 BaseSheetActivity.kt
  com/stripe/android/paymentsheet/ui/BaseSheetActivity_setupHeader_1_1
  *L
  231#1:350
  *E
  
  - enableTransitionType
  

METHODS:

   old    │ new    │ diff       
  ────────┼────────┼────────────
   190980 │ 190979 │ -1 (+0 -1) 
  - android.animation.LayoutTransition enableTransitionType(int)

jameswoo-stripe
jameswoo-stripe previously approved these changes May 5, 2022
brnunes-stripe
brnunes-stripe previously approved these changes May 6, 2022
@michelleb-stripe michelleb-stripe merged commit c85fd15 into master May 6, 2022
@michelleb-stripe michelleb-stripe deleted the michelleb/fix-single-lpm-single-field branch May 6, 2022 17:29
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.

3 participants