github JetBrains/compose-multiplatform v1.9.0-alpha02
1.9.0-alpha02

latest releases: v1.9.0+dev2908, v1.9.0+dev2893, v1.10.0+dev2904...
pre-release3 months ago

Changes since 1.8.1

Known issues

Desktop

  • Could not find org.jetbrains.androidx.window:window-core-desktop:1.4.0-alpha07 when using material-adaptive or material3-adaptive-navigation-suite. YouTrack issue. Workaround is to exclude one dependency and include another:
    // if you have material3AdaptiveNavigationSuite dependency
    implementation(compose.material3AdaptiveNavigationSuite) {
        exclude(group = "org.jetbrains.androidx.window")
    }

    // if you have org.jetbrains.compose.material3.adaptive dependency
    implementation("org.jetbrains.compose.material3.adaptive:adaptive:1.2.0-alpha02") {
        exclude(group = "org.jetbrains.androidx.window")
    }

    implementation("androidx.window:window-core-jvm:1.4.0")

Highlights

Multiple Platforms

  • material3 library now includes new experimental MaterialExpressiveTheme #2127

Migration Notes

Gradle Plugin

  • The Compose Gradle plugin requires the Kotlin Gradle plugin version 2.+ now. Old org.jetbrains.compose.compiler is not supported anymore and the API to configure it was removed #5283

Features

Multiple Platforms

  • Adopted a change in ComposeUiTest API. The block in runComposeUiTest is suspend now. It allows to call awaitIdle and other suspend functions. It ensures a correct execution of a test on all platforms. See the web specifics in kotlinx.coroutines.test.runTest documentation #2066

iOS

  • Add support for native IME configuration with PlatformImeOptions #2108

Desktop

  • Add accessibility role for Switch, reporting it as a checkbox #2136

Fixes

Multiple Platforms

  • Fixed TextField(TextFieldValue) when used with a visual transformation with a non-identity offset mapping (potentially even crashing) #2117
  • Fixed a memory leak and performance degradation when ComposeUiFlags.isRectTrackingEnabled set to true (default) #2112
  • Support Preview parameters for Previews in common source sets in IJ and AS. Note: IDEs also need to implement support on their end. Please check the respective IDE release notes to confirm this is supported #5319
    Example usage:
    import androidx.compose.runtime.Composable
    import org.jetbrains.compose.ui.tooling.preview.Preview
    import org.jetbrains.compose.ui.tooling.preview.PreviewParameter
    import org.jetbrains.compose.ui.tooling.preview.PreviewParameterProvider
    
    class MyPreviewParameterProvider : PreviewParameterProvider<String> {
      override val values = sequenceOf("Hello, Compose!", "Hello, World!")
    }
    
    /**
     * This function will generate two preview images with different texts
     */
    @Preview
    @Composable
    fun MyPreview(@PreviewParameter(MyPreviewParameterProvider::class) text: String) {
      Text(text)
    }

iOS

  • Fix issue where keyboard would appear after second tap when text input session was intercepted #2049

Desktop

  • [macOS] Fix the background flashing when closing a window/dialog and an animation is running #2058
  • [macOS; JBR] Fixed the current composition in a text field being duplicated into another text field when switching focus to it #2026
  • [macOS] Fixed strange glyph being displayed in a text field if window becomes unfocused, then focused again while there's an active composition in the text field (after pressing e.g. backspace) #2026
  • [macOS] Fix showing the input method toolbar before any text field becomes focused (on JBR only; other runtimes continue to be buggy) #2047
  • Improved performance for ComposePanel with System.setProperty("compose.swing.render.on.graphics", "true") #2097
  • Fix the positioning of the IME popup being too far away from the text, on screens with density greater than 1 #2118
  • Fixed the position of the IME popup, which was below the previous, rather than the current, cursor position #2122

Dependencies

Don't miss a new compose-multiplatform release

NewReleases is sending notifications on new releases.