Changes since 1.7.1
Highlights
iOS
- LocalUIViewController moved to the
androidx.compose.ui.uikitmodule - Update
AccessibilitySyncOptionsand removeAccessibilityDebugLoggerfrom public API - ComposeUIViewControllerDelegate marked as deprecated. Use parent view controller to override the methods of the UIViewController class
- Remove experimental flag from
fun enableTraceOSLog() - Remove obsolete Canvas Layers mode on iOS
Breaking Changes
Multiple Platforms
- Tests that relied on
waitForIdle,awaitIdleorrunOnIdle(whether explicit or implicit) executingdelay-ed coroutines will no longer work correctly. To fix this advance the test time viamainClockmanually, as needed
For example, tests that previously did something like:
will need to addvar updateText by mutableStateOf(false) var text by mutableStateOf("0") setContent { LaunchedEffect(updateText) { if (updateText) { delay(1000) text = "1" } } } updateText = true waitForIdle() assertEquals("1", text)mainClock.advanceTimeBy(1000)afterwaitForIdle(), becausewaitForIdleno longer waits for thedelay-ed coroutine to complete - Tests that advance the test clock (via
mainClock.advanceTimeBy) may see different behavior with regards to the amount and timing of recomposition, layout, drawing and effects runOnIdlewill now executeactionon the UI threadrunOnIdlewill no longer callwaitForIdleafter executing the action- Advancing
mainClocksuch that it doesn't reach the next frame, will no longer cause a recomposition
Desktop
Features
Multiple Platforms
- Support configurable vertical text centering via
LineHeightStyle.Alignment - Support Variable Fonts In All Platforms
iOS
- Add localised string for VoiceOver accessibility support
- Support state announcements for scrollable lists in VoiceOver
- Support for accessibility gestures for left-to-right languages
Desktop
Resources
Gradle Plugin
Navigation
- Basic support a navigation by deep links
- Commonize
navController.navigate(Uri)method - Implemented non-android
navController.handleDeepLink(NavDeepLinkRequest)method - New API to configure browser navigation buttons and the address line
- Navigation via a browser address field
Fixes
Multiple Platforms
waitForIdle,awaitIdleandrunOnIdleno longer consider Compose to be non-idle when coroutines launched in a composition scope calldelay. This prevents tests with an infinite loop withdelayin aLaunchedEffectfrom hanging- Tests that advance the test clock (via
mainClock.advanceTimeBy) will now correctly (re)compose/layout/draw/effects each virtual frame as needed runOnIdlewill now executeactionon the UI thread, as Android behavesrunOnIdlewill no longer callwaitForIdleafter executing the action, as Android behaves- The overhead for running an empty test has been significantly reduced
iOS
- Deprecate defaultUIKitMain()
- Fixed visibility of
androidx.compose.material3.internal.formatWithSkeletonthat was accidently marked as public - Fix a bug where the accessibility tree did not reload when VoiceOver was enabled
- Fix Display Cutout Padding when rotating the device
Desktop
- Fix drag-and-drop when the list of supported actions doesn't include
Move - Fix accessibility focus when using
compose.swing.render.on.graphics=true - Fix "Context menu on desktop shows incorrect items after the second showing"
Resources
Navigation
Dependencies
-
Gradle Plugin
org.jetbrains.compose, version1.8.0-alpha01. Based on Jetpack Compose libraries: -
Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.9.0-alpha01. Based on Jetpack Lifecycle 2.9.0-alpha03 -
Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.8.0-alpha11. Based on Jetpack Navigation 2.8.0 -
Material3 Adaptive libraries
org.jetbrains.compose.material3.adaptive:adaptive*:1.1.0-alpha01. Based on Jetpack Material3 Adaptive 1.1.0-alpha04