Remove experimental templates, update READMEs with templates new locations (#2847)

+ replace "compose-jb" occurrences with "compose-multiplatform"
This commit is contained in:
Nikita Lipsky
2023-03-09 11:40:36 +02:00
committed by GitHub
parent 4cf574cc34
commit 21f74f92df
80 changed files with 29 additions and 2403 deletions

View File

@@ -16,7 +16,7 @@ Jetpack Compose interoperability is enabled on the publication level - nothing n
The easiest way to start is to use Kotlin Project Wizard with Compose Multiplatform template - one of the target platform is Android.
To see how it could be achieved see the [multiplatform template](https://github.com/JetBrains/compose-jb/tree/master/templates/multiplatform-template).
To see how it could be achieved see the [multiplatform template](https://github.com/JetBrains/compose-multiplatform/tree/master/templates/multiplatform-template).
## Versioning
@@ -31,4 +31,4 @@ dependencies {
## Useful reading about porting Android apps to Desktop
[Porting ViewModel](https://github.com/JetBrains/compose-jb/discussions/1587)
[Porting ViewModel](https://github.com/JetBrains/compose-multiplatform/discussions/1587)

View File

@@ -39,7 +39,7 @@ Just search for "Compose Multiplatform".
### Update the wizard plugin
The Compose plugin version used in the wizard above might not be the latest. Update to the latest plugin version by editing the `build.gradle.kts` file and updating the version information as shown below.
For the latest versions, see the [latest versions](https://github.com/JetBrains/compose-jb/releases) site and the [Kotlin](https://kotlinlang.org/) site.
For the latest versions, see the [latest versions](https://github.com/JetBrains/compose-multiplatform/releases) site and the [Kotlin](https://kotlinlang.org/) site.
```
plugins {
kotlin("jvm") version "1.8.0"
@@ -55,8 +55,8 @@ The recommended way to build Compose for Desktop projects is with Gradle.
JetBrains provides a simple way of building Compose for Desktop projects
using a special Gradle plugin.
You can clone an existing template for a [desktop](https://github.com/JetBrains/compose-jb/tree/master/templates/desktop-template) or
[multiplatform](https://github.com/JetBrains/compose-jb/tree/master/templates/multiplatform-template) application, or create it from scratch.
You can clone an existing template for a [desktop](https://github.com/JetBrains/compose-multiplatform/tree/master/templates/desktop-template) or
[multiplatform](https://github.com/JetBrains/compose-multiplatform/tree/master/templates/multiplatform-template) application, or create it from scratch.
First create a new directory, named `sample`.
```shell script
@@ -160,6 +160,6 @@ Running and debugging the `main()` function using run gutter is also supported.
## Next steps
Congratulations on getting your first Compose Multiplatform project working! We encourage you to continue playing around with the areas that interest you, and look forward to seeing what you build! When you're ready to continue learning, we have many more great tutorials available here: [Compose Multiplatform Tutorials](https://github.com/JetBrains/compose-jb#tutorials).
Congratulations on getting your first Compose Multiplatform project working! We encourage you to continue playing around with the areas that interest you, and look forward to seeing what you build! When you're ready to continue learning, we have many more great tutorials available here: [Compose Multiplatform Tutorials](https://github.com/JetBrains/compose-multiplatform#tutorials).
We also have some more advanced [Compose Multiplatorm Example Projects](https://github.com/JetBrains/compose-jb#examples) that you can learn from.
We also have some more advanced [Compose Multiplatorm Example Projects](https://github.com/JetBrains/compose-multiplatform#examples) that you can learn from.

View File

@@ -73,7 +73,7 @@ fun main() = singleWindowApplication {
modifier = Modifier.width(200.dp)
)
AsyncImage(
load = { loadSvgPainter("https://github.com/JetBrains/compose-jb/raw/master/artwork/idea-logo.svg", density) },
load = { loadSvgPainter("https://github.com/JetBrains/compose-multiplatform/raw/master/artwork/idea-logo.svg", density) },
painterFor = { it },
contentDescription = "Idea logo",
contentScale = ContentScale.FillWidth,

View File

@@ -163,8 +163,8 @@ The fourth point is not that obvious but might be very important. Separating nav
You can find some integration tests in the TodoApp example:
- [TodoMainTest](https://github.com/JetBrains/compose-jb/blob/master/examples/todoapp/common/main/src/commonTest/kotlin/example/todo/common/main/integration/TodoMainTest.kt) - integration tests for the Main screen.
- [TodoRootTest](https://github.com/JetBrains/compose-jb/blob/master/examples/todoapp/common/root/src/commonTest/kotlin/example/todo/common/root/integration/TodoRootTest.kt) - integration tests for navigation between the Main and the Edit screens.
- [TodoMainTest](https://github.com/JetBrains/compose-multiplatform/blob/master/examples/todoapp/common/main/src/commonTest/kotlin/example/todo/common/main/integration/TodoMainTest.kt) - integration tests for the Main screen.
- [TodoRootTest](https://github.com/JetBrains/compose-multiplatform/blob/master/examples/todoapp/common/root/src/commonTest/kotlin/example/todo/common/root/integration/TodoRootTest.kt) - integration tests for navigation between the Main and the Edit screens.
This pattern is encouraged by the Decompose library. If this is your choice, then you can just use its recommended approach.
@@ -174,7 +174,7 @@ The only responsibility of the user interface is to listen for components' state
The following resources can help with this pattern:
- The Decompose [documentation](https://arkivanov.github.io/Decompose/)
- The [TodoApp](https://github.com/JetBrains/compose-jb/tree/master/examples/todoapp) example
- The [TodoApp](https://github.com/JetBrains/compose-multiplatform/tree/master/examples/todoapp) example
- The article "[Fully cross-platform Kotlin applications (almost)](https://proandroiddev.com/fully-cross-platform-kotlin-applications-almost-29c7054f8f28)"
### A very basic example:

View File

@@ -331,7 +331,7 @@ When the user presses the 'Tab' key, the focus doesn't switch to the next focusa
#### A possible workaround
This workaround is mentioned in [Issues/109](https://github.com/JetBrains/compose-jb/issues/109#issuecomment-1161705265).
This workaround is mentioned in [Issues/109](https://github.com/JetBrains/compose-multiplatform/issues/109#issuecomment-1161705265).
Write a custom Modifier.moveFocusOnTab:
```Kotlin
import androidx.compose.foundation.layout.Column

View File

@@ -47,7 +47,7 @@ Form(attrs = {
```
There are more event listeners supported out of the box. We plan to add the documentation for them later on. In the meantime, you can find all supported event listeners in the [source code](https://github.com/JetBrains/compose-jb/blob/master/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/EventsListenerScope.kt).
There are more event listeners supported out of the box. We plan to add the documentation for them later on. In the meantime, you can find all supported event listeners in the [source code](https://github.com/JetBrains/compose-multiplatform/blob/master/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/EventsListenerScope.kt).
### Runnable example

View File

@@ -12,7 +12,7 @@ You need to have the following software installed before you begin:
## Creating a new project
You can create the project by [downloading the template here](https://github.com/JetBrains/compose-jb/tree/master/templates/web-template) or using the Project Wizard in IDEA:
You can create the project by [downloading the template here](https://github.com/JetBrains/compose-multiplatform/tree/master/templates/web-template) or using the Project Wizard in IDEA:
<img alt="Create new project" src="wizard.png" height="500" />

View File

@@ -21,11 +21,11 @@ Compose for Web provides multiple ways of declaring user interfaces in Kotlin co
[Integration with Ktor](https://play.kotlinlang.org/hands-on/Full%20Stack%20Web%20App%20with%20Kotlin%20Multiplatform) - this is actually not a Compose tutorial, but since integration of Kotlin/JS with Ktor is very popular scenario, we decided to add it here
## Examples:
- Compose For Web [landing page](https://compose-web.ui.pages.jetbrains.team/). Also have a look at [source code](https://github.com/JetBrains/compose-jb/tree/master/examples/web-landing)
- Compose For Web and React integration - [source code](https://github.com/JetBrains/compose-jb/tree/master/examples/web-with-react)
- Bird game - [source code](https://github.com/JetBrains/compose-jb/tree/master/examples/web-compose-bird)
- TODO app. (MPP: android, desktop, web) - [source code](https://github.com/JetBrains/compose-jb/tree/master/examples/todoapp-lite)
- Falling Balls game (uses deprecated widgets API) - [source code](https://github.com/JetBrains/compose-jb/tree/master/examples/falling-balls-web)
- Compose For Web [landing page](https://compose-web.ui.pages.jetbrains.team/). Also have a look at [source code](https://github.com/JetBrains/compose-multiplatform/tree/master/examples/web-landing)
- Compose For Web and React integration - [source code](https://github.com/JetBrains/compose-multiplatform/tree/master/examples/web-with-react)
- Bird game - [source code](https://github.com/JetBrains/compose-multiplatform/tree/master/examples/web-compose-bird)
- TODO app. (MPP: android, desktop, web) - [source code](https://github.com/JetBrains/compose-multiplatform/tree/master/examples/todoapp-lite)
- Falling Balls game (uses deprecated widgets API) - [source code](https://github.com/JetBrains/compose-multiplatform/tree/master/examples/falling-balls-web)
## What's included (modules):

View File

@@ -185,7 +185,7 @@ object TrayIcon : Painter() {
## Open and close multiple windows
If an application has multiple windows, then it is better to put its state into a separate class and open/close window in response to `mutableStateListOf` changes (see [notepad example](https://github.com/JetBrains/compose-jb/tree/master/examples/notepad) for more complex use cases):
If an application has multiple windows, then it is better to put its state into a separate class and open/close window in response to `mutableStateListOf` changes (see [notepad example](https://github.com/JetBrains/compose-multiplatform/tree/master/examples/notepad) for more complex use cases):
```kotlin
import androidx.compose.runtime.Composable
import androidx.compose.runtime.key
@@ -653,4 +653,4 @@ fun main() = application {
```
_**Important note:** Window transparency is implemented based on JDK implementation, that contains **known issue on Linux** in case of moving a Window between two monitors with different density. So when you move an App, the Window stops being transparent. And it seems nothing can be done with this situation on Compose side.
[An issue about it](https://github.com/JetBrains/compose-jb/issues/1339)_
[An issue about it](https://github.com/JetBrains/compose-multiplatform/issues/1339)_