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] Do not show log out overflow menu unless Link account is fully logged in #5558

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

winnie-stripe
Copy link
Collaborator

@winnie-stripe winnie-stripe commented Sep 15, 2022

Summary

The three dots overflow icon was showing a log out of link option even when the log in process was not fully completed yet (e.g. OTP verification incomplete). This change makes the logic for showing the overflow menu aware of the account status and only shows it if the account status is fully verified.

Motivation

Item 12 from Link in Android dogfooding (https://paper.dropbox.com/doc/Link-Android-GA-Dogfooding-912--BpJ5pPAPD7SonTpoMcWANbgpAg-u4ksiof3jZUG9wY9klDBg)

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
2022-09-15 10 10 19 2022-09-15 10 10 22

Changelog

@github-actions
Copy link
Contributor

github-actions bot commented Sep 15, 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 │ 15.8 MiB │ 15.8 MiB │ +318 B │  53.4 MiB │  53.4 MiB │ +560 B 
     arsc │  1.8 MiB │  1.8 MiB │    0 B │   1.8 MiB │   1.8 MiB │    0 B 
 manifest │  4.1 KiB │  4.1 KiB │    0 B │  18.9 KiB │  18.9 KiB │    0 B 
      res │    1 MiB │    1 MiB │    0 B │   1.8 MiB │   1.8 MiB │    0 B 
   native │  2.5 MiB │  2.5 MiB │    0 B │   5.9 MiB │   5.9 MiB │    0 B 
    asset │    3 MiB │    3 MiB │   +7 B │     3 MiB │     3 MiB │   +7 B 
    other │ 81.8 KiB │ 81.8 KiB │    0 B │ 155.7 KiB │ 155.7 KiB │    0 B 
──────────┼──────────┼──────────┼────────┼───────────┼───────────┼────────
    total │ 24.2 MiB │ 24.2 MiB │ +325 B │  66.1 MiB │  66.1 MiB │ +567 B 

         │          raw           │             unique             
         ├────────┬────────┬──────┼────────┬────────┬──────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff         
─────────┼────────┼────────┼──────┼────────┼────────┼──────────────
   files │      4 │      4 │    0 │        │        │              
 strings │ 257594 │ 257595 │   +1 │ 219013 │ 219014 │ +1 (+35 -34) 
   types │  45209 │  45209 │    0 │  41435 │  41435 │  0 (+0 -0)   
 classes │  38618 │  38618 │    0 │  38618 │  38618 │  0 (+0 -0)   
 methods │ 225324 │ 225327 │   +3 │ 217271 │ 217274 │ +3 (+7 -4)   
  fields │ 164545 │ 164546 │   +1 │ 163442 │ 163443 │ +1 (+1 -0)   

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  334 │  334 │  0   
 entries │ 6240 │ 6240 │  0
APK
    compressed    │   uncompressed   │                               
─────────┬────────┼─────────┬────────┤                               
 size    │ diff   │ size    │ diff   │ path                          
─────────┼────────┼─────────┼────────┼───────────────────────────────
 2.4 MiB │ +318 B │ 7.3 MiB │ +560 B │ ∆ classes3.dex                
 8.3 KiB │   +7 B │ 8.1 KiB │   +7 B │ ∆ assets/dexopt/baseline.prof 
─────────┼────────┼─────────┼────────┼───────────────────────────────
 2.4 MiB │ +325 B │ 7.3 MiB │ +567 B │ (total)
DEX
STRINGS:

   old    │ new    │ diff         
  ────────┼────────┼──────────────
   219013 │ 219014 │ +1 (+35 -34) 
  + �
  
  ���
  
  ���
  
  ���
  ���
  ���
  ����3���0�2�����0�2�������0�2�������0�2�������0�H�¢���	¨�
  
  + &
  ���
  ��
  
  ���
  
  ���
  ���
  ���
  
  ���
  �������2�0�B3��������0�������0�������0���������0����	����0
  ¢����J	����0�HÆ�J	����0�HÆ�J	����0�HÆ�J�������0�HÆ�J�������0
  H�J?����02�������0�2�������0�2�������0�2
  ��������0�2
  ���	����0
  H�J�����0�2�������0�H�J	����0�H�J	����0�H�R��	����0
  ¢��
  ����
  R�������0�¢��
  ������R�����0�¢��
  ������R�����0�¢��
  ������R�����0�¢��
  ������¨��
  + (IZZLjava/lang/String;Lcom/stripe/android/link/model/AccountStatus;)V
  + (ZLjava/lang/String;Ljava/lang/String;Lcom/stripe/android/link/model/AccountStatus;Landroidx/compose/runtime/Composer;I)Lcom/stripe/android/link/ui/LinkAppBarState;
  + , accountStatus=
  + LIZZLL
  + LLIZZLLIL
  + LZLLLLI
  + SMAP
  LinkActivity.kt
  Kotlin
  *S Kotlin
  *F
  + 1 LinkActivity.kt
  com/stripe/android/link/LinkActivity_onCreate_1_2_1
  + 2 Column.kt
  androidx/compose/foundation/layout/ColumnKt
  + 3 Layout.kt
  androidx/compose/ui/layout/LayoutKt
  + 4 CompositionLocal.kt
  androidx/compose/runtime/CompositionLocal
  + 5 Composables.kt
  androidx/compose/runtime/ComposablesKt
  + 6 SnapshotState.kt
  androidx/compose/runtime/SnapshotStateKt__SnapshotStateKt
  *L
  1#1,281:1
  74#2,6:282
  80#2:314
  84#2:319
  75#3:288
  76#3,11:290
  89#3:318
  76#4:289
  460#5,13:301
  473#5,3:315
  76#6:320
  76#6:321
  76#6:322
  *S KotlinDebug
  *F
  + 1 LinkActivity.kt
  com/stripe/android/link/LinkActivity_onCreate_1_2_1
  *L
  115#1:282,6
  115#1:314
  115#1:319
  115#1:288
  115#1:290,11
  115#1:318
  115#1:289
  115#1:301,13
  115#1:315,3
  116#1:320
  117#1:321
  118#1:322
  *E
  
  + SMAP
  LinkAppBar.kt
  Kotlin
  *S Kotlin
  *F
  + 1 LinkAppBar.kt
  com/stripe/android/link/ui/LinkAppBarKt
  + 2 Row.kt
  androidx/compose/foundation/layout/RowKt
  + 3 Layout.kt
  androidx/compose/ui/layout/LayoutKt
  + 4 CompositionLocal.kt
  androidx/compose/runtime/CompositionLocal
  + 5 Composables.kt
  androidx/compose/runtime/ComposablesKt
  + 6 Dp.kt
  androidx/compose/ui/unit/DpKt
  + 7 Column.kt
  androidx/compose/foundation/layout/ColumnKt
  + 8 Composer.kt
  androidx/compose/runtime/ComposerKt
  + 9 SnapshotState.kt
  androidx/compose/runtime/SnapshotStateKt__SnapshotStateKt
  *L
  1#1,208:1
  79#2,2:209
  81#2:237
  85#2:291
  75#3:211
  76#3,11:213
  75#3:246
  76#3,11:248
  89#3:276
  89#3:290
  76#4:212
  76#4:247
  460#5,13:224
  460#5,13:259
  473#5,3:273
  50#5:279
  49#5:280
  473#5,3:287
  154#6:238
  154#6:239
  154#6:278
  74#7,6:240
  80#7:272
  84#7:277
  1057#8,6:281
  76#9:292
  76#9:293
  *S KotlinDebug
  *F
  + 1 LinkAppBar.kt
  com/stripe/android/link/ui/LinkAppBarKt
  *L
  42#1:209,2
  42#1:237
  42#1:291
  42#1:211
  42#1:213,11
  62#1:246
  62#1:248,11
  62#1:276
  42#1:290
  42#1:212
  62#1:247
  42#1:224,13
  62#1:259,13
  62#1:273,3
  98#1:279
  98#1:280
  42#1:287,3
  51#1:238
  66#1:239
  114#1:278
  62#1:240,6
  62#1:272
  62#1:277
  98#1:281,6
  60#1:292
  93#1:293
  *E
  
  + SMAP
  LinkAppBar.kt
  Kotlin
  *S Kotlin
  *F
  + 1 LinkAppBar.kt
  com/stripe/android/link/ui/LinkAppBarKt_LinkAppBar_1_2_1
  + 2 Dp.kt
  androidx/compose/ui/unit/DpKt
  + 3 Row.kt
  androidx/compose/foundation/layout/RowKt
  + 4 Layout.kt
  androidx/compose/ui/layout/LayoutKt
  + 5 CompositionLocal.kt
  androidx/compose/runtime/CompositionLocal
  + 6 Composables.kt
  androidx/compose/runtime/ComposablesKt
  *L
  1#1,208:1
  154#2:209
  154#2:210
  76#3,5:211
  81#3:242
  85#3:247
  75#4:216
  76#4,11:218
  89#4:246
  76#5:217
  460#6,13:229
  473#6,3:243
  *S KotlinDebug
  *F
  + 1 LinkAppBar.kt
  com/stripe/android/link/ui/LinkAppBarKt_LinkAppBar_1_2_1
  *L
  79#1:209
  80#1:210
  76#1:211,5
  76#1:242
  76#1:247
  76#1:216
  76#1:218,11
  76#1:246
  76#1:217
  76#1:229,13
  76#1:243,3
  *E
  
  + SMAP
  LinkAppBar.kt
  Kotlin
  *S Kotlin
  *F
  + 1 LinkAppBar.kt
  com/stripe/android/link/ui/LinkAppBarKt_LinkAppBar_1_3_1_1
  + 2 Composables.kt
  androidx/compose/runtime/ComposablesKt
  + 3 Composer.kt
  androidx/compose/runtime/ComposerKt
  *L
  1#1,208:1
  50#2:209
  49#2:210
  36#2:217
  1057#3,6:211
  1057#3,6:218
  *S KotlinDebug
  *F
  + 1 LinkAppBar.kt
  com/stripe/android/link/ui/LinkAppBarKt_LinkAppBar_1_3_1_1
  *L
  101#1:209
  101#1:210
  105#1:217
  101#1:211,6
  105#1:218,6
  *E
  

...✂

@winnie-stripe winnie-stripe force-pushed the winnie/log-out-button-when-unverified branch from 2129b99 to a4e16e4 Compare September 15, 2022 16:11
Copy link
Collaborator

@tillh-stripe tillh-stripe left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Collaborator

@tillh-stripe tillh-stripe left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@winnie-stripe winnie-stripe merged commit 5858d9e into master Sep 15, 2022
@winnie-stripe winnie-stripe deleted the winnie/log-out-button-when-unverified branch September 15, 2022 17:26
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