Releases: JetBrains/compose-multiplatform
1.8.0-beta01
Changes since 1.8.0-alpha04
Breaking Changes
Multiple Platforms
- Add
@Composable
annotations to the actualWindowInsets.Companion.*
extensions to match the expected declarations #1919, #1720
Features
iOS
- Add ability to recreate Composable after
ComposeUIViewController
leaves view controller hierarchy #1877 - Support trackpad pointer input #1893
- Save Composable state when view controller leaves view controller hierarchy #1904
Fixes
iOS
- Removed permissions alert when pasting text into a
TextField
#1894 - Fix crash when removing popup during scene size change animation #1878
- Fix accessibility elements rects when
ComposeUIViewController
is shifted #1899 - Fixed an issue where it wasn't possible to open a popup using pointer input devices #1906
- Fix popup safe drawing padding when
usePlatformInsets = true
#1920 - Fix an issue where Compose would retain the old state when its view was reappeared #1921
- (prerelease fix) Fix non-interactive UI after interop view tap #1925
Desktop
- [Windows] Fixed ordering of
SwingPanel
s when usingcompose.interop.blending=true
#1901 - [macOS] Fix, for some cases, the background flashing when closing a window/dialog. This can still happen if an animation is running when the window or dialog is closing #1911
- Fix
onRenderApiChanged
inComposeWindow
andComposeDialog
not working when the renderer changes due to fallback, rather than explicit change #1911 - [Swing Interop] Fixed
compose.interop.blending=true
completely breaking Swing interop on Windows when Direct3D is unsupported. Note that interop blending is still supported on Windows only if Direct3D is available #1913
Dependencies
-
Gradle Plugin
org.jetbrains.compose
, version1.8.0-beta01
. Based on Jetpack Compose libraries: -
Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.9.0-alpha05
. Based on Jetpack Lifecycle 2.9.0-alpha12 -
Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.9.0-alpha15
. Based on Jetpack Navigation 2.9.0-alpha08 -
Material3 Adaptive libraries
org.jetbrains.compose.material3.adaptive:adaptive*:1.1.0-beta01
. Based on Jetpack Material3 Adaptive 1.1.0-beta01
1.8.0-alpha04
Changes since 1.8.0-alpha03
Highlights
Desktop
- Improved performance on Windows by replacing the native code compiler to Clang. See details in JetBrains/skiko#1020 (comment) #1863
- DirectX rendering FPS is 17 % higher
- Software rendering FPS is 73 % higher
- Skiko binary size is reduced from 16.7 to 12.1 Mb on x64 and from 17.4 to 10.5 Mb on arm64
- Note that the numbers are measured on one machine and also can differ between Compose 1.7 and Compose 1.8 (will be updated in the stable Release Notes)
Known Issues
iOS
- Back gesture may remain stuck in the middle, the fix will be available in the next pre-release version #1861
Breaking Changes
Multiple Platforms
- Google Maven now contains some artifacts for all Kotlin targets including Wasm and JS. Compose Multiplatform now depends on those artifacts and user projects might need to add
google()
repo torepositories {...}
block if it is not there yet #1819 - Multiplatform lifecycle was migrated from a internal
core-bundle
module to the androidx SavedState. Libraries that useorg.jetbrains.androidx.lifecycle:lifecycle-viewmodel-savedstate
ororg.jetbrains.androidx.savedstate:savedstate
should migrate to the latest version #1850 - (prerelease fix) Material3 is reverted from Jetpack Compose Material3
1.4.0-alpha07
to1.3.1
because 1.4.0 Stable will be released only after Compose Multiplatform 1.8.0. As a workaround to continue using the new API, replace:by:implementation(compose.material3)
Jetpack Compose Material3 1.4.0 will be merged again sometime after the Compose Multiplatform 1.8.0 release #1868implementation("org.jetbrains.compose.material3:material3:1.8.0-alpha03")
Features
iOS
- Support new haptic feedback types #1831
- Support for focusable nodes when Full Keyboard Access is enabled on iOS #1825
- Floating cursor support for
BasicTextField(TextFieldState)
#1598 - Add support for Bold Text accessibility setting #1846
- Bhojpuri language support for VoiceOver #1838
- Add support for Reduce Motion accessibility setting #1847
- Default
androidx.navigation
transition animation on iOS is as close as possible to the iOS back gesture #1861 - Support accessibility text input #1875
- Support text input for UI Tests #1875
- Accessibility: added ability to traverse nodes within a scrollable container #1837
Fixes
Multiple Platforms
- Fixed the output of
TextField(TextFieldState)
(akaBasicTextField2
) transformations incorrectly leeching into the untransformed text itself, when input method is used (Chinese and other languages with multi-keystroke character input) #1833 - Fix possible
IllegalArgumentException: Object already closed
duringGraphicsLayer.record
#1839 - (prerelease fix) Change an
Esc
button interception fromonPreviewKeyEvent
toonKeyEvent
in the desktopBackGestureDispatcher
implementation. It fixes problems when user's code handles theEsc
-button #1860 - (prerelease fix) Fix a problem when an
onBack
callback is updated but listener is not #1860 - (prerelease fix) Fix memory leak in some cases of re-usage internal layout nodes #1873
- Compose runtime module now exposes its dependency on Kotlin Coroutines API (changed from
implementation()
toapi()
) #1883 - Correctly set
ScrollState.viewportSize
for (Basic)TextField(TextFieldState)
#1896
iOS
- (prerelease fix) Fixed issue where cross-directional scrolling could intercept and cancel each other #1851
- Fixed a bug where touches could be handled by back gesture and composable content at the same time #1879
Desktop
- (prerelease fix) Restore compatibility with Ubuntu 20.04 #1870
- (prerelease fix) Fix "Could not resolve version conflict" in non-Gradle projects #1872
Web
- Mobile browsers: the virtual keyboard is shown when the TextField is clicked/focues #1865
- Fix text selection with mouse in TextField #1876
Navigation
- (prerelease fix) Fix a desktop back navigation when Esc button clicked #1890
- (prerelease fix) Fix an iOS back navigation after a swipe on disallowed edge #1890
Dependencies
-
Gradle Plugin
org.jetbrains.compose
, version1.8.0-alpha04
. Based on Jetpack Compose libraries: -
Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.9.0-alpha04
. Based on Jetpack Lifecycle 2.9.0-alpha08 -
Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.9.0-alpha14
. Based on Jetpack Navigation 2.9.0-alpha07 -
Material3 Adaptive libraries
org.jetbrains.compose.material3.adaptive:adaptive*:1.1.0-alpha04
. Based on Jetpack Material3 Adaptive 1.1.0-beta01
1.8.0-alpha03
Changes since 1.8.0-alpha02
Highlights
Multiple Platforms
- Compose Multiplatform codebase is fully migrated to K2. Please note that native and web klibs can be consumed only with Kotlin 2.1.0 or newer. Also, due to underlying changes in the compiler plugin, it's better to recompile libraries against the new version. Please let us know if you find any compatibility issues during this migration
- Implement multiplatform
BackHandler
andPredictiveBackHandler
. And use them in material3 widgets and androidx-navigation library
Breaking Changes
Multiple Platforms
- IdlingResource interface was moved from commonMain to android and desktop source sets. The related experimental methods of ComposeUiTest were moved too. They are not available for Web and iOS anymore. Consider using waitUntil function as an alternative. Note: it's a breaking change only for Web and iOS, but not for Desktop and Android
iOS
Features
Multiple Platforms
- Update skia to m132
- Adopt a new
Clipboard
interface with suspend functions, which work correctly on all targets including Web. TheClipboardManager
was deprecated because it was not possible to correctly implement it for Web
iOS
- Support VoiceControl on iOS
AccessibilitySyncOptions
removed. The accessibility tree is built on demand- Calculate the order and location of semantic elements in the same way as it's done on Android
- Support
UIAccessibilityContainerTypeSemanticGroup
for traversal groups - Compose works correctly with nested
UIScrollView
s, as well as withinUIScrollView
s - Added the ability to close modal Compose view controllers (with non-scrollable content on them) with a swipe gesture
Fixes
Multiple Platforms
- Fix light source position for shadow rendering to match the Material specification and Android behavior
- Fix inconsistency between Android and Desktop in
placeWithLayer
scale application: offset is not scaled now (Android behavior) - Clear the canvas before rendering each frame in tests, to avoid drawing different frames on top of each other, resulting in incorrect images being returned by
captureToImage
iOS
- Performance issues when iOS screen reader is active fixed
- Fixed issues where the interactive pop gesture would stop working
- Fixes an issue where it's not possible to close the
UIMenu
that appears over the Compose content - Fix touches tracking for multitouch gestures
Desktop
- Elements marked with
Modifier.semantics { hideFromAccessibility() }
should now be correctly hidden from a11y - Fixed the positioning of the IME candidate popup for
TextField(TextFieldState)
(akaBasicTextField2
) - Fixed input of diacritics via long-press on macOS in
TextField(TextFieldState)
(akaBasicTextField2
) - Radio buttons and any other elements using
Modifier.selectable
withRole.RadioButton
will have their state reported to accessibility viaAccessibleValue.getCurrentAccessibleValue()
and asAccessibleState.CHECKED
ingetAccessibleStateSet()
Web
- The
BasicTextField
handles browser copy/cut/paste events correctly now. Previously, they were ignored
Dependencies
-
Gradle Plugin
org.jetbrains.compose
, version1.8.0-alpha03
. Based on Jetpack Compose libraries: -
Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.9.0-alpha03
. Based on Jetpack Lifecycle 2.9.0-alpha03 -
Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.8.0-alpha13
. Based on Jetpack Navigation 2.8.4 -
Material3 Adaptive libraries
org.jetbrains.compose.material3.adaptive:adaptive*:1.1.0-alpha03
. Based on Jetpack Material3 Adaptive 1.1.0-beta01
1.8.0-alpha02
Changes since 1.8.0-alpha01
Highlights
Resources
Features
iOS
- Accessibility navigation uses safe area to calculate when focused rect is out of bounds
- Initial Drag&Drop support
- Align Compose components semantics with UIKit views accessibility
Web
Fixes
Multiple Platforms
iOS
- Fixes an interruption while typing characters on a Chinese keyboard
- Accessibility reading of content when obscured by layers such as pop-ups and dialogs
- Taps should be properly registered on interop views with
UIKitInteropInteractionMode.Cooperative
interaction mode - Interactive pop on
UINavigationController
should recognize correctly - Enables Cupertino overscroll by default for scrollable components
- Experimental method
optOutOfCupertinoOverscroll()
removed - Fix iOS Accessibility element tree construction within merged nodes
Desktop
- Fixed rare crash when using a scrollbar for lazy grid with animated enter/exit items
- Fix possible exception during
Dialog
/Popup
creation in case ofcompose.layers.type=COMPONENT
and pointingwindowContainer
toComposePanel
itself - Fix interop initial z-order placement on Windows with
compose.interop.blending
flag (1.7.0 regression) - Fixed the background of transparent windows/dialogs on Windows becoming opaque as the window is moved
Resources
Navigation
- Fix incorrect navigation up on the root screen for non-android targets
- Fixed browser navigation integration when route paths contain special symbols
Dependencies
-
Gradle Plugin
org.jetbrains.compose
, version1.8.0-alpha02
. Based on Jetpack Compose libraries: -
Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.9.0-alpha02
. Based on Jetpack Lifecycle 2.9.0-alpha03 -
Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.8.0-alpha12
. Based on Jetpack Navigation 2.8.4 -
Material3 Adaptive libraries
org.jetbrains.compose.material3.adaptive:adaptive*:1.1.0-alpha02
. Based on Jetpack Material3 Adaptive 1.1.0-alpha07
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 <[email protected]>
1.8.0-dev1890
Changelog for 1.7.0 (#5154) Co-authored-by: Ivan Matkov <[email protected]>