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

Update to Compose 1.5.1 #7297

Merged
merged 4 commits into from
Sep 18, 2023
Merged

Update to Compose 1.5.1 #7297

merged 4 commits into from
Sep 18, 2023

Conversation

tillh-stripe
Copy link
Collaborator

@tillh-stripe tillh-stripe commented Sep 12, 2023

Summary

This pull request updates our Compose Foundation, Material, UI, and Runtime dependencies to 1.5.1.

We do this to be able to use sheetGesturesEnabled = false on ModalBottomSheetLayout, and to resolve a NoSuchMethodError for merchants who already upgraded.

Motivation

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

Bumped Compose Foundation, Compose Material, Compose Runtime, and Compose UI from 1.4.3 to 1.5.1.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 12, 2023

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.5 MiB │   3.6 MiB │   +27 KiB │   7.7 MiB │  7.8 MiB │ +48.7 KiB 
     arsc │   2.2 MiB │   2.2 MiB │ +34.9 KiB │   2.2 MiB │  2.2 MiB │ +34.9 KiB 
 manifest │   4.9 KiB │   4.9 KiB │      -7 B │  24.2 KiB │ 24.2 KiB │       0 B 
      res │ 884.7 KiB │ 891.3 KiB │  +6.6 KiB │   1.4 MiB │  1.4 MiB │    +3 KiB 
   native │   2.6 MiB │   2.6 MiB │       0 B │     6 MiB │    6 MiB │       0 B 
    asset │     3 MiB │     3 MiB │  +1.2 KiB │     3 MiB │    3 MiB │  +1.2 KiB 
    other │ 200.1 KiB │   202 KiB │  +1.9 KiB │ 448.2 KiB │  455 KiB │  +6.7 KiB 
──────────┼───────────┼───────────┼───────────┼───────────┼──────────┼───────────
    total │  12.3 MiB │  12.4 MiB │ +71.6 KiB │  20.7 MiB │ 20.8 MiB │ +94.5 KiB 

 DEX     │ old   │ new   │ diff                 
─────────┼───────┼───────┼──────────────────────
   files │     1 │     1 │    0                 
 strings │ 38333 │ 38532 │ +199 (+5255 -5056)   
   types │ 12692 │ 12726 │  +34 (+4943 -4909)   
 classes │ 10716 │ 10734 │  +18 (+4292 -4274)   
 methods │ 55936 │ 56165 │ +229 (+36203 -35974) 
  fields │ 35250 │ 35389 │ +139 (+25932 -25793) 

 ARSC    │ old  │ new  │ diff         
─────────┼──────┼──────┼──────────────
 configs │  290 │  292 │  +2 (+2 -0)  
 entries │ 6947 │ 6963 │ +16 (+16 -0)
APK
      compressed      │     uncompressed      │                                                                
──────────┬───────────┼───────────┬───────────┤                                                                
 size     │ diff      │ size      │ diff      │ path                                                           
──────────┼───────────┼───────────┼───────────┼────────────────────────────────────────────────────────────────
  2.2 MiB │ +34.9 KiB │   2.2 MiB │ +34.9 KiB │ ∆ resources.arsc                                               
  3.6 MiB │   +27 KiB │   7.8 MiB │ +48.7 KiB │ ∆ classes.dex                                                  
 64.6 KiB │  +1.6 KiB │ 144.9 KiB │  +3.4 KiB │ ∆ META-INF/CERT.SF                                             
  6.3 KiB │  +1.2 KiB │   6.2 KiB │  +1.2 KiB │ ∆ assets/dexopt/baseline.prof                                  
 48.8 KiB │    +316 B │ 144.9 KiB │  +3.4 KiB │ ∆ META-INF/MANIFEST.MF                                         
    177 B │    +177 B │       5 B │      +5 B │ + META-INF/services/kotlinx.coroutines.internal.p              
          │    -177 B │           │      -5 B │ - META-INF/services/kotlinx.coroutines.internal.q              
    165 B │    +165 B │      67 B │     +67 B │ + res/OX1.png                                                  
    163 B │    +163 B │      67 B │     +67 B │ + res/0Z.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/5P.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/5v.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/6P.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/6d.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/71.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/7V.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/7m.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/Ag.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/BT.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/Ck.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/Ec.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/Ff.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/GY.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/LO.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/MD.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/OM.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/OX.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/Q-.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/Tr.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/VW.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/W5.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/Y3.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/Y9.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/YD.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/aR.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/aU.png                                                   
    163 B │    +163 B │      67 B │     +67 B │ + res/bi.png                                                   
    163 B │    +163 
...✂
MANIFEST
@@ -373,12 +373,6 @@
         />
-    <service
-        android:enabled=false
-        android:exported=false
-        android:name=androidx.camera.core.impl.MetadataHolderService
-        >
-      <meta-data
-          android:name=androidx.camera.core.impl.MetadataHolderService.DEFAULT_CONFIG_PROVIDER
-          android:value=androidx.camera.camera2.Camera2Config_DefaultProvider
-          />
-    </service>
+    <activity
+        android:exported=true
+        android:name=androidx.compose.ui.tooling.PreviewActivity
+        />
     <provider
@@ -401,2 +395,12 @@
     </provider>
+    <service
+        android:enabled=false
+        android:exported=false
+        android:name=androidx.camera.core.impl.MetadataHolderService
+        >
+      <meta-data
+          android:name=androidx.camera.core.impl.MetadataHolderService.DEFAULT_CONFIG_PROVIDER
+          android:value=androidx.camera.camera2.Camera2Config_DefaultProvider
+          />
+    </service>
     <uses-library
@@ -413,7 +417,21 @@
         />
-    <activity
-        android:exported=true
-        android:name=androidx.compose.ui.tooling.PreviewActivity
+    <service
+        android:exported=false
+        android:name=com.google.android.datatransport.runtime.backends.TransportBackendDiscovery
+        >
+      <meta-data
+          android:name=backend:com.google.android.datatransport.cct.CctBackendFactory
+          android:value=cct
+          />
+    </service>
+    <service
+        android:exported=false
+        android:name=com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService
+        android:permission=android.permission.BIND_JOB_SERVICE
         />
     <receiver
+        android:exported=false
+        android:name=com.google.android.datatransport.runtime.scheduling.jobscheduling.AlarmManagerSchedulerBroadcastReceiver
+        />
+    <receiver
         android:directBootAware=false
@@ -445,20 +463,2 @@
     </receiver>
-    <service
-        android:exported=false
-        android:name=com.google.android.datatransport.runtime.backends.TransportBackendDiscovery
-        >
-      <meta-data
-          android:name=backend:com.google.android.datatransport.cct.CctBackendFactory
-          android:value=cct
-          />
-    </service>
-    <service
-        android:exported=false
-        android:name=com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService
-        android:permission=android.permission.BIND_JOB_SERVICE
-        />
-    <receiver
-        android:exported=false
-        android:name=com.google.android.datatransport.runtime.scheduling.jobscheduling.AlarmManagerSchedulerBroadcastReceiver
-        />
     <meta-data
DEX
STRINGS:

   old   │ new   │ diff               
  ───────┼───────┼────────────────────
   38333 │ 38532 │ +199 (+5255 -5056) 
  + 
  Delegate Node: 
  + _this_CacheDrawModifierNode
  + _this_fastMerge
  + _this_inspectable
  + _this_performCustomClearFocus
  + _this_performCustomRequestFocus
  + _this_composeColorSpace
  + ) was not set. Did you use DrawerState with the Drawer composable?
  + ) was not set. Did you use ModalBottomSheetState with the ModalBottomSheetLayout composable?
  + , onPreKeyEvent=
  + , onPreRotaryScrollEvent=null)
  + , properties=
  + A ModifierNodeElement cannot return an already attached node from create() 
  + A2
  + AccessibilityActionCompat: 
  + AndroidPointerIcon(type=
  + AppendedSemanticsElement(mergeDescendants=
  + B2
  + BanUncheckedReflection
  + BorderModifierNodeElement(width=
  + C2
  + Cannot delegate to an already attached node
  + Cannot delegate to an already delegated node
  + Cannot detach a node that is not attached
  + Cannot obtain node coordinator. Is the Modifier.Node attached?
  + Cannot read CompositionLocal because the Modifier node is not currently attached.
  + ChallengeAdditionalAuth
  + ChallengeDecoupledAuth
  + Crossfade
  + D2
  + DLD
  + Delegating to multiple LayoutModifierNodes without the delegating node implementing LayoutModifierNode itself is not allowed.
  Delegating Node: 
  + DpAnimation
  + DrawWithCacheElement(onBuildDrawCache=
  + E2
  + F2
  + ForceUpdateElement(original=
  + G2
  + GraphicsLayerElement(scaleX=
  + H2
  + I2
  + IIIIIIFJFL
  + IIIIZ
  + IIZIIIIJFL
  + InformationOnly
  + InsertTextAtCursor
  + Invalid content capture ID
  + IsTraversalGroup
  + J2
  + JJIII
  + JJZIF
  + K2
  + KeyInputElement(onKeyEvent=
  + Kotlin reflection is not yet supported for synthetic Java properties
  + L2
  + LDDDDDDD
  + LFLLLII
  + LIJJJLLLLLL
  + LJJJLLLLLL
  + LJLLII
  + LJLZ
  + LLILZZZ
  + LLJLFJLLLLLJLLLJLLLL
  + LLLJLLLII
  + LLLLJLLLLLL
  + LLLLLIZIILLLL
  + LLLLLLFF
  + LLLLLLLLI
  + LLLLZZL
  + La0/r;
  + La2/d;
  + La2/e;
  + La2/f;
  + La2/g;
  + La2/h;
  + La2/i;
  + La2/j;
  + La7/c;
  + La7/d;
  + La7/e;
  + Lab/b;
  + Lab/c;
  + Lab/d;
  + Lab/e;
  + Lab/f;
  + Lab/g;
  + Lab/h;
  + Lab/i;
  + Lab/j;
  + Laf/c;
  + Laf/d;
  + Laf/e;
  + Laf/f;
  + Laf/g;
  + Lag/c;
  + Lag/d;
  + Lag/e;
  + Lag/f;
  + Lag/g;
  + Lag/h;
  + Lag/i;
  + Lag/j;
  + Lag/k;
  + Lag/l;
  + Lag/m;
  + Lag/n;
  + Lag/o;
  + Lag/p;
  + Lah/d;
  + Lah/e;
  + Lah/f;
  + Lah/g;
  + Lah/h;
  + Lai/a0;
  + Lai/b0;
  + Lai/c;
  + Lai/d;
  + Lai/e;
  + Lai/f;
  + Lai/g;
  + Lai/h;
  + Lai/i;
  + Lai/j;
  + Lai/k;
  + Lai/l;
  + Lai/m;
  + Lai/n;
  + Lai/o;
  + Lai/p;
  + Lai/q;
  + Lai/r;
  + Lai/s;
  + Lai/t;
  + Lai/u;
  + Lai/v;
  + Lai/w;
  + Lai/x;
  + Lai/y;
  + Lai/z;
  + Laj/b;
  + Laj/c;
  + Laj/d;
  + Laj/e;
  + Laj/f;
  + Laj/g;
  + Laj/h;
  + Laj/i;
  + Laj/j;
  + Laj/k;
  + Laj/l;
  + Laj/m;
  + Laj/n;
  + Laj/o;
  + Laj/p;
  + Laj/q;
  + Laj/r;
  + Laj/s;
  + Laj/t;
  + Laj/u;
  + Laj/v;
  + Laj/w;
  + Laj/x;
  + Laj/y;
  + Landroid/app/Person;
  + Landroid/app/RemoteInput;
  + Landroid/content/LocusId;
  + Landroid/graphics/ColorSpace_Rgb_TransferParameters;
  + Landroid/graphics/ColorSpace_Rgb;
  + Landroid/os/ext/SdkExtensions;
  + Landroid/view/WindowInsetsController_OnControllableInsetsChangedListener;
  + Landroid/view/contentcapture/ContentCaptureSession;
  + Landroidx/appcompat/widget/s4;
  + Landroidx/compose/foundation/BackgroundElement;
  + Landroidx/compose/foundation/BorderModifierNodeElement;
  + Landroidx/compose/foundation/ClickableElement;
  + Landroidx/compose/foundation/FocusableElement;
  + Landroidx/compose/foundation/FocusableKt_FocusableInNonTouchModeElement_1;
  + Landroidx/compose/foundation/FocusedBoundsObserverElement;
  + Landroidx/compose/foundation/HoverableElement;
  + Landroidx/compose/foundation/ScrollingLayoutElement;
  + Landroidx/compose/foundation/a;
  + Landroidx/compose/foundation/b;
  + Landroidx/compose/foundation/c;
  + Landroidx/compose/foundation/d;
  + Landroidx/compose/foundation/gestures/DraggableElement;
  + Landroidx/compose/foundation/gestures/MouseWheelScrollElement;
  + Landroidx/compose/foundation/gestures/a;
  + Landroidx/compose/foundation/layout/AlignmentLineOffsetDpElement;
  + Landroidx/compose/foundation/layout/AspectRatioElement;
  + Landroidx/compose/foundation/layout/BoxChildDataElement;
  + Landroidx/compose/foundation/layout/FillElement;
  + Landroidx/compose/foundation/layout/Horizont
...✂
ARSC
CONFIGS:

   old │ new │ diff       
  ─────┼─────┼────────────
   290 │ 292 │ +2 (+2 -0) 
  + drawable-anydpi
  + drawable-ldpi
  

ENTRIES:

   old  │ new  │ diff         
  ──────┼──────┼──────────────
   6947 │ 6963 │ +16 (+16 -0) 
  + color/call_notification_answer_color
  + color/call_notification_decline_color
  + drawable/ic_call_answer
  + drawable/ic_call_answer_low
  + drawable/ic_call_answer_video
  + drawable/ic_call_answer_video_low
  + drawable/ic_call_decline
  + drawable/ic_call_decline_low
  + id/binding_reference
  + string/call_notification_answer_action
  + string/call_notification_answer_video_action
  + string/call_notification_decline_action
  + string/call_notification_hang_up_action
  + string/call_notification_incoming_text
  + string/call_notification_ongoing_text
  + string/call_notification_screening_text

}
}

val imeHeight = WindowInsets.ime.getBottom(LocalDensity.current)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This does seem to work on API 29 🤔

ccen-stripe
ccen-stripe previously approved these changes Sep 13, 2023
Copy link
Contributor

@ccen-stripe ccen-stripe left a comment

Choose a reason for hiding this comment

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

verified Identity

Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe left a comment

Choose a reason for hiding this comment

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

Verified Connections

@tillh-stripe tillh-stripe force-pushed the tillh/update-to-compose-1.5.1 branch from 8112631 to 7781982 Compare September 14, 2023 13:04
@tillh-stripe tillh-stripe merged commit 1a4a042 into master Sep 18, 2023
@tillh-stripe tillh-stripe deleted the tillh/update-to-compose-1.5.1 branch September 18, 2023 22:45
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.

4 participants