Skip to content

Commit

Permalink
Compose Multiplatform 1.4.0 docs (#3044)
Browse files Browse the repository at this point in the history
  • Loading branch information
igordmn committed Jun 23, 2023
1 parent 8a65d77 commit 343e85f
Show file tree
Hide file tree
Showing 205 changed files with 850 additions and 750 deletions.
92 changes: 92 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,95 @@
# 1.4.0 (April 2023)

## Common

- [Added support for Kotlin `1.8.20`](https://github.com/JetBrains/compose-multiplatform/pull/3000)

### Features

- [Support perspective projection and `cameraDistance` parameter in `graphicsLayer`](https://github.com/JetBrains/compose-multiplatform-core/pull/422)
- [Support `brush` parameter in `TextStyle` for complex coloring](https://github.com/JetBrains/compose-multiplatform/issues/2814)
- [Support `drawStyle` parameter in `TextStyle` for drawing outlined text](https://github.com/JetBrains/compose-multiplatform-core/pull/470)
- [Support `blendMode` parameter when drawing text on Canvas](https://github.com/JetBrains/compose-multiplatform-core/pull/470)
- [Support compositing strategy on `graphicsLayer`](https://github.com/JetBrains/compose-multiplatform-core/pull/486)
- [Add `minLines` parameter to `BasicTextField`](https://github.com/JetBrains/compose-multiplatform-core/pull/469)
- [Support `painterResource` function in common source set](https://github.com/JetBrains/compose-multiplatform/pull/2793)

### Fixes

- [Actually remember provider in `rememberComponentRectPositionProvider`](https://github.com/JetBrains/compose-multiplatform-core/pull/444)
- [Fix merging multiple selection areas inside `SelectionContainer`](https://github.com/JetBrains/compose-multiplatform/issues/2899)
- [Fix crash on selecting text if layout result is invalid](https://github.com/JetBrains/compose-multiplatform-core/pull/482)
- [Fix error on call an `expect`/`actual` function with default arguments and a Composable argument](https://github.com/JetBrains/compose-multiplatform/issues/2806)

## iOS

[iOS support is in Alpha now](README.md#ios)

## Desktop

### Features

- [Support external drag and drop](https://github.com/JetBrains/compose-multiplatform-core/pull/391)
- [Animate scroll initiated by mouse wheel input](https://github.com/JetBrains/compose-multiplatform-core/pull/438)
- [Remove AWT dependency in `rememberCursorPositionProvider`](https://github.com/JetBrains/compose-multiplatform-core/pull/432)
- Major scrollbar overhaul
- [Scrollbar now works correctly in lazy lists when items vary in size](https://github.com/JetBrains/compose-multiplatform/issues/2679)
- [Scrollbar now works correctly with lazy list `contentPadding`](https://github.com/JetBrains/compose-multiplatform/issues/2604)
- [Scrollbar now works correctly in lazy list with spacing between items](https://github.com/JetBrains/compose-multiplatform-core/pull/380)
- [Scrollbar now works correctly if the size of the scrollbar doesn't match the size of the widget it scrolls](https://github.com/JetBrains/compose-multiplatform-core/pull/368)
- [Pressing the scrollbar track now works correctly](https://github.com/JetBrains/compose-multiplatform-core/pull/409)
- [Added scrollbar support for lazy grids and text fields](https://github.com/JetBrains/compose-multiplatform/issues/1575)

### Fixes

- [Fix using a custom shape for an `AlertDialog`](https://github.com/JetBrains/compose-multiplatform/issues/1269)
- [Fix `AlertDialog` width to match the maximum of its content](https://github.com/JetBrains/compose-multiplatform/issues/2836)
- [Change `ContextMenuArea` to emit a single element, rather than two elements](https://github.com/JetBrains/compose-multiplatform/issues/2729)
- [Use state hoisting instead of global mouse position to determine where context menus, dropdown menus and tooltips should be displayed](https://github.com/JetBrains/compose-multiplatform-core/pull/437)
- [Limit error dialog width in case of long error message](https://github.com/JetBrains/compose-multiplatform-core/pull/441)
- [Fix window flashing background with unspecified size](https://github.com/JetBrains/compose-multiplatform-core/pull/442)
- [Fix crash `SplitPane` with a modifier](https://github.com/JetBrains/compose-multiplatform/issues/2214)
- [Fix applying `ComposePanel` visibility](https://github.com/JetBrains/compose-multiplatform/issues/2656)

## Web

- [`Compose for Web` is renamed to `Compose HTML Library`](https://github.com/JetBrains/compose-multiplatform/pull/2997)
- [The new experimental `Compose for Web` based on Kotlin/Wasm is available](README.md#web)

## Tools

- [Packaging native distributions now requires at least JDK 17](https://github.com/JetBrains/compose-multiplatform/blob/master/tutorials/Native_distributions_and_local_execution/README.md#customizing-jdk-version)

### Features

- [Provide relative path to jpackage --main-jar](https://github.com/JetBrains/compose-multiplatform/issues/1578)
- [Provide some entitlements on macOS by default](https://github.com/JetBrains/compose-multiplatform/pull/2974)


### Fixes

- [Unzip wix to build directory](https://github.com/JetBrains/compose-multiplatform/issues/2804)

## API Changes

- [Remove deprecated `SkiaRootForTest.processPointerInput`](https://github.com/JetBrains/compose-multiplatform-core/pull/456)
- [Remove deprecated `PointerEvent.awtEvent`, `KeyEvent.awtEvent`](https://github.com/JetBrains/compose-multiplatform-core/pull/456)
- [Make accidentally exposed to public `ParagraphLayouter` class `internal` as designed](https://github.com/JetBrains/compose-multiplatform-core/pull/426)
- [`androidx.compose.foundation.v2.ScrollbarAdapter` is introduced in order to allow scrollbars of a size different from the scrolled widget](https://github.com/JetBrains/compose-multiplatform-core/pull/368)

## 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.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.4.0)
- [UI 1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)
- [Foundation 1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.4.0)
- [Material 1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.4.0)
- [Material3 1.0.1](https://developer.android.com/jetpack/androidx/releases/compose-material3#1.0.1)

___

# 1.3.1 (March 2023)

## Common
Expand Down
156 changes: 75 additions & 81 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,85 +2,79 @@
[![Latest release](https://img.shields.io/github/v/release/JetBrains/compose-multiplatform?color=brightgreen&label=latest%20release)](https://github.com/JetBrains/compose-multiplatform/releases/latest)
[![Latest build](https://img.shields.io/github/v/release/JetBrains/compose-multiplatform?color=orange&include_prereleases&label=latest%20build)](https://github.com/JetBrains/compose-multiplatform/releases)

# Compose Multiplatform, by JetBrains
![](artwork/readme/apps.png)
Compose Kotlin UI framework port for desktop platforms (macOS, Linux, Windows) and Web, components outside of the core [Compose repository](https://android.googlesource.com/platform/frameworks/support).

Preview functionality (check your application UI without building/running it) for desktop platforms is available via [IDEA plugin](https://plugins.jetbrains.com/plugin/16541-compose-multiplatform-ide-support).

## Tutorials
### Compose for Desktop
* [Getting started](tutorials/Getting_Started)
* [Image and icon manipulations](tutorials/Image_And_Icons_Manipulations)
* [Mouse events and hover](tutorials/Mouse_Events)
* [Scrolling and scrollbars](tutorials/Desktop_Components#scrollbars)
* [Tooltips](tutorials/Desktop_Components#tooltips)
* [Context Menu](tutorials/Context_Menu/README.md)
* [Top level windows management](tutorials/Window_API_new)
* [Menu, tray, notifications](tutorials/Tray_Notifications_MenuBar_new)
* [Keyboard support](tutorials/Keyboard)
* [Tab focus navigation](tutorials/Tab_Navigation)
* [Swing interoperability](tutorials/Swing_Integration)
* [Navigation](tutorials/Navigation)
* [Accessibility](https://github.com/JetBrains/compose-multiplatform/tree/master/tutorials/Accessibility)
* [Building a native distribution](tutorials/Native_distributions_and_local_execution)

Also, see [Foundation](https://developer.android.com/jetpack/compose/documentation#core) and [Design](https://developer.android.com/jetpack/compose/documentation#design) docs from Google. They were originally written for Android, but most of information applies to Compose for Desktop as well.

### Compose for Web HTML
* [Getting started](tutorials/Web/Getting_Started)
* [Building web UI](tutorials/Web/Building_UI)
* [Handling Events](tutorials/Web/Events_Handling)
* [Controlled and Uncontrolled inputs](tutorials/Web/Controlled_Uncontrolled_Inputs)
* [Style DSL](tutorials/Web/Style_Dsl)
* [Using test-utils](tutorials/Web/Using_Test_Utils)

### Jetpack Compose for Android
Compose Multiplatform uses Jetpack Compose developed by Google when you target Android platform. See more info about it [here](tutorials/Development_for_Android).

[The docs](https://developer.android.com/jetpack/compose/documentation) published by Google are great and describe how to develop on Compose for Android.

Note that when you use Compose Multiplatform, you setup your project differently. You can create a multiplatform project with Android support via IDEA Project Wizard, or by copying [multiplatform template](https://github.com/JetBrains/compose-multiplatform/tree/master/templates/multiplatform-template). In `androidMain` source set you can use almost all information from the docs, and in `commonMain` source set you can use information from Foundation and Design sections.

### Experimental targets
The other targets (iOS, Compose for Web Canvas) are experimental and under development. Use them at your own risk.

## Examples
* [codeviewer](examples/codeviewer) - File Browser and Code Viewer application for Android and Desktop
* [imageviewer](examples/imageviewer) - Image Viewer application for Android and Desktop
* [issues](examples/issues) - GitHub issue tracker with an adaptive UI and ktor-client
* [Falling Balls](examples/falling-balls) - Simple game
* [notepad](examples/notepad) - Notepad, using the new experimental Composable Window API
* [todoapp](examples/todoapp) - TODO items tracker with persistence and multiple screens, written with external navigation library
* [todoapp-lite](examples/todoapp-lite) - A simplified version of [todoapp](examples/todoapp), fully based on Compose
* [widgets gallery](examples/widgets-gallery) - Gallery of standard widgets
* [IDEA plugin](examples/intellij-plugin) - Plugin for IDEA using Compose for Desktop
* [compose-bird](examples/web-compose-bird) - A flappy bird clone using Compose for Web
* [web-landing](examples/web-landing) - A landing page built using Compose for Web (HTML composable api)
* [compose-web-with-react](examples/web-with-react) - Using compose-in-react and react-in-compose
* [compose-web-in-js](examples/web-compose-in-js) - Using Html based composables in js

## Other ##
* [artwork](artwork) - design artifacts
* [benchmarks](benchmarks) - collection of benchmarks
* [compose](compose) - composite build of [Compose Multiplatform sources](https://github.com/JetBrains/androidx)
* [ci](ci) - Continuous Integration helpers
* [gradle-plugins](gradle-plugins) - a plugin, simplifying usage of Compose Multiplatform with Gradle
* [templates](templates) - new application templates
* [components](components) - custom components of Compose Multiplatform
* [Split Pane](components/SplitPane)
* [experimental](experimental) - experimental components and examples
* [Compose Multiplatform template project](https://github.com/JetBrains/compose-multiplatform-template)
that includes experimental iOS target
* [examples](experimental/examples) - examples that use new experimental functionality
* [cef](experimental/cef) - CEF integration in Jetpack Compose (somewhat outdated)
* [Video Player](experimental/components/VideoPlayer)
* [LWJGL integration](experimental/lwjgl-integration) - An example showing how to integrate Compose with [LWJGL](https://www.lwjgl.org)
* [CLI example](experimental/build_from_cli) - An example showing how to build Compose without Gradle

## Versions ##

* [The latest stable release](https://github.com/JetBrains/compose-multiplatform/releases/latest)
* [The latest dev release](https://github.com/JetBrains/compose-multiplatform/releases)
* [Compatibility and versioning overview](VERSIONING.md)


# Compose Multiplatform

**Compose Multiplatform** is a declarative framework for sharing UIs across multiple platforms with Kotlin.
It is based on [Jetpack Compose](https://developer.android.com/jetpack/compose) and developed by [JetBrains](https://www.jetbrains.com/) and open-source contributors.

You can choose the platforms across which to share your UIs using Compose Multiplatform:

* [iOS](https://github.com/JetBrains/compose-multiplatform-ios-android-template/#readme) (Alpha)
* [Android](https://developer.android.com/jetpack/compose) (via Jetpack Compose)
* [Desktop](https://github.com/JetBrains/compose-multiplatform-desktop-template/#readme) (Windows, MacOS, Linux)
* [Web](https://kotl.in/wasm-compose-example) (Experimental)

For example, you can share UIs between iOS and Android or Windows and MacOS.

![Shared UIs of the iOS, Android, desktop, and web apps](artwork/readme/apps.png)

## iOS

> iOS support is in Alpha. It may change incompatibly and require manual migration in the future.
> We would appreciate your feedback on it in the public Slack channel [#compose-ios](https://kotlinlang.slack.com/archives/C0346LWVBJ4/p1678888063176359).
> If you face any issues, please report them on [GitHub](https://github.com/JetBrains/compose-multiplatform/issues).
Compose Multiplatform shares most of its API with Jetpack Compose, the Android UI framework developed by Google.
You can use the same APIs to build user interfaces for both Android and iOS.

Since Compose is built on top of [Kotlin Multiplatform](https://kotlinlang.org/lp/multiplatform/),
you can easily access native APIs, such as the [Camera API](https://developer.apple.com/documentation/avfoundation/capture_setup/avcam_building_a_camera_app),
and embed complex native UI views, such as [MKMapView](https://developer.apple.com/documentation/mapkit/mkmapview).

**[Get started with Compose for iOS](https://github.com/JetBrains/compose-multiplatform-ios-android-template#readme)**

## Android

When Android is one of your targets, you can get the same experience for Android as if you were developing an Android app
using [Jetpack Compose](https://developer.android.com/jetpack/compose).

## Desktop

Compose Multiplatform targets the JVM and supports high-performance hardware-accelerated UI rendering on all major desktop
platforms – macOS, Windows, and Linux.

It has desktop extensions for menus, keyboard shortcuts, window manipulation, and notification management.

**[Get started with Compose for Desktop](https://github.com/JetBrains/compose-multiplatform-desktop-template#readme)**

## Web

> Web support is Experimental and may be changed at any time. Use it only for evaluation purposes.
> We would appreciate your feedback on it in the public Slack channel [#compose-web](https://kotlinlang.slack.com/archives/C01F2HV7868/p1678887590205449).
> If you face any issues, please report them on [GitHub](https://github.com/JetBrains/compose-multiplatform/issues).
You can experiment with sharing your mobile or desktop UIs with the web. Compose for Web is based on [Kotlin/Wasm](https://kotl.in/wasm),
the newest target for Kotlin Multiplatform projects. It allows Kotlin developers to run their code in the browser with
all the benefits that WebAssembly has to offer, such as good and predictable performance for your applications.

**[Get started with Compose for Web](https://kotl.in/wasm-compose-example)**

## All platforms at once

If you want to share UIs across all supported platforms at once, you can start with [this template](https://github.com/JetBrains/compose-multiplatform-template#readme).

> Note that this template currently doesn’t support the web. It will be added later.
>
> We would appreciate your feedback on Compose Multiplatform in the public Slack channel [#compose](https://kotlinlang.slack.com/archives/CJLTWPH7S/p1678882768039969).
## Learn more

* [FAQ](docs/FAQ.md)
* [Samples](examples/README.md)
* [Tutorials](tutorials/README.md)
* [Changelog](CHANGELOG.md)
* [Compatibility and versioning](VERSIONING.md)


5 changes: 4 additions & 1 deletion VERSIONING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Compatibility and versioning overview

### Supported platforms
* Android
* iOS
* macOS (x86-64, arm64)
* Windows (x86-64)
* Linux (x86-64, arm64)
Expand All @@ -12,7 +14,7 @@ Following limitations apply to 1.0 release.

* Only 64-bit x86 Windows is supported
* Only JDK 11 or later is supported due to the memory management scheme used in Skia bindings
* Only JDK 15 or later is supported for packaging native distributions due to jpackage limitations
* Only JDK 17 or later is supported for packaging native distributions due to jpackage limitations

Knowing issues on older versions:
- OpenJDK 11.0.12 has [an issue](https://github.com/JetBrains/compose-jb/issues/940), when we switch keyboard layout on MacOs (isn't reproducible in OpenJDK 11.0.15)
Expand All @@ -34,6 +36,7 @@ Kotlin version | Minimal Compose version | Notes
1.7.20 | 1.2.1
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

### Using the latest Kotlin version

Expand Down
Binary file modified artwork/readme/apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 343e85f

Please sign in to comment.