Skip to content

Releases: arkivanov/Decompose

1.0.0-beta-01-native-compose

19 Nov 18:11
Compare
Choose a tag to compare
Pre-release

This is the same release as 1.0.0-beta-01, but with Compose for iOS support.

Versions and dependencies

Kotlin: 1.7.20
Essenty: 0.6.0
JetBrains Compose: 1.2.0

1.0.0-alpha-07

24 Oct 22:33
Compare
Choose a tag to compare
  • Added children Generic Navigation model (#241, #242, #243, #245)
  • Added replaceAll extension function for StackNavigator (#229 by @Tommyten)
  • Updated Kotlin to 1.7.20, JetBrains Compose to 1.2.0, Jetpack Compose to 1.3.2 (#233, #236)

The new Generic Navigation model

This release introduces the new Generic Navigation model - children. It can be used to create almost any kind of custom navigation models. Both Child Stack and Child Overlay now use the Generic Navigation. See the docs for more information.

Despite the fact that there are lots of tests, there is a possibility that something is broken. Please file an issue if you believe that something is wrong!

Versions and dependencies

Kotlin: 1.7.20
Essenty: 0.6.0

extensions-compose-jetpack

Jetpack Compose: 1.2.1
Jetpack Compose Compiler: 1.3.2

extensions-compose-jetbrains

JetBrains Compose: 1.2.0

1.0.0-alpha-07-native-compose

24 Oct 22:32
Compare
Choose a tag to compare
Pre-release

This is the same release as 1.0.0-alpha-07, but with Compose for iOS support.

Also added support for the simulatorArm64 target (#246).

Versions and dependencies

Kotlin: 1.7.20
Essenty: 0.6.0
JetBrains Compose: 1.2.0

1.0.0-alpha-06

03 Oct 20:50
83a8de4
Compare
Choose a tag to compare

This is a follow-up release to 1.0.0-alpha-05 with the following bug fix:

  • Don't use KClass#simpleName for stack and overlay keys (#228)

1.0.0-alpha-06-native-compose

03 Oct 20:50
Compare
Choose a tag to compare
Pre-release

This is a follow-up release to 1.0.0-alpha-05-native-compose with the following bug fix:

  • Don't use KClass#simpleName for stack and overlay keys (#228)

1.0.0-alpha-05

02 Oct 23:15
Compare
Choose a tag to compare
  • Added new navigation model - Child Overlay (#217, #218, #220)
  • Disallow destroying child ComponentContext (#215)
  • Derive default values of stack and overlay keys from configuration class simpleName (#224)
  • Added extensions for Value<ChildStack> (#203)
  • Updated Kotlin to 1.7.10, MPP Compose to 1.2.0-beta02, Jetpack Compose to 1.2.1 (#211, #223)
  • Updated Essenty to 0.6.0 (#219)

New navigation model - Child Overlay

In addition to Child Stack, this release adds a new navigation model - Child Overlay. This kind of navigation is designed to activate and dismiss just one child component, e.g. a dialog. See the updated documentation.

Disallow destroying child ComponentContext

Decompose now prevents a child ComponentContext created using childContext extension function from being destroyed. This is required to prevent possible memory leaks. See the updated documentation about child ComponentContext. If you need to destroy child components manually, then consider using the new Child Overlay.

Backward compatibility

Decompose now uses Essenty v0.6.0 which is not binary compatible with the previously used version v0.5.2. Make sure there are no transitive dependencies using the old version of Essenty.

Versions and dependencies

Kotlin: 1.7.10
Essenty: 0.6.0

extensions-compose-jetpack

Jetpack Compose: 1.2.1
Jetpack Compose Compiler: 1.3.1

extensions-compose-jetbrains

JetBrains Compose: 1.2.0-beta02

1.0.0-alpha-05-native-compose

02 Oct 23:14
258c091
Compare
Choose a tag to compare
Pre-release

This is the same release as 1.0.0-alpha-05, but with Compose for iOS support:

Versions and dependencies

Kotlin: 1.7.10
Essenty: 0.6.0
JetBrains Compose: 1.2.0-beta02

1.0.0-alpha-04

22 Aug 18:00
Compare
Choose a tag to compare
  • Fixed a bug when a parent Child Stack takes precedence in back button handling (#185)

Versions and dependencies

Kotlin: 1.7.0
Essenty: 0.5.2

extensions-compose-jetpack

Jetpack Compose: 1.2.0
Jetpack Compose Compiler: 1.2.0

extensions-compose-jetbrains

JetBrains Compose: 1.2.0-alpha01-dev753

1.0.0-alpha-03

22 Aug 09:08
b3d13f8
Compare
Choose a tag to compare
  • Compare configurations by equality in Child Stack (#182)

Bug fix

This release fixes a bug that existed for a long time. Now Child Stack compares configurations by equality and not by references. This avoids unnecessary component re-creations in some conditions.

Here is an example of affected use case:

class Root(componentContext: ComponentContext): ComponentContext by componentContext {
    private val navigation = StackNavigation<Config>()
    private val stack = childStack(source = navigation, initialConfiguration = Config.Tab1("1")) { ... }
    
    fun foo() {
        navigation.bringToFront(Config.Tab2("2"))

        // At this point the stack is: [1, 2].
        // Before this release, the call below caused re-creation of Tab1 component.
        // This is because configurations were compared by reference, instead of equality.
        // Re-creation happens only if the configuration is a class, singleton objects are not affected.
        navigation.bringToFront(Config.Tab1("1"))
    }
    
    private sealed interface Config : Parcelable {
        @Parcelize
        data class Tab1(val payload: String) : Config

        @Parcelize
        data class Tab2(val payload: String) : Config
    } 
}

Versions and dependencies

Kotlin: 1.7.0
Essenty: 0.5.2

extensions-compose-jetpack

Jetpack Compose: 1.2.0
Jetpack Compose Compiler: 1.2.0

extensions-compose-jetbrains

JetBrains Compose: 1.2.0-alpha01-dev753

1.0.0-alpha-04-native-compose

22 Aug 18:00
Compare
Choose a tag to compare
Pre-release

This is the same release as 1.0.0-alpha-04, but with Compose for iOS support:

Versions and dependencies

Kotlin: 1.7.0
Essenty: 0.5.2
JetBrains Compose: 1.2.0-alpha01-dev753