Releases: JetBrains/compose-multiplatform
1.7.3
Changes since 1.7.1
Features
Desktop
Fixes
iOS
- Taps should be properly registered on interop views with
UIKitInteropInteractionMode.Cooperative
interaction mode - Interactive pop (swipe to go back) on
UINavigationController
should recognize correctly
Dependencies
-
Gradle Plugin
org.jetbrains.compose
, version1.7.3
. Based on Jetpack Compose libraries: -
Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.8.4
. Based on Jetpack Lifecycle 2.8.5 -
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.0.1
. Based on Jetpack Material3 Adaptive 1.0.0
1.8.0-alpha01
Changes since 1.7.1
Highlights
iOS
- LocalUIViewController moved to the
androidx.compose.ui.uikit
module - Update
AccessibilitySyncOptions
and removeAccessibilityDebugLogger
from 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
,awaitIdle
orrunOnIdle
(whether explicit or implicit) executingdelay
-ed coroutines will no longer work correctly. To fix this advance the test time viamainClock
manually, 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()
, becausewaitForIdle
no 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 runOnIdle
will now executeaction
on the UI threadrunOnIdle
will no longer callwaitForIdle
after executing the action- Advancing
mainClock
such 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
,awaitIdle
andrunOnIdle
no longer consider Compose to be non-idle when coroutines launched in a composition scope calldelay
. This prevents tests with an infinite loop withdelay
in aLaunchedEffect
from hanging- Tests that advance the test clock (via
mainClock.advanceTimeBy
) will now correctly (re)compose/layout/draw/effects each virtual frame as needed runOnIdle
will now executeaction
on the UI thread, as Android behavesrunOnIdle
will no longer callwaitForIdle
after 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.formatWithSkeleton
that 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
1.8.0-dev1905
v1.8.0-dev1905 [gradle] Skip resource configuration for androidLibrary target since …
1.8.0-dev1899
[gradle] Support new AGP with androidLibrary target (#5157) Since AGP `8.8.0-alpha08` there was added support generated assets in the new `androidLibrary` target. We have to support a new target configuration and work with compose multiplatform resources Fixes https://youtrack.jetbrains.com/issue/CMP-6982 ## Testing - Added gradle tests ## Release Notes ### Features - Gradle Plugin - Support compose resources in `androidLibrary` target
1.8.0-dev1897
Changelog for 1.7.0 (#5154) Co-authored-by: Ivan Matkov <ivan.matkov@jetbrains.com>
1.8.0-dev1890
Changelog for 1.7.0 (#5154) Co-authored-by: Ivan Matkov <ivan.matkov@jetbrains.com>
1.7.1
Changes since 1.7.0
Fixes
Multiple Platforms
- Fixed
Modifier.clickable
binary compatibility with 1.6 on non-JVM targets - Fixed
Modifier.toggleable
andModifier.selectable
binary compatibility with 1.6 on non-JVM targets - Fix issue where
DateRangePicker
doesn't show confirmation button on iOS and Desktop - Fix Skia paragraph caching performance degradation
iOS
- Fling animation works correctly for fast scrolling gestures
- Fix HorizontalPager snapping on iOS
- Fixed double recomposition on the first screen
- Fix Accessibility Items availability inside dialogs
- Memory leak due to Compose view controller never GCed
Desktop
Dependencies
-
Gradle Plugin
org.jetbrains.compose
, version1.7.1
. Based on Jetpack Compose libraries: -
Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.8.4
. Based on Jetpack Lifecycle 2.8.5 -
Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.8.0-alpha10
. Based on Jetpack Navigation 2.8.0 -
Material3 Adaptive libraries
org.jetbrains.compose.material3.adaptive:adaptive*:1.0.1
. Based on Jetpack Material3 Adaptive 1.0.0
1.7.0
Changes since 1.6.11
Highlights
Resources
Navigation
Web
skiko.js
is redundant in case of K/Wasm Compose Multiplatform for web applications and it can be removed from index.html files to not load redundant files.skiko.js
will be removed from the k/wasm distribution in the future releases.skiko.js
is still needed in case of K/JS Compose Multiplatform for web apps
Breaking changes
iOS
UIKitView
andUIKitViewController
inpackage androidx.compose.ui.interop
are deprecated. New API are mentioned in deprecation message. Deprecated invocations should work fine unless customonResize
is used, it is disallowed now and will print a warning.- Actual of expected
InteropView
on iOS isUIResponder
now instead ofUIView
. It's the first common ancestor forUIViewController
andUIView
, both of which can be integrated using iOS interop APIs - The app will crash by default, if
CADisableMinimumFrameDurationOnPhone
is not set to true inInfo.plist
. Use newly addedComposeUIViewControllerConfiguration.enforceStrictPlistSanityCheck
to opt-out of this behavior
Desktop
Android
Resources
Features
Multiple Platforms
- The
clickable
modifier now responds to NumPadEnter and Spacebar, too, in addition to Enter LocalLifecycleOwner
moved from Compose UI tolifecycle-runtime-compose
so that its Compose-based helper APIs can be used outside of Compose UI- Skia is updated to m126
- Commonized
org.jetbrains.compose.material3:material3-window-size-class
module - Commonized
org.jetbrains.compose.material3.adaptive:adaptive*
modules - New multiplatform module "material-navigation" (in beta status)
material3-adaptive-navigation-suite
is multiplatform now- Support Kotlin 1.9.25
iOS
- Initial iOS floating cursor support
- Added
accessibilityEnabled: Boolean = true
argument toUIKitView
andUIKitViewController
preferredStatusBarStyle
,preferredStatysBarAnimation
andprefersStatusBarHidden
are added toComposeUIViewControllerDelegate
to allow status bar appearance modification- Improvements in touches processing to detect if touches were meant to be delivered to interop views, or should be processed by Compose
- New
UIKitView
andUIKitViewController
API inpackage androidx.compose.ui.viewinterop
. Support ofonReset
to reuse the interop composable emitted node and avoid excessive native views reallocations, fine-grain touches strategy control (cooperative with explicit time delay, non-cooperative where no touches are received by Compose, ignoring touches) - Basic support for
BasicTextField(TextFieldState, ...)
on iOS
Desktop
- Add constructor with
RenderSettings
toComposePanel
. Added a classRenderSettings
withval isVsyncEnabled: Boolean?
. When set totrue
gives a hint to renderer implementation of the particularComposePanel
to reduce the latency between the input and visual changes in exchange for possible screen tearing - Add public
moveEnabled
andpositionPercentage
setters inSplitPaneState
- Implemented Drag-and-Drop from AOSP:
Modifier.dragAndDropSource
andModifier.dragAndDropTarget
- Added support for input methods (languages such as Chinese, Korean, Arabic) to BasicTextField(TextFieldState, ...)
- Add dynamic Drag&Drop target indication (🚫 icon under cursor if currently there is no valid drop target under it)
- The thickness of border resizers in undecorated windows and dialogs can now be controlled by passing a new
decoration
argument
Resources
- Speed resources web rendering up by the reading a cached value instantly
- If there is no resource with suitable density, use resource with the most suitable density, otherwise use default (similar to the Android logic)
- Add a customization for resources directories. Now it is possible to use e.g downloaded resources
- Now the gradle plugin generates resources map to find a resource by a string ID
- To avoid constant reading raw font bytes on each Font usage on non-android targets, there was added the font cache. Android has own font cache inside the platform implementation
- Added utility functions to decode
Bitmap ByteArray as ImageVector
andXML ByteArray as ImageVector
in the common code andSVG ByteArray as Painter
in the non-android code - Added support of test resources in Compose Multiplatform projects
- Added support of multi-module resources in JVM-only projects
Gradle Plugin
Fixes
Multiple Platforms
- Fix "ComposePanel. Focus moves to child after focusing/unfocusing the main window"
- Don't show code completion for non-existenst API in
commonMain
that fails on Android withNoSuchMethodException
- Fix order of interop elements in some cases
- Fixed
Popup
jerking during ripple effect animation - Fix applying
ShaderBrush
to part ofAnnotatedString
- Fix text
brush
animation and optimized updating some visual text properties (applying time is reduced up to 40%) - Fix initial cursor position in the empty
TextField
with explicitly setTextAlignment
- Fix focus for editable
TextField
insideExposedDropdownMenuBox
- Fix changing
FontRenderingSettings
is not reflected until composition restarts
iOS
- Pressing directional keys on a physical keyboard connected to iOS device doesn't cause a crash
- Dismissing popup or dialogue within a very short timespan after its creation doesn't cause a crash
- Fix missing invalidations during native view resize
- Fixed a memory spike when continuously resizing the
ComposeUIViewController
(such as when used in modal sheet presentation context with different detents) - visibility of selection handles in single-line textfields with LTR + RTL text in iOS
- [Interop views are no...
1.8.0-dev1875
Update Android target SDK to 35 (#5152) Should fix ``` Dependency 'androidx.compose.foundation:foundation-android:1.8.0-alpha02' requires libraries and applications that depend on it to compile against version 35 or later of the Android APIs. ```
1.8.0-dev1873
Update Android target SDK to 35 (#5152) Should fix ``` Dependency 'androidx.compose.foundation:foundation-android:1.8.0-alpha02' requires libraries and applications that depend on it to compile against version 35 or later of the Android APIs. ```