From c9b828a63748fb589206461b347b1f6066d8aac2 Mon Sep 17 00:00:00 2001 From: Zlatibor Veljkovic Date: Sat, 13 Jan 2024 02:27:11 +0100 Subject: [PATCH 1/8] Work in progress - install page documentation update (without iOS) - deprecation in mkdocs emoji --- docs/getting-started/installation.md | 59 +++++++++++++++------------- mkdocs.yml | 4 +- 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index a594e9970..b8a769711 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -4,9 +4,21 @@ Decompose provides a number of modules, they are all published to Maven Central ## The main Decompose module -The main functionality is provided by the `decompose` module. It contains some core features like [ComponentContext](../component/overview.md#componentcontext), [Child Stack](../navigation/stack/overview.md), etc. +The main functionality is provided by the `decompose` module. It contains some core features like: -### Gradle setup +- [ComponentContext](../component/overview.md#componentcontext) needed to allow custom components +to manage lifecycle, state saving,... +- [Value](../component/overview.md/#value-and-mutablevalue-state-holders) allowing UI code to observe value changes +- [Child Stack](../navigation/stack/overview.md) navigation model +- [defaultComponentContext](../getting-started/quick-start.md/#android-with-compose) function for generating root component context +that is needed in UI code +- and many other important things + +This module should be imported into build.gradle.kts for shared application module +at ```kotlin.sourceSets.commonMain.dependencies``` + +If you are having Android module (androidApp or composeApp if using KMP Wizard) this dependency also needs to be +added into build.gradle.kts for Android module at ```android.dependencies``` to allow Android code access to above functionality === "Groovy" @@ -38,55 +50,43 @@ Compose is currently published in two separate variants: Due to this fragmentation Decompose provides two separate extension modules for Compose: - - `extensions-compose-jetpack` - Android library for Jetpack Compose. - - `extensions-compose-jetbrains` - Kotlin Multiplatform library for Multiplatform Compose. - - Both modules are used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md). - -=== "Since v3.0.0-alpha01" - - Since Decompose version v3.0.0-alpha01 there is just one extension module for Compose: - - - `extensions-compose` - compatible with both Jetpack Compose and Multiplatform Compose. - - The module is used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md). - -### Gradle setup - -=== "Before v3.0.0-alpha01" - - Typically only one module should be selected, depending on the Compose variant being used. - === "Groovy" - + ``` groovy implementation "com.arkivanov.decompose:extensions-compose-jetpack:" // or implementation "com.arkivanov.decompose:extensions-compose-jetbrains:" ``` - + === "Kotlin" - + ``` kotlin implementation("com.arkivanov.decompose:extensions-compose-jetpack:") // or implementation("com.arkivanov.decompose:extensions-compose-jetbrains:") ``` + Both modules are used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md). + Typically only one module should be selected, depending on the Compose variant being used. + === "Since v3.0.0-alpha01" + Since Decompose version v3.0.0-alpha01 there is just one extension module for Compose - compatible with both Jetpack Compose and Multiplatform Compose. + === "Groovy" - + ``` groovy implementation "com.arkivanov.decompose:extensions-compose:" ``` - === "Kotlin" ``` kotlin implementation("com.arkivanov.decompose:extensions-compose:") ``` + The module is used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md). + + #### Support for Compose for iOS and Web (JS/Canvas and Wasm) === "Before v3.0.0-alpha01" @@ -109,14 +109,17 @@ Compose is currently published in two separate variants: === "Since v3.0.0-alpha01" - All Compose variants (Android, JVM/Desktop, Native/iOS, Native/macOS, JS/Canvas, Wasm) are published from the main branch, please add dependencies as usual (no version suffixes required). + All Compose variants (Android, JVM/Desktop, Native/iOS, Native/macOS, JS/Canvas, Wasm) are published from the main branch, + please add dependencies as usual (no version suffixes required). !!!warning Wasm target is not yet supported. Please follow [issue #74](https://github.com/arkivanov/Decompose/issues/74) for more information and updates. ## Extensions for Android views -The `extensions-android` module provides extensions to connect Android views based UI to Decompose components. Please head to the corresponding [documentation page](../extensions/android.md) for more information. +The `extensions-android` module provides extensions to connect +Android views (older alternative to Compose UI) to Decompose components. +Please head to the corresponding [documentation page](../extensions/android.md) for more information. ### Gradle setup diff --git a/mkdocs.yml b/mkdocs.yml index c31739100..3804b24b9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -111,8 +111,8 @@ markdown_extensions: - pymdownx.critic - pymdownx.details - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg - pymdownx.highlight - pymdownx.inlinehilite - pymdownx.keys From f65b02dbcaf8a98260eb2a4e9648e0d51a592414 Mon Sep 17 00:00:00 2001 From: Zlatibor Veljkovic Date: Sun, 14 Jan 2024 13:22:12 +0100 Subject: [PATCH 2/8] Update docs/getting-started/installation.md Co-authored-by: Arkadii Ivanov --- docs/getting-started/installation.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index b8a769711..7f09d19d4 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -6,8 +6,7 @@ Decompose provides a number of modules, they are all published to Maven Central The main functionality is provided by the `decompose` module. It contains some core features like: -- [ComponentContext](../component/overview.md#componentcontext) needed to allow custom components -to manage lifecycle, state saving,... +- [ComponentContext](../component/overview.md#componentcontext) - provides API for components to manage lifecycle, state saving, etc. - [Value](../component/overview.md/#value-and-mutablevalue-state-holders) allowing UI code to observe value changes - [Child Stack](../navigation/stack/overview.md) navigation model - [defaultComponentContext](../getting-started/quick-start.md/#android-with-compose) function for generating root component context From 920fc997540d605397cc58c89339d6091491d50c Mon Sep 17 00:00:00 2001 From: Zlatibor Veljkovic Date: Tue, 16 Jan 2024 01:47:59 +0100 Subject: [PATCH 3/8] Update docs/getting-started/installation.md Co-authored-by: Arkadii Ivanov --- docs/getting-started/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 7f09d19d4..25b08371b 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -7,7 +7,7 @@ Decompose provides a number of modules, they are all published to Maven Central The main functionality is provided by the `decompose` module. It contains some core features like: - [ComponentContext](../component/overview.md#componentcontext) - provides API for components to manage lifecycle, state saving, etc. -- [Value](../component/overview.md/#value-and-mutablevalue-state-holders) allowing UI code to observe value changes +- [Value](../component/overview.md/#value-and-mutablevalue-state-holders) - Multiplatform (Swift-friendly) observable state holder (allows observing state changes in the UI). - [Child Stack](../navigation/stack/overview.md) navigation model - [defaultComponentContext](../getting-started/quick-start.md/#android-with-compose) function for generating root component context that is needed in UI code From e3d2bbd490d2258325fa407fcd9c3eb0ad68452a Mon Sep 17 00:00:00 2001 From: Zlatibor Veljkovic Date: Tue, 16 Jan 2024 01:48:26 +0100 Subject: [PATCH 4/8] Update docs/getting-started/installation.md Co-authored-by: Arkadii Ivanov --- docs/getting-started/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 25b08371b..13a41d912 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -8,7 +8,7 @@ The main functionality is provided by the `decompose` module. It contains some c - [ComponentContext](../component/overview.md#componentcontext) - provides API for components to manage lifecycle, state saving, etc. - [Value](../component/overview.md/#value-and-mutablevalue-state-holders) - Multiplatform (Swift-friendly) observable state holder (allows observing state changes in the UI). -- [Child Stack](../navigation/stack/overview.md) navigation model +- [Child Stack](../navigation/stack/overview.md) - stack navigation model. - [defaultComponentContext](../getting-started/quick-start.md/#android-with-compose) function for generating root component context that is needed in UI code - and many other important things From 5bae23def346479dfd88e4db9172bcfdcde6d9b3 Mon Sep 17 00:00:00 2001 From: Zlatibor Veljkovic Date: Tue, 16 Jan 2024 01:49:07 +0100 Subject: [PATCH 5/8] Update docs/getting-started/installation.md Co-authored-by: Arkadii Ivanov --- docs/getting-started/installation.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 13a41d912..082a311b8 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -9,8 +9,7 @@ The main functionality is provided by the `decompose` module. It contains some c - [ComponentContext](../component/overview.md#componentcontext) - provides API for components to manage lifecycle, state saving, etc. - [Value](../component/overview.md/#value-and-mutablevalue-state-holders) - Multiplatform (Swift-friendly) observable state holder (allows observing state changes in the UI). - [Child Stack](../navigation/stack/overview.md) - stack navigation model. -- [defaultComponentContext](../getting-started/quick-start.md/#android-with-compose) function for generating root component context -that is needed in UI code +- [defaultComponentContext](../getting-started/quick-start.md/#android-with-compose) - creates a default `ComponentContext` attached to an Activity or Fragment on Android. - and many other important things This module should be imported into build.gradle.kts for shared application module From 3579775d6d194611c814a514f9fa0e1c6ff29964 Mon Sep 17 00:00:00 2001 From: Zlatibor Veljkovic Date: Tue, 16 Jan 2024 01:49:23 +0100 Subject: [PATCH 6/8] Update docs/getting-started/installation.md Co-authored-by: Arkadii Ivanov --- docs/getting-started/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 082a311b8..8abbb6010 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -10,7 +10,7 @@ The main functionality is provided by the `decompose` module. It contains some c - [Value](../component/overview.md/#value-and-mutablevalue-state-holders) - Multiplatform (Swift-friendly) observable state holder (allows observing state changes in the UI). - [Child Stack](../navigation/stack/overview.md) - stack navigation model. - [defaultComponentContext](../getting-started/quick-start.md/#android-with-compose) - creates a default `ComponentContext` attached to an Activity or Fragment on Android. -- and many other important things +- And many other important APIs. This module should be imported into build.gradle.kts for shared application module at ```kotlin.sourceSets.commonMain.dependencies``` From 37732d2f66f2a483b732e77ef6db1b4567418a24 Mon Sep 17 00:00:00 2001 From: Zlatibor Veljkovic Date: Tue, 16 Jan 2024 01:50:58 +0100 Subject: [PATCH 7/8] Remove line break --- docs/getting-started/installation.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 8abbb6010..6d7977cbf 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -107,17 +107,14 @@ Compose is currently published in two separate variants: === "Since v3.0.0-alpha01" - All Compose variants (Android, JVM/Desktop, Native/iOS, Native/macOS, JS/Canvas, Wasm) are published from the main branch, - please add dependencies as usual (no version suffixes required). + All Compose variants (Android, JVM/Desktop, Native/iOS, Native/macOS, JS/Canvas, Wasm) are published from the main branch, please add dependencies as usual (no version suffixes required). !!!warning Wasm target is not yet supported. Please follow [issue #74](https://github.com/arkivanov/Decompose/issues/74) for more information and updates. ## Extensions for Android views -The `extensions-android` module provides extensions to connect -Android views (older alternative to Compose UI) to Decompose components. -Please head to the corresponding [documentation page](../extensions/android.md) for more information. +The `extensions-android` module provides extensions to connect Android views (older alternative to Compose UI) to Decompose components. Please head to the corresponding [documentation page](../extensions/android.md) for more information. ### Gradle setup From bdba301a423135c117c578e2870067a68622080f Mon Sep 17 00:00:00 2001 From: Arkadii Ivanov Date: Tue, 16 Jan 2024 19:33:53 +0000 Subject: [PATCH 8/8] Apply suggestions from code review --- docs/getting-started/installation.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 6d7977cbf..bd65633d8 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -12,11 +12,9 @@ The main functionality is provided by the `decompose` module. It contains some c - [defaultComponentContext](../getting-started/quick-start.md/#android-with-compose) - creates a default `ComponentContext` attached to an Activity or Fragment on Android. - And many other important APIs. -This module should be imported into build.gradle.kts for shared application module -at ```kotlin.sourceSets.commonMain.dependencies``` +This module should be imported into build.gradle.kts for shared application module at `kotlin.sourceSets.commonMain.dependencies`. -If you are having Android module (androidApp or composeApp if using KMP Wizard) this dependency also needs to be -added into build.gradle.kts for Android module at ```android.dependencies``` to allow Android code access to above functionality +If you are having Android module (androidApp or composeApp if using KMP Wizard) this dependency also needs to be added into build.gradle.kts for Android module at ```android.dependencies``` to allow Android code access to above functionality === "Groovy" @@ -63,8 +61,7 @@ Compose is currently published in two separate variants: // or implementation("com.arkivanov.decompose:extensions-compose-jetbrains:") ``` - Both modules are used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md). - Typically only one module should be selected, depending on the Compose variant being used. + Both modules are used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md). Typically only one module should be selected, depending on the Compose variant being used. === "Since v3.0.0-alpha01" @@ -83,8 +80,6 @@ Compose is currently published in two separate variants: ``` The module is used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md). - - #### Support for Compose for iOS and Web (JS/Canvas and Wasm) === "Before v3.0.0-alpha01"