Compose Multiplatform 1.5.0 shines on dialogs, popups, iOS

JetBrains’ declarative UI framework for Kotlin lets developers build UIs for desktop, Android, iOS, and web from a single code base.

Passenger view of an airplane wing above the clouds. / travel / journey / transportation
Stéphan Valentin (CC0)

JetBrains has released Compose Multiplatform 1.5.0, an update to the declarative UI framework for the Kotlin programming language that introduces iOS improvements and common code APIs for dialogs, popups, and WindowInsets.

Compose Multiplatform 1.5.0 was released August 27. Dialogs are used for modal events, with the user choosing or entering data. Popups are for non-modal behavior, such as providing optional functionality. The base types Dialog and Popup, along with DropdownMenu and AlertDialog, are accessible from common code, thus avoiding the need to provide platform-specific functionality.

The WindowInsets API describes how much adjustment is needed to prevent content from overlapping with the system UI; this API can be used on both Android and iOS mobile platforms. Developers can use the WindowInsets API to draw background content behind the notch.

Compose Multiplatform 1.5.0 is based on version 1.5 of Jetpack Compose, Google’s toolkit for building native Android UIs. Compose Multiplatform also builds on version 1.1 of Google’s Material Design 3 open source design system, which introduced new components such as bottom sheets and time pickers.

Compose Multiplatform takes the Jetpack Compose UI framework and extends it beyond Android to desktop, iOS, and the web. The desktop version is stable, iOS is alpha, and web is experimental. Developers can access Compose Multiplatform 1.5.0 from GitHub.

Compose Multiplatform 1.5.0 ushers in a number of improvements for iOS. Scrolling now mimics the platform’s look and feel, resource management has been simplified, and text handling enhanced. The Dynamic Type feature on iOS allows a user to set their preferred font size, be it larger for ease of viewing or smaller to allow more content to fit. Text sizing is used within an app and should be relative to this system setting.

Also for iOS, frame rates of up to 120 frames per second now are supported; the previous limit was 60 frames per second, which could result in the UI being slow on devices with 120Hz screens.

Finally, Compose Multiplatform 1.5.0 stabilizes support for testing on Compose for desktop. Previous limitations have been lifted, allowing developers to write comprehensive UI tests for an application. And experimental support has been introduced for improved rendering of compose panels inside Swing components. This prevents transitional rendering issues when panels are being shown, resized, or hidden.

Copyright © 2023 IDG Communications, Inc.