From b4784530dcd392d5317629dc95acf98d12d8b60f Mon Sep 17 00:00:00 2001 From: Arkadii Ivanov Date: Sat, 23 Dec 2023 21:40:01 +0000 Subject: [PATCH] Replaced Jetpack Compose with just Compose in docs --- README.md | 2 +- docs/getting-started/installation.md | 6 +++--- docs/getting-started/quick-start.md | 14 +++++++------- docs/index.md | 2 +- docs/samples.md | 12 ++++++------ mkdocs.yml | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 989842f7d..be3121a99 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Check out the [template repository](https://github.com/arkivanov/decompose-multi - [Decompose — experiments with Kotlin Multiplatform lifecycle-aware components and navigation](https://proandroiddev.com/decompose-experiments-with-kotlin-multiplatform-lifecycle-aware-components-and-navigation-a04ef3c7f6a3?source=friends_link&sk=f7d289cc329b6c8a765fc049e36c313f) - [Fully cross-platform Kotlin applications (almost)](https://proandroiddev.com/fully-cross-platform-kotlin-applications-almost-29c7054f8f28?source=friends_link&sk=4619fdcb17912fde589bc4fca83efbbd) -- [A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose](https://medium.com/p/5b723c4f256e) - if you find Decompose verbose and would prefer something built on top of Jetpack Compose. +- [A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose](https://medium.com/p/5b723c4f256e) - if you find Decompose verbose and would prefer something built on top of Compose. - "Component-based Approach" series by [Artur Artikov](https://twitter.com/artik_artikov) - Part 1: [Fighting Complexity in Android Applications](https://medium.com/@a.artikov/component-based-approach-fighting-complexity-in-android-applications-2eaf5e8c5fad) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 21e729513..8dd2ad590 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -32,14 +32,14 @@ Some functionality is actually provided by [Essenty](https://github.com/arkivano Compose is currently published in two separate variants: - The one developed and maintained by Google is Android only, called [Jetpack Compose](https://developer.android.com/jetpack/compose). -- The Kotlin Multiplatform variant of Jetpack Compose maintained by both JetBrains and Google, called it [Multiplatform Compose](https://github.com/JetBrains/compose-multiplatform). +- The Kotlin Multiplatform variant of Jetpack Compose maintained by both JetBrains and Google, called [Multiplatform Compose](https://github.com/JetBrains/compose-multiplatform). === "Before v3.0.0-alpha01" 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 JetBrains Compose, supports `android` and `jvm` targets + - `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](/Decompose/extensions/compose/). diff --git a/docs/getting-started/quick-start.md b/docs/getting-started/quick-start.md index fb7dff43a..80a074b08 100644 --- a/docs/getting-started/quick-start.md +++ b/docs/getting-started/quick-start.md @@ -18,7 +18,7 @@ interface RootComponent class DefaultRootComponent : RootComponent ``` -It's often useful to extract an interface for a component. It makes it possible to create test doubles for integration tests (e.g. testing navigation in a container component), or fake implementations for UI previews (e.g. for Jetpack Compose or SwiftUI). +It's often useful to extract an interface for a component. It makes it possible to create test doubles for integration tests (e.g. testing navigation in a container component), or fake implementations for UI previews (e.g. for Compose or SwiftUI). ## ComponentContext @@ -46,7 +46,7 @@ There are multiple ways of exposing an observable state from a component. ### Using Value from Decompose -Decompose provides an observable state holder - `Value`. It offers great integration with various UI frameworks, such as Jetpack Compose, SwiftUI, Kotlin/React, etc. You can also convert Reaktive `Observable` or coroutines `Flow` to `Value`, if needed. +Decompose provides an observable state holder - `Value`. It offers great integration with various UI frameworks, such as Compose, SwiftUI, Kotlin/React, etc. You can also convert Reaktive `Observable` or coroutines `Flow` to `Value`, if needed. ```kotlin interface ListComponent { @@ -72,9 +72,9 @@ class DefaultListComponent( } ``` -### Observing Value in Jetpack Compose +### Observing Value in Compose -Observing `Value` in Jetpack Compose is easy, just use the `subscribeAsState` extension function. +Observing `Value` in Compose is easy, just use the `subscribeAsState` extension function. ```kotlin @Composable @@ -275,7 +275,7 @@ Each child component is represented by a persistent configuration class. A confi } ``` -### Child Stack with Jetpack Compose +### Child Stack with Compose ```kotlin @Composable @@ -332,7 +332,7 @@ Please refer to [samples](/Decompose/samples/) for integrations with other UI fr ## Initializing a root component -### Android with Jetpack Compose +### Android with Compose Use `defaultComponentContext` extension function to create the root `ComponentContext` in an `Activity` or a `Fragment`. @@ -358,7 +358,7 @@ class MainActivity : AppCompatActivity() { } ``` -### Desktop with Jetpack Compose +### Desktop with Compose Use `LifecycleController` to bind the root lifecycle with the main window state. See an example of `runOnUiThread` function here - [Utils.kt](https://github.com/arkivanov/Decompose/blob/master/sample/app-desktop/src/jvmMain/kotlin/com/arkivanov/sample/app/Utils.kt). diff --git a/docs/index.md b/docs/index.md index 71aacc97d..2dffdaa12 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,7 +2,7 @@ ## What is Decompose? -Decompose is a Kotlin Multiplatform library for breaking down your code into lifecycle-aware business logic components (aka BLoC), with routing functionality and pluggable UI (Jetpack Compose, Android Views, SwiftUI, Kotlin/React, etc.). +Decompose is a Kotlin Multiplatform library for breaking down your code into lifecycle-aware business logic components (aka BLoC), with routing functionality and pluggable UI (Compose, Android Views, SwiftUI, Kotlin/React, etc.). ### Supported targets diff --git a/docs/samples.md b/docs/samples.md index 9e984d7c2..73fa80d1f 100644 --- a/docs/samples.md +++ b/docs/samples.md @@ -7,9 +7,9 @@ This sample demonstrates the following features: * Nested navigation * State preservation (using `StateKeeper`) * Retaining instances (using `InstanceKeeper`) -* Pluggable UI (Android Views, Jetpack Compose, SwiftUI, Kotlin/React) +* Pluggable UI (Android Views, Compose, SwiftUI, Kotlin/React) * [Play Feature Delivery](https://developer.android.com/guide/playcore/feature-delivery) for Android -* Tests, including UI tests (Jetpack Compose) +* Tests, including Compose UI tests Please note that Gradle files included in this sample project are not supposed to be used as a reference. They share the configuration with the reset of the library, which simplifies the maintenance a lot. Please refer to the [KMP documentation](https://kotlinlang.org/docs/multiplatform-mobile-getting-started.html) for information on configuring a KMP project. You can also check other sample projects described below. @@ -26,9 +26,9 @@ Content: * [ArticleDetailsComponent](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/multipane/details) - displays the content of the selected article. * [DynamicFeatures](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/dynamicfeatures) - the Dynamic Features tab, it demonstrates the usage of [Play Feature Delivery](https://developer.android.com/guide/playcore/feature-delivery) on Android, while using classing integration on other platforms. There are two simple feature components - `Feature1` and `Feature2` - they are located in separate modules described below. * [DynamicFeature](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/dynamicfeatures/dynamicfeature) - a helper component responsible for loading dynamic feature components. -* [compose](https://github.com/arkivanov/Decompose/tree/master/sample/shared/compose) - this module contains Jetpack Compose UI. +* [compose](https://github.com/arkivanov/Decompose/tree/master/sample/shared/compose) - this module contains Compose UI. * [dynamic-features/api](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/api) - this module contains only API for dynamic feature components. -* [dynamic-features/compose-api](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/feature1Impl) - this module contains only Jetpack Compose API for dynamic feature components. +* [dynamic-features/compose-api](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/compose-api) - this module contains only Compose API for dynamic feature components. * [dynamic-features/feature1Impl](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/feature1Impl) - contains the implementation of `Feature1` dynamic feature component. On Android it depends on `android-app` module and is used via reflection. On all other targets, the `shared` module directly depends on this module and no reflection is used. * [dynamic-features/feature2Impl](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/feature2Impl) - contains the implementation of `Feature2` dynamic feature component. On Android it depends on `android-app` module and is used via reflection. On all other targets, the `shared` module directly depends on this module and no reflection is used. * [Android sample app](https://github.com/arkivanov/Decompose/tree/master/sample/app-android) @@ -39,7 +39,7 @@ Content: * [RootComponentIntegrationTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonTest/kotlin/com/arkivanov/sample/shared/root/RootComponentIntegrationTest.kt) - integration tests for `RootComponent`, including navigation tests. * [CountersComponentIntegrationTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonTest/kotlin/com/arkivanov/sample/shared/counters/CountersComponentIntegrationTest.kt) - integration tests for `CountersComponent`, including navigation tests. * [CounterComponentTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonTest/kotlin/com/arkivanov/sample/shared/counters/counter/CounterComponentTest.kt) - unit tests for `CounterComponent`. Includes supplying test dependencies, tests for instance retaining and state preservation, etc. - * [CounterContentTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/compose/src/jvmTest/kotlin/com/arkivanov/sample/shared/counters/counter/CounterContentTest.kt) - UI tests (Jetpack Compose) for `CounterComponent`. + * [CounterContentTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/compose/src/jvmTest/kotlin/com/arkivanov/sample/shared/counters/counter/CounterContentTest.kt) - Compose UI tests for `CounterComponent`. !!!warning The Multi-Pane sample is only for advanced single-pane/multi-pane navigation and layout. For generic master-detail navigation please refer to the Sample Todo List App described below. @@ -92,7 +92,7 @@ A sample Android project demonstrating the use of Decompose library together wit - [Decompose — experiments with Kotlin Multiplatform lifecycle-aware components and navigation](https://proandroiddev.com/decompose-experiments-with-kotlin-multiplatform-lifecycle-aware-components-and-navigation-a04ef3c7f6a3?source=friends_link&sk=f7d289cc329b6c8a765fc049e36c313f) - [Fully cross-platform Kotlin applications (almost)](https://proandroiddev.com/fully-cross-platform-kotlin-applications-almost-29c7054f8f28?source=friends_link&sk=4619fdcb17912fde589bc4fca83efbbd) -- [A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose](https://medium.com/p/5b723c4f256e) - if you find Decompose verbose and would prefer something built on top of Jetpack Compose. +- [A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose](https://medium.com/p/5b723c4f256e) - if you find Decompose verbose and would prefer something built on top of Compose. - "Component-based Approach" series by [Artur Artikov](https://twitter.com/artik_artikov) * Part 1: [Fighting Complexity in Android Applications](https://medium.com/@a.artikov/component-based-approach-fighting-complexity-in-android-applications-2eaf5e8c5fad) diff --git a/mkdocs.yml b/mkdocs.yml index 8b4a35a2d..c31739100 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,7 @@ site_name: Decompose site_url: https://arkivanov.github.io/Decompose site_author: Arkadii Ivanov site_description: >- - Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing functionality and pluggable UI (Jetpack Compose, SwiftUI, JS React, etc.) + Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing functionality and pluggable UI (Compose, SwiftUI, JS React, etc.) # Repository repo_name: arkivanov/Decompose