Skip to content

Releases: arkivanov/Decompose

3.0.0-alpha07

20 Feb 20:55
a991b0c
Compare
Choose a tag to compare
3.0.0-alpha07 Pre-release
Pre-release
  • Don't remove the first configuration on popWhile (#646)
  • Inlined the rest of navigation extensions with lambdas (#648)
  • Updated Kotlin to 1.9.22, Compose to 1.6.0-rc02, also updated Pages Composable API (#649, see #461)
  • Buffer navigation events during initialisation (#645)
  • Added androidPredictiveBackAnimatable (#652)
  • Updated Essenty to 2.0.0-alpha07 (#656)
  • Removed ApplicationLifecycle and used the new one from Essenty (#654)
  • Fixed predictive back gesture not working when started during normal transition (#653)

ApplicationLifecycle is moved to Essenty

ApplicationLifecycle for iOS and tvOS has been moved to Essenty.

If you are using ApplicationLifecycle in Kotlin, you will need to update imports.

- import com.arkivanov.decompose.lifecycle.ApplicationLifecycle
+ import com.arkivanov.essenty.lifecycle.ApplicationLifecycle

If you are using ApplicationLifecycle in Swift, you will need to export Essenty lifecycle module to iOS framework.

The new androidPredictiveBackAnimatable API

This release add a new predictive back animation style - the animation that is used e.g. in system settings on Pixel devices. See the updated docs.

Changes in Pages Composable API

One of the Pages Composable function overloads has changed. See #461 and #649 for more information.

@Composable
fun <C : Any, T : Any> Pages(
-     pages: State<ChildPages<C, T>>,
+     pages: ChildPages<C, T>,
      ...
)

Versions and dependencies

Kotlin: 1.9.22
Essenty: 2.0.0-alpha07
kotlinx-serialization: 1.6.2
JetBrains Compose: 1.6.0-rc02

3.0.0-alpha06

10 Feb 21:39
6fb385a
Compare
Choose a tag to compare
3.0.0-alpha06 Pre-release
Pre-release
  • Animate predictive back gesture cancellation (#620, see #618)
  • Added edgeWidth, startingOffsetThreshold and confirmationProgressThreshold parameters for PredictiveBackGestureOverlay (#622, see #618)
  • Removed StackNavigationSource, SlotNavigationSource and PagesNavigationSource interfaces (#626)
  • Fixed animation on hardware back button click with predictive back gesture enabled (#633)

Breaking changes

This release is binary incompatible with the previous 3.0.0-alpha05 release. Please make sure you also update Essenty to 2.0.0-alpha06, see the release notes there.

Changes in PredictiveBackAnimatable interface

The PredictiveBackAnimatable interface got the new method: suspend fun cancel(). This is required for animations when the predictive back gesture is cancelled.

Removed navigation source interfaces

The following interfaces were removed: StackNavigationSource, SlotNavigationSource and PagesNavigationSource. This change should be source compatible (meaning your project should still compile fine), unless you have custom implementations of those interfaces, in which case you have to implement the NavigationSource interface instead.

Versions and dependencies

Kotlin: 1.9.21
Essenty: 2.0.0-alpha06
kotlinx-serialization: 1.6.2
JetBrains Compose: 1.6.0-alpha01

3.0.0-alpha05

23 Jan 20:59
298b052
Compare
Choose a tag to compare
3.0.0-alpha05 Pre-release
Pre-release
  • Added StackNavigator#pushToFront extension function (#593)
  • Added discardSavedState and isStateSavingAllowed arguments to retainedComponent {} function (#594)
  • Use Cancellation in NavigationSource (#613)
  • Moved PredictiveBackGestureOverlay and PredictiveBackGestureIcon inside predictiveback package (#614)
  • Fixed possible NPE crash in Generic Navigation (also affects Child Pages) (#615, see #612)

Full Changelog: 3.0.0-alpha04...3.0.0-alpha05

The new StackNavigator#pushToFront function

This release adds the new StackNavigator#pushToFront navigation function. See the updated docs for details.

Breaking changes

Please make sure you also update Essenty to 2.0.0-alpha03 if applicable.

New arguments in retainedComponent function

The retainedComponent {} function got two new arguments with default values: discardSavedState and isStateSavingAllowed. The default behaviour is unchanged, though this change breaks binary compatibility.

Using Cancellation in NavigationSource

The NavigationSource#subscribe method now returns Cancellation, the NavigationSource#unsubscribe method is removed. This is both source and binary incompatible change. Though, the source compatibility is only affected if there is a manual implementation of the NavigationSource interface.

Moved PredictiveBackGestureOverlay and PredictiveBackGestureIcon

PredictiveBackGestureOverlay and PredictiveBackGestureIcon are moved from com.arkivanov.decompose.extensions.compose package to com.arkivanov.decompose.extensions.compose.stack.animation.predictiveback.

- import com.arkivanov.decompose.extensions.compose.PredictiveBackGestureOverlay
- import com.arkivanov.decompose.extensions.compose.PredictiveBackGestureIcon
+ import com.arkivanov.decompose.extensions.compose.stack.animation.predictiveback.PredictiveBackGestureOverlay
+ import com.arkivanov.decompose.extensions.compose.stack.animation.predictiveback.PredictiveBackGestureIcon

Versions and dependencies

Kotlin: 1.9.21
Essenty: 2.0.0-alpha02
kotlinx-serialization: 1.6.2
JetBrains Compose: 1.6.0-alpha01

3.0.0-alpha04

23 Dec 21:33
Compare
Choose a tag to compare
3.0.0-alpha04 Pre-release
Pre-release
  • Fixed the issue where onPageSelected was not being called during slow scrolling with HorizontalPager (#579 by @Chen-Xi-g, see #526)

Versions and dependencies

Kotlin: 1.9.21
Essenty: 2.0.0-alpha02
kotlinx-serialization: 1.6.2
JetBrains Compose: 1.6.0-alpha01

2.2.2

23 Dec 21:32
Compare
Choose a tag to compare
  • Fixed the issue where onPageSelected was not being called during slow scrolling with HorizontalPager (#579 by @Chen-Xi-g, see #526)

Versions and dependencies

Kotlin: 1.9.21
Essenty: 1.3.0
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.3

extensions-compose-jetpack

Jetpack Compose: 1.5.0
Jetpack Compose Compiler: 1.5.6

extensions-compose-jetbrains

JetBrains Compose: 1.5.11

2.2.2-compose-experimental

23 Dec 21:33
Compare
Choose a tag to compare
Pre-release

This is the same release as 2.2.2, but with Compose for iOS and Web (Canvas, js only) support.

Versions and dependencies

Kotlin: 1.9.21
Essenty: 1.3.0
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.3
JetBrains Compose: 1.5.11

3.0.0-alpha03

16 Dec 21:08
c86f938
Compare
Choose a tag to compare
3.0.0-alpha03 Pre-release
Pre-release
  • Added LocalStackAnimationProvider for configuring a default stack animation (#571 by @LionZXY)

The new LocalStackAnimationProvider

The new LocalStackAnimationProvider API allows configuring a default stack animation for Children and predictiveBackAnimation. Please see the updated docs.

Versions and dependencies

Kotlin: 1.9.21
Essenty: 2.0.0-alpha02
kotlinx-serialization: 1.6.2
JetBrains Compose: 1.6.0-alpha01

3.0.0-alpha02

12 Dec 23:45
Compare
Choose a tag to compare
3.0.0-alpha02 Pre-release
Pre-release
  • Support WebHistoryController on wasmJs by using serialization (#569)
  • Updated Essenty to 2.0.0-alpha02 (reduces the size of the saved state) (#572)

WebHistoryController on Wasm

This release adds WebHistoryController for wasmJs target. It is shared with js target and now relies on kotlinx-serialization. The WebHistoryController#attach method got a new argument (serializer: KSerializer<C>), which is a breaking change.

Versions and dependencies

Kotlin: 1.9.21
Essenty: 2.0.0-alpha02
kotlinx-serialization: 1.6.2
JetBrains Compose: 1.6.0-alpha01

3.0.0-alpha01

09 Dec 00:03
690b454
Compare
Choose a tag to compare
3.0.0-alpha01 Pre-release
Pre-release
  • Complete migration to kotlinx-serialization (#553)
  • Added support for the wasmJs target for browser (#564)
  • Renamed extensions-compose-jetbrains module to extensions-compose (#559)
  • Removed deprecated Value#subscribe and Value#unsubscribe methods (#554)
  • Renamed predictiveBackAnimation animation argument to fallbackAnimation (#555)
  • Added STARTED status to ChildNavState (#557)
  • Added API to discard saved state on Android (#558)

Multiplatform Compose Extensions

The extensions-compose-jetpack module is removed, the extensions-compose-jetbrains module is renamed to extensions-compose. Please update your dependencies accordingly and replace all com.arkivanov.decompose.extensions.compose.jetbrains.* imports with com.arkivanov.decompose.extensions.compose.*.

Compose for iOS, macOS and Web support

Starting with this release there is no need to use -compose-experimental version suffix. The support of Compose for iOS, macOS and Web is now published under the main version.

Compose for Wasm

Starting with this release Compose for Wasm (wasmJs target) is also supported.

Migration to kotlinx-serialization

This release completes the migration to kotlinx-serialization and removes the support of Parcelable/Parcelize. See the updated docs for more information.

Changes in ChildNavState

The ChildNavState.Status enum (Generic Navigation) has changed and now includes STARTED variant. Please see the updated docs.

Removal of Value subscribe and unsubscribe methods

Previously deprecated methods Value#subscribe and Value#unsubscribe are removed. The Value#observe method returning Cancellation is renamed to subscribe. The Value.observe(Lifecycle, ...) method is also renamed to subscribe.

API to discard saved state on Android

The defaultComponentContext function now accepts two new optional arguments:

  • discardSavedState - a flag indicating whether any previously saved state should be discarded or not, default value is false. Can be useful for handling deep links in onCreate, so that the navigation state is not restored and initial state from the deep link is applied instead.
  • isStateSavingAllowed - called before saving the state. When true then the state will be saved, otherwise it won't. Default value is true.

Versions and dependencies

Kotlin: 1.9.21
Essenty: 2.0.0-alpha01
kotlinx-serialization: 1.6.2
JetBrains Compose: 1.6.0-alpha01

2.2.1

08 Dec 23:58
Compare
Choose a tag to compare
  • Updated Kotlin to 1.9.21, Jetpack Compose compiler to 1.5.6, Multiplatform Compose to 1.5.11 (#539)

Versions and dependencies

Kotlin: 1.9.21
Essenty: 1.3.0
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.3

extensions-compose-jetpack

Jetpack Compose: 1.5.0
Jetpack Compose Compiler: 1.5.6

extensions-compose-jetbrains

JetBrains Compose: 1.5.11