- Fix that
rememberBackstack()keys did not fully consideridas a change. (fixes #33) - Fix that
SaveBackstackStatefunction was not prepared for multipleidparameters, as despite there being a ViewModelStore for each Backstack, there's no separate SaveableStateRegistry (possibly related to #23, which was never implemented).
- Add
parentServices: Backstack?andparentScopeTag: String?parameters toComposeNavigatorInitializer. This should allow nested hierarchical service lookups.
This is available through both rememberBackstack and ComposeNavigator.
- Use
simple-stack 2.9.0andsimple-stack-extensions 2.3.4.
-
Use
simple-stack 2.8.0andsimple-stack-extensions 2.3.3. -
Update Compose to 1.4.3 and Kotlin to 1.8.22.
-
Update underlying AndroidX dependencies.
-
Use
simple-stack-extensions 2.3.2. -
ADD:
rememberServiceFrom(scopeTag, ...)andrememberServiceFrom(scopeKey, ...).
- ADDED NEW MAJOR FEATURE (added by @matejdro): Support for
Backstackmanaged by Compose.
This allows Backstack to be created at any arbitrary nesting level within composables, including nested stacks.
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
ComposeNavigator {
createBackstack(
History.of(InitialKey()),
scopedServices = DefaultServiceProvider()
)
}
}
}
}Nesting it like so
Box(
Modifier
.weight(1f)
.fillMaxWidth()
.padding(bottom = 8.dp),
propagateMinConstraints = true
) {
ComposeNavigator(id = "TOP", interceptBackButton = false) {
createBackstack(
History.of(FirstNestedKey()),
scopedServices = DefaultServiceProvider()
)
}
}and
Box(
Modifier
.weight(1f)
.fillMaxWidth()
.padding(bottom = 8.dp),
propagateMinConstraints = true
) {
ComposeNavigator(id = "BOTTOM", interceptBackButton = false) {
createBackstack(
History.of(FirstNestedKey()),
scopedServices = DefaultServiceProvider()
)
}
}- UPDATE: simple-stack to 2.7.0, simple-stack-extensions 2.3.0.
-
BREAKING CHANGE (recommended by @matejdro):
DefaultComposeKey.RenderComposable()no longer receives aModifier. This parameter was completely pointless, and a possible source of bugs. -
BREAKING CHANGE (recommended by @matejdro): The signature of
AnimationConfigurationand specificallyComposableTransitionhas changed, and no longer receivesfullWidthandfullHeight. This info can be accessed usingModifier.drawWithContent {}and is readily available. Also,ComposableTransitionnow receivesanimationProgressas aState<Float>, and not aFloat. UsingFloatdirectly results in excessive recompositions during animation, and is bad for performance, therefore this value must be passed lazily. This is effectively a fix for a long-lasting design issue in how animation progress had been handled, created before recomposition-related best practices on deferred read were documented. -
CHANGE (required for new features):
corenow has anapidependency onandroidx.lifecycle:lifecycle-viewmodel-compose:2.5.1to supportLocalLifecycleOwner/LocalViewModelStoreOwnerper screen. -
NEW FEATURE (added by @matejdro):
corenow supports creating aLocalLifecycleOwner/LocalViewModelStoreOwnerper screen, this change is automatically applied by updating. Please note that this means from now on, AndroidX components scope themselves to the screen, and not the Activity. If you relied on the nearestLocalViewModelStoreOwnerto be theActivity, then this is no longer the case (although in most cases, using Activity-scoped ViewModels for parameter passing typically results in stale state not being reset, and is a common source of bugs.) -
NEW FEATURE:
DefaultComposeKeynow has aopen val modifier: Modifier = Modifierwhich is passed to theScreenComposable. -
UPDATE: compileSdk 33.
-
UPDATE: simple-stack to 2.6.5, simple-stack-extensions 2.2.5.
-
UPDATE: Kotlin to 1.8.10.
-
UPDATE: Compose library versions to BOM 2023.01.00.
-
UPDATE: Compose Compiler to 1.4.3.
-
UPDATE: simple-stack to 2.6.4.
-
UPDATE: Compose to 1.1.1.
-
UPDATE: Kotlin to 1.6.10.
-
Moved to
maven-publish, ensure that sources-jar gets added.
-
UPDATE: Compose to 1.0.4.
-
UPDATE: Kotlin to 1.5.31.
-
UPDATE: Compose to 1.0.3.
-
UPDATE: Kotlin to 1.5.30.
-
UPDATE: Compose to 1.0.1.
-
UPDATE: Kotlin to 1.5.21.
(Kotlin version is still 1.5.10 as expected by 1.0.0)
- UPDATE: Compose to 1.0.0.
(Kotlin version is still 1.5.10 as expected by 1.0.0)
- UPDATE: Compose to 1.0.0-rc02.
(Kotlin version is still 1.5.10 as expected by 1.0.0-rc02)
-
BREAKING CHANGE: Separate
AnimationSpecfrom the global transition definition. This allows for different animation specs for different screen transitions. -
BREAKING CHANGE: Kill
AnimationConfiguration.CustomComposableTransitions. The twoComposableTransitions are now top-level property ofAnimationConfigurationalong withComposableAnimationSpec. -
ADD:
AnimationConfiguration.ComposableContentWrapper, which is a block around the animated content that can be customized. -
UPDATE: Compose to 1.0.0-rc01.
- INTERNAL/FIX: Change usage of
LaunchedEffecttoDisposableEffectin ComposeStateChanger. This should potentially fix the elusive issue #7.
-
No significant changes.
-
Update Compose to 1.0.0-beta09.
-
No significant changes.
-
Update simple-stack to 2.6.2.
-
Update Compose to 1.0.0-beta08.
-
Update Kotlin to 1.5.10.
- Update Compose to 1.0.0-beta07.
-
Remove
SimpleComposeStateChangerbecause new Compose version killed it for some reason. -
Renamed
AnimatingComposeStateChangertoComposeStateChanger. It is used withAsyncStateChanger. -
Update Jetpack Compose to beta06.
-
Update Simple-Stack to 2.6.1.
-
Update Simple-Stack Extensions to 2.2.1.
- Actually fix Saver :)
- API CHANGE:
DefaultComposeKeynow requires asaveableStateProviderKeythat isAny. The examples returnthisbecause keys are already immutable and Parcelable (and data class).
Note: Saver should work, but it does not seem to work yet.
-
API CHANGE: simplified transition configuration. Now it's a single interface (
ComposableTransition). -
FIX: Flickering on navigation. (However, CoilImage still flickers.)
Note: Saver still does not work yet.
- API CHANGE:
ComposeStateChanger->AnimatingComposeStateChanger, must be wrapped asAsyncStateChanger.
Please note that it is still flickering and you probably don't want to use it yet.
-
ADD:
SimpleComposeStateChanger, must be wrapped asSimpleStateChanger, without animations. -
API CHANGE: Add
fullHeighttoAnimatingComposeStateChanger's transition configuration, because it was missing. -
ADD:
simple-stack-compose-dog-example.
-
Initial release (built against simple-stack 2.5.0, simple-stack-extensions 2.1.0, Compose 1.0.0-beta01).
-
Known issue: on forward -> back -> forward animation, the new key's composable seems to flicker in at the start of animation for some reason.