Skip to content

Commit

Permalink
Merge branch 'master' into support/1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyTsvetkov committed Aug 15, 2023
2 parents 9438837 + 6d88ec2 commit 6127a29
Show file tree
Hide file tree
Showing 224 changed files with 1,316 additions and 8,727 deletions.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/performance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Performance problem
about: Create a report to help us improve
title: ''
labels: ['submitted', 'performance']
assignees: ''

---

**Describe the problem**
Explain the performance issue you're experiencing, including the following details:

- What specific issue did you encounter? (e.g. missing frames, high CPU usage, memory leaks)
- Have you noticed any patterns or specific circumstances under which the problem occurs?

**Affected platforms**
Select one of the platforms below:
- All
- Desktop
- Web (K/Wasm) - Canvas based API
- Web (K/JS) - Canvas based API
- Web (K/JS) - HTML library
- iOS
- Other

If the problem is Android-only, report it in the [Jetpack Compose tracker](https://issuetracker.google.com/issues/new?component=612128)

**Versions**
- Kotlin version:
- Compose Multiplatform version:
- OS version(s) (required for Desktop and iOS issues):
- OS architecture (x86 or arm64):
- JDK (for desktop issues):

**Sample code**
If possible, provide a small piece of code that reproduces the problem. If the code snippet is too large to paste here, please link to a Gist, a GitHub repo, or any other public code repository.

**Reproduction steps**
Please provide a detailed step-by-step guide on how to reproduce the issue you are experiencing.

**Video**
If you're reporting slow app work or missing frames, please provide a video of the problem.

**Profiling data**
Please provide any relevant profiling data that might be helpful. This could include information like FPS, memory usage, CPU time, or any other data that could provide insight into the performance issue.

**Additional information**
Provide any other details that you think might be helpful for us to understand the problem. This could include things like the system configuration, external factors, etc.
195 changes: 195 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,198 @@
# 1.5.0-beta02 (August 2023)

## Common

### Features
- [`androidx.compose.material.DropdownMenu` is available to use from common source set](https://github.com/JetBrains/compose-multiplatform-core/pull/738)
- [`androidx.compose.material3.DropdownMenu` is available to use from common source set](https://github.com/JetBrains/compose-multiplatform-core/pull/737)
- [`androidx.compose.material.AlertDialog` is available to use from common source set](https://github.com/JetBrains/compose-multiplatform-core/pull/708)
- [`androidx.compose.material3.AlertDialog` is available to use from common source set](https://github.com/JetBrains/compose-multiplatform-core/pull/710)
- [Add `PopupProperties.clippingEnabled` setting](https://github.com/JetBrains/compose-multiplatform-core/pull/740)
- material3. Support [`DatePicker`](https://github.com/JetBrains/compose-multiplatform-core/pull/717), [`DatePickerDialog`](https://github.com/JetBrains/compose-multiplatform-core/pull/745) and `TimePicker`

### API Changes
- [Change the default layout behavior of `AlertDialog`](https://github.com/JetBrains/compose-multiplatform-core/pull/708)

## iOS

### Features
- [Support singleLine and `KeyboardAction`](https://github.com/JetBrains/compose-multiplatform-core/pull/699)

### Fixes
- [Fix memory leak in `ComposeUIViewController`](https://github.com/JetBrains/compose-multiplatform/issues/3201)
- [Manage Kotlin native cache kind automatically based on Kotlin version](https://github.com/JetBrains/compose-multiplatform/pull/3477) (`kotlin.native.cacheKind=none` is no longer needed)
- [Limit max `Dialog` and `Popup` size by safe area on iOS](https://github.com/JetBrains/compose-multiplatform-core/pull/732)
- [`TextField`, Korean characters are not normally entered](https://github.com/JetBrains/compose-multiplatform/issues/3101)
- [`ColorMatrix` value range for 5th column was incorrect on Skiko backed platforms](https://github.com/JetBrains/compose-multiplatform/issues/3461)
- [`isSystemDarkTheme` now automatically react to the system theme changes](https://github.com/JetBrains/compose-multiplatform-core/pull/715)

### API Changes
- [`ComposeUIViewController`. Dispose composition on `viewDidDisappear`](https://github.com/JetBrains/compose-multiplatform-core/pull/747)

## Web

### Features
- [Make `CanvasBasedWindow` apply default styles, set title](https://github.com/JetBrains/compose-multiplatform-core/pull/722)

## Gradle Plugin

### Features
- [Add `runtimeSaveable` to Dependencies in compose gradle plugin](https://github.com/JetBrains/compose-multiplatform/pull/3449)

### API Changes
- [Raise error when Homebrew JDK is used for packaging](https://github.com/JetBrains/compose-multiplatform/pull/3451/files)

## Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

- [Compiler 1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-compiler#1.5.0)
- [Runtime 1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.5.0)
- [UI 1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0)
- [Foundation 1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.5.0)
- [Material 1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.5.0)
- [Material3 1.1.1](https://developer.android.com/jetpack/androidx/releases/compose-material3#1.1.1)

# 1.5.0-beta01 (July 2023)

## Common

### Features
- [`Dialog` API is available to use from common source set](https://github.com/JetBrains/compose-multiplatform-core/pull/632)
- [`Popup` API is available to use from common source set](https://github.com/JetBrains/compose-multiplatform-core/pull/611)
- [`WindowInsets` API is available to use from common source set](https://github.com/JetBrains/compose-multiplatform-core/pull/586)
- [A warning if `compose.kotlinCompilerPlugin` is set to `androidx.compose.compiler.compiler`](https://github.com/JetBrains/compose-multiplatform/pull/3313)

### Fixes
- [`Popup`. Fix overriding `pressOwner` on multitouch](https://github.com/JetBrains/compose-multiplatform-core/pull/704)
- [Fix sending multiple touches in tests](https://github.com/JetBrains/compose-multiplatform-core/pull/688)
- [Fix multi-owner input processing](https://github.com/JetBrains/compose-multiplatform-core/pull/634)
- [Fix paragraph word boundary unicode handling](https://github.com/JetBrains/compose-multiplatform-core/pull/541)
- [Optimize the `Canvas` transformation functions](https://github.com/JetBrains/skiko/pull/724)
- [Fix click outside of common `Dialog` behaviour](https://github.com/JetBrains/compose-multiplatform-core/pull/707)

## iOS

### Features
- [iOS native scroll and feel](https://github.com/JetBrains/compose-multiplatform-core/pull/609)
- [Simplify resource management](https://github.com/JetBrains/compose-multiplatform/pull/3340) (works without CocoaPods now)
- [`TextField` keyboardOptions, capitalization](https://github.com/JetBrains/compose-multiplatform/issues/2735)
- [`TextField`, keyboard behavior when have fullscreen size TextField](https://github.com/JetBrains/compose-multiplatform/issues/2752)
- [`TextField`, different behavior strategies on appearing the keyboard](https://github.com/JetBrains/compose-multiplatform/issues/3128)
- [Insets on iOS](https://github.com/JetBrains/compose-multiplatform-core/pull/577)
- [Support `Density.textSize` (Dynamic Type)](https://github.com/JetBrains/compose-multiplatform/issues/2567)
- [Change default fonts](https://github.com/JetBrains/compose-multiplatform-core/pull/552) (San Francisco is the default font)
- [UIKit public `LocalUIViewController`](https://github.com/JetBrains/compose-multiplatform-core/pull/501)

### Fixes
- [Fix dynamic framework support](https://github.com/JetBrains/skiko/pull/763)
- [Fix `TextField` context menu](https://github.com/JetBrains/compose-multiplatform/issues/3276)
- [Fix complex blending on iOS](https://github.com/JetBrains/skiko/pull/728)
- [`ViewConfiguration.touchSlop` value is quite low on iOS](https://github.com/JetBrains/compose-multiplatform/issues/3397)
- [Fix `topLeftOffset` calculation on iOS in Split View](https://github.com/JetBrains/compose-multiplatform-core/pull/678)
- [`Modifier.draggable` `onDragStopped` not called](https://github.com/JetBrains/compose-multiplatform/issues/3310)
- [`UIKitView`. Fix lifetime discrepancy within the composition](https://github.com/JetBrains/compose-multiplatform-core/pull/576/files)
- [Support 120hz screens](https://github.com/JetBrains/compose-multiplatform-ios-android-template/pull/17)
- [Fix incorrect Skiko render target on iOS Metal](https://github.com/JetBrains/compose-multiplatform-core/pull/554)
- [Properly detect content based text direction on native](https://github.com/JetBrains/compose-multiplatform-core/pull/514)
- Implemented all low-level functions to avoid random crashes
- [Implement `TreeSet`](https://github.com/JetBrains/compose-multiplatform/issues/2878)
- [Implement `AnnotatedString.transform`](https://github.com/JetBrains/compose-multiplatform-core/pull/523)
- [Implement `WeakHashMap`](https://github.com/JetBrains/compose-multiplatform/issues/2877)
- [Implement `typefacesCache`](https://github.com/JetBrains/compose-multiplatform/issues/2873)
- [Implement `ExpireAfterAccessCache`](https://github.com/JetBrains/compose-multiplatform/issues/2871)
- [Implement `NativeStringDelegate`](https://github.com/JetBrains/compose-multiplatform/issues/2876)

### API Changes
- Resource management was reimplemented. Follow [the guide in the PR](https://github.com/JetBrains/compose-multiplatform/pull/3340) to support new feautures

## Desktop

### Features
- [Swing interop. Experimental off-screen rendering on graphics](https://github.com/JetBrains/compose-multiplatform-core/pull/601) (hardware accelerated only on macOs at the moment)
- [Swing interop. `ComposePanel` that can be disposed manually](https://github.com/JetBrains/compose-multiplatform-core/pull/620)
- [Add semantic properties to `DialogWindow`, `Popup` and `Dialog`](https://github.com/JetBrains/compose-multiplatform-core/pull/698)
- [Use `Segoe UI` as sans serif font on Windows](https://github.com/JetBrains/compose-multiplatform-core/pull/557)
- [Add ProGuard optimize flag](https://github.com/JetBrains/compose-multiplatform/pull/3408)

### Fixes
- [Fix loosing frames on macOs](https://github.com/JetBrains/skiko/pull/753)
- [Scrolling `LazyColumn` via mouse wheel stops working](https://github.com/JetBrains/compose-multiplatform/issues/3366)
- [`Slider` can be moved using keyboard, but cannot be submitted](https://github.com/JetBrains/compose-multiplatform/issues/2798)
- [Make one pixel beyond the scrollbar thumb react correctly to clicks](https://github.com/JetBrains/compose-multiplatform-core/pull/505)
- [`VerticalScrollbar` doesn't work properly when `LazyColumn` exists `StickyHeader`](https://github.com/JetBrains/compose-multiplatform/issues/2940)
- [All `Popup` overloads call dismiss on `Esc` key by default](https://github.com/JetBrains/compose-multiplatform-core/pull/712)
- [Fix Could not infer Java runtime version for Java home directory](https://github.com/JetBrains/compose-multiplatform/issues/3133)
- [Usage of deprecated `forEachGesture` in `Scrollbar.desktop.kt`](https://github.com/JetBrains/compose-multiplatform/issues/3045)
- Test framework fixes
- [Implement idling resources for tests](https://github.com/JetBrains/compose-multiplatform-core/pull/599)
- [Implement `SemanticsNodeInteraction.captureToImage()`](https://github.com/JetBrains/compose-multiplatform-core/pull/589)
- [Wait until compose is idle before returning from `DesktopTestOwner.getRoots()`](https://github.com/JetBrains/compose-multiplatform-core/pull/588)
- [When the test main clock is advanced, call `ComposeScene.render` with the current test time](https://github.com/JetBrains/compose-multiplatform-core/pull/584)
- [Add timestamps to batched test input events, and advance the test clock accordingly when sending them](https://github.com/JetBrains/compose-multiplatform-core/pull/578)
- [Tests support semanatic nodes inside `Window` and `DialogWindow`](https://github.com/JetBrains/compose-multiplatform-core/pull/697)

### API Changes
- [Rename desktop's `Dialog` to `DialogWindow`](https://github.com/JetBrains/compose-multiplatform-core/pull/661)

## Web

### Features
- [Let `ComposeWindow` accept a custom canvas id (html canvas element id)](https://github.com/JetBrains/compose-multiplatform-core/pull/626)
- [Support `Scrollbar`](https://github.com/JetBrains/compose-multiplatform-core/pull/571)

### Fixes
- [Workaround `ComposeWindow` multiple event listeners on resize](https://github.com/JetBrains/compose-multiplatform-core/pull/692)
- [Fix `Modifier.pointerHoverIcon` for browser apps](https://github.com/JetBrains/compose-multiplatform-core/pull/629)
- [Fux `RoundedCornerShape` with zero corners](https://github.com/JetBrains/compose-multiplatform/issues/3013)
- [Fix `ScrollConfig` in web target](https://github.com/JetBrains/compose-multiplatform-core/pull/628)
- Implemented low-level functions to avoid random crashes:
- [Implement cache key in `PlatformFont`](https://github.com/JetBrains/compose-multiplatform-core/pull/671)
- [implement platform detection to apply correct `KeyMapping` and `FontFamiliesMapping`](https://github.com/JetBrains/compose-multiplatform-core/pull/637)
- [Implement `PlatformLocale` and `StringDelegate` for k/wasm](https://github.com/JetBrains/compose-multiplatform-core/pull/625)
- [Add missing `getAndIncrement` in `AtomicLong` implementation for web](https://github.com/JetBrains/compose-multiplatform-core/pull/570)

## HTML library

### Features
- [Make HTML `TestUtils` wait functions cancellable](https://github.com/JetBrains/compose-multiplatform/pull/3320)

## Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

- [Compiler 1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-compiler#1.5.0)
- [Runtime 1.5.0-beta03](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.5.0-beta03)
- [UI 1.5.0-beta03](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0-beta03)
- [Foundation 1.5.0-beta03](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.5.0-beta03)
- [Material 1.5.0-beta03](https://developer.android.com/jetpack/androidx/releases/compose-material#1.5.0-beta03)
- [Material3 1.1.1](https://developer.android.com/jetpack/androidx/releases/compose-material3#1.1.1)

# 1.4.3 (July 2023)

## Common

### Features
- Support Kotlin 1.8.21, 1.8.22, 1.9.0

## iOS

### Fixes
- [Using Indication as a parameter in extension function doesn't compile on iOS](https://github.com/JetBrains/compose-multiplatform/issues/3086)
- [Compile error when using delegated property with @Composable getters in objects](https://github.com/JetBrains/compose-multiplatform/issues/3216)
- [Using a public property extensions inside a class or object with a @Composable backing delegate fails to link for iOS targets](https://github.com/JetBrains/compose-multiplatform/issues/3084)

## Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

- [Compiler 1.4.4](https://developer.android.com/jetpack/androidx/releases/compose-compiler#1.4.4)
- [Runtime 1.4.3](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.4.3)
- [UI 1.4.3](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.3)
- [Foundation 1.4.3](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.4.3)
- [Material 1.4.3](https://developer.android.com/jetpack/androidx/releases/compose-material#1.4.3)
- [Material3 1.0.1](https://developer.android.com/jetpack/androidx/releases/compose-material3#1.0.1)

# 1.4.1 (June 2023)

## Common
Expand Down
4 changes: 3 additions & 1 deletion VERSIONING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ Kotlin version | Minimal Compose version | Notes
1.8.0 | 1.3.0 | 1.3.0 is not supported by earlier k/native versions
1.8.10 | 1.3.1
1.8.20 | 1.4.0
1.8.20 | 1.4.1
1.8.21 | 1.4.3
1.8.22 | 1.4.3
1.9.0 | 1.4.3

### Using the latest Kotlin version

Expand Down
2 changes: 1 addition & 1 deletion ci/compose-uber-jar/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
compose.version=1.4.1
compose.version=1.4.3
kotlin.code.style=official
4 changes: 2 additions & 2 deletions ci/templates/desktop-template/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
kotlin.code.style=official
kotlin.version=1.8.20
compose.version=1.4.1
kotlin.version=1.9.0
compose.version=1.4.3
4 changes: 2 additions & 2 deletions ci/templates/html-library-template/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
kotlin.code.style=official
kotlin.version=1.8.20
compose.version=1.4.1
kotlin.version=1.9.0
compose.version=1.4.3
4 changes: 2 additions & 2 deletions ci/templates/multiplatform-template/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
kotlin.version=1.8.20
kotlin.version=1.9.0
agp.version=7.1.3
compose.version=1.4.1
compose.version=1.4.3
2 changes: 1 addition & 1 deletion components/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
# __KOTLIN_COMPOSE_VERSION__
kotlin.version=1.9.0
kotlin.version=1.8.22
# __LATEST_COMPOSE_RELEASE_VERSION__
compose.version=1.5.0-dev1112
agp.version=7.3.1
Expand Down
2 changes: 1 addition & 1 deletion components/resources/library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ kotlin {
dependsOn(jvmAndAndroidMain)
dependsOn(commonButJSMain)
}
val androidUnitTest by getting {
val androidTest by getting {
dependencies {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.jetbrains.compose.resources

import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.addressOf
import kotlinx.cinterop.usePinned
import platform.Foundation.NSBundle
Expand All @@ -18,7 +17,6 @@ actual fun resource(path: String): Resource = UIKitResourceImpl(path)

@ExperimentalResourceApi
private class UIKitResourceImpl(path: String) : AbstractResourceImpl(path) {
@OptIn(ExperimentalForeignApi::class)
override suspend fun readBytes(): ByteArray {
val fileManager = NSFileManager.defaultManager()
// todo: support fallback path at bundle root?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.jetbrains.compose.resources

import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.addressOf
import kotlinx.cinterop.usePinned
import platform.Foundation.NSData
Expand All @@ -17,7 +16,6 @@ actual fun resource(path: String): Resource = MacOSResourceImpl(path)

@ExperimentalResourceApi
private class MacOSResourceImpl(path: String) : AbstractResourceImpl(path) {
@OptIn(ExperimentalForeignApi::class)
override suspend fun readBytes(): ByteArray {
val currentDirectoryPath = NSFileManager.defaultManager().currentDirectoryPath
val contentsAtPath: NSData? = NSFileManager.defaultManager().run {
Expand Down
6 changes: 6 additions & 0 deletions compose/integrations/composable-test-cases/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile

group "com.example"
Expand All @@ -8,6 +9,7 @@ allprojects {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/") // to test with kotlin dev builds
// mavenLocal()
}

Expand All @@ -28,6 +30,10 @@ allprojects {
"-Xklib-enable-signature-clash-checks=false",
)
}

tasks.withType<KotlinCompile<*>>().configureEach {
kotlinOptions.freeCompilerArgs += "-Xpartial-linkage=disable"
}
}
disableYarnLockMismatchReport()
}
Expand Down
6 changes: 3 additions & 3 deletions compose/integrations/composable-test-cases/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx2048M -XX:MaxMetaspaceSize=512m
kotlin.code.style=official
kotlin.native.enableDependencyPropagation=false
android.useAndroidX=true
kotlin.version=1.8.20
kotlin.version=1.9.0
agp.version=7.3.0
compose.version=1.5.0-dev1063
compose.version=1.5.0-beta01
kotlin.native.cacheKind=none

#empty by default - a default version will be used
compose.kotlinCompilerPluginVersion=1.4.2
compose.kotlinCompilerPluginVersion=1.5.0

# default|failingJs - see enum class CasesToRun
tests.casesToRun=default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ if (casesToRun.isDefault()) {

module(":testcase-lambdas-lib", "testcases/lambdas/lib")
module(":testcase-lambdas-main", "testcases/lambdas/main")

module(":testcase-expectActual-lib", "testcases/expectActual/lib")
module(":testcase-expectActual-main", "testcases/expectActual/main")
}

/**
Expand Down
Loading

0 comments on commit 6127a29

Please sign in to comment.