Releases: slackhq/circuit
0.31.0
Breaking Changes:
Remove kotlinx-immutable dependency. With Compose's strong skipping mode, we no longer feel this is necessary.
Result delivery is now handled by NavigableCircuitContent via an internal AnsweringResultNavigator wrapper, and result handling APIs have been removed from BackStack and SaveableBackStack as this is now purely a navigation concern. This separates result handling concerns from the backstack implementation and provides better encapsulation.
The callback block in rememberAnsweringNavigator is no longer suspendable as it was never intended for any long running operations.
Behaviour Changes:
On iOS GestureNavigationDecorationFactory now uses IOSPredictiveBackNavDecorator instead of CupertinoGestureNavigationDecorator. This new decorator uses the Compose multi-platform PredictiveBackHandler to drive the back animation, instead of a custom swipe gesture or nested scroll.
The Navigator.resetRoot API is now using a StateOptions class to allow saving, restoring, and clearing of back stack state. The previous resetRoot function with saveState and restoreState booleans is available as an extension function.
Misc:
- Switched Compose uses to depend on Compose Multiplatform over Jetpack Compose
- Android minimum SDK is now
minSdk23 - Added saved state peek/remove to
Backstack - Fixed
Navigator.onNavEvent()not passing all arguments toresetRoot() - Fixes to
rememberCircuitNavigator()capturingonRootPopand not recreating if a new backstack was provided - Update Compose Multiplatform to
1.9.2. - Update to Kotlin
2.2.21. - Update to Molecule
2.2.0. - Build against KSP
2.2.20-2.0.4.
What's Changed
- Kotlin 2.2.10 by @ZacSweers in #2199
- fix(deps): update dependency androidx.core:core-ktx to v1.17.0 by @slack-oss-bot in #2245
- fix(deps): update dependency org.jsoup:jsoup to v1.21.2 by @slack-oss-bot in #2260
- fix(deps): update dependency com.jakewharton.mosaic:mosaic-runtime to v0.18.0 by @slack-oss-bot in #2256
- Create a common
PredictiveBackNavigationDecoratorby @stagg in #2262 - Fix z-index issue with
CupertinoGestureNavigationDecoratorby @stagg in #2251 - Add an iOS variant for the navigation sample by @stagg in #2270
- fix(deps): update agp to v8.13.0 by @slack-oss-bot in #2271
- Remove kotlinx-immutable by @ZacSweers in #2273
- Use navigable circuit content in star sample home by @ZacSweers in #2277
- Add
IOSPredictiveBackNavDecoratorby @stagg in #2278 - Compose 1.9 by @stagg in #2241
- Dependency cleanup by @stagg in #2317
- Fix codegen with screen objects to always use
ischeck by @simon-duchastel in #2307 - fix(deps): update dagger to v2.57.2 by @slack-oss-bot in #2320
- minSdk 23 by @stagg in #2322
- Fix minor typo in setup doc by @eboudrant in #2324
- Fix local emulator instrumentation tests by @stagg in #2325
- Update to Kotlin 2.2.20 by @ZacSweers in #2200
- Fix
onNavEventnot passing along all arguments to reset root by @stagg in #2334 - Fixes for
rememberCircuitNavigatorby @stagg in #2335 - fix(deps): update dependency me.saket.telephoto:zoomable-image-coil to v0.18.0 by @slack-oss-bot in #2336
- fix(deps): update ktor monorepo to v3.3.1 by @slack-oss-bot in #2346
- fix(deps): update ksp monorepo to v2.2.20-2.0.4 by @slack-oss-bot in #2341
- chore(deps): update dependency org.jetbrains.compose.hot-reload to v1.0.0-rc02 by @slack-oss-bot in #2348
- fix(deps): update dependency net.harawata:appdirs to v1.5.0 by @slack-oss-bot in #2351
- fix(deps): update okio to v3.16.2 by @slack-oss-bot in #2355
- Cleanup unused
CupertinoGestureNavigationDecoratorby @stagg in #2357 - fix(deps): update lifecycle.jb to v2.9.5 by @slack-oss-bot in #2353
- Add ability to remove saved state in
BackStackby @stagg in #2344 - fix(deps): update dependency org.jetbrains.compose.material3:material3 to v1.9.0 by @slack-oss-bot in #2354
- Use the old bool naming for the parameter reset roots by @stagg in #2360
- chore(deps): update plugin emulatorwtf to v0.19.4 by @slack-oss-bot in #2363
- Split result handling from
BackStackandSaveableBackStackby @stagg in #2367 - Remove suspend from the
rememberAnsweringNavigatorcallback by @stagg in #2372 - fix(deps): update kotlin monorepo to v2.2.21 by @slack-oss-bot in #2371
- Include backstack on the
NavigationInterceptor/NavigationEventListenermethods by @stagg in #2369 - chore(deps): update gradle to v9.2.0 by @slack-oss-bot in #2378
- fix(deps): update compose.jb to v1.9.2 by @slack-oss-bot in #2377
- fix(deps): update okhttp monorepo to v5.3.0 by @slack-oss-bot in #2380
- fix(deps): update roborazzi to v1.51.0 by @slack-oss-bot in #2383
- chore(deps): update plugin metro to v0.7.3 by @slack-oss-bot in #2362
New Contributors
- @simon-duchastel made their first contribution in #2307
Full Changelog: 0.30.0...0.31.0
0.30.0
Updates to ViewModelBackStackRecordLocalProvider
ViewModelBackStackRecordLocalProvider has moved from the backstack module to the circuit-foundation module while also changing to use the multiplatform ViewModel implementation. ViewModelBackStackRecordLocalProvider is now provided as a default through the Circuit instance, enabling customization of the default BackStackRecordLocalProviders.
Also added backStackHostViewModel() to access a ViewModel located in the ViewModelStoreOwner of NavigableCircuitContent.
Behaviour Changes:
- Rebuilt
continuityRetainedStateRegistryas a commonlifecycleRetainedStateRegistryand madeViewModelan implementation detail of it. AnimatedNavDecorationis now using the full back stack to determine the transition animation.
Misc:
- [gesture-navigation] Fix a crash when using
AndroidPredictiveBackNavDecoratorand having previously calledresetRoot()withrestoreState=false. - [code gen] Added support for
CircuitContextas an assisted param in code gen - Update dagger to
v2.57. - Update Compose Android BOM to
2025.07.00. - Update androidx.lifecycle to
2.9.2.
Special thanks to @CamiloVega and @kvaster for contributing to this release!
What's Changed
- fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-serialization-json-okio to v1.9.0 by @slack-oss-bot in #2169
- fix(deps): update okio to v3.14.0 by @slack-oss-bot in #2170
- chore(deps): update dependency mkdocs-material to v9.6.15 by @slack-oss-bot in #2172
- fix(deps): update okio to v3.15.0 by @slack-oss-bot in #2173
- fix(deps): update kct to v0.8.0 by @slack-oss-bot in #2174
- fix(deps): update okhttp monorepo to v5.0.0 by @slack-oss-bot in #2171
- fix(deps): update ktor monorepo to v3.2.1 by @slack-oss-bot in #2175
- chore(deps): update dependency gradle to v8.14.3 by @slack-oss-bot in #2176
- fix(deps): update roborazzi to v1.46.1 by @slack-oss-bot in #2180
- Handle duplicate IDs in animal bios by @ZacSweers in #2179
- Fix PetRepository caching by @ZacSweers in #2178
- Add compose hot reload to STAR sample by @ZacSweers in #2177
- fix(deps): update okhttp monorepo to v5.1.0 by @slack-oss-bot in #2182
- fix(deps): update dependency io.reactivex.rxjava3:rxjava to v3.1.11 by @slack-oss-bot in #2181
- chore(deps): update plugin binarycompatibilityvalidator to v0.18.1 by @slack-oss-bot in #2185
- fix(deps): update agp to v8.11.1 by @slack-oss-bot in #2186
- chore(deps): update dependency com.vanniktech.maven.publish to v0.34.0 by @slack-oss-bot in #2188
- fix(deps): update ktor monorepo to v3.2.2 by @slack-oss-bot in #2189
- chore(deps): update plugin metro to v0.5.0 by @slack-oss-bot in #2190
- chore(deps): update plugin emulatorwtf to v0.19.3 by @slack-oss-bot in #2192
- Rebuild "Continuity" as "Lifecycle" retained by @stagg in #2119
- chore(deps): update dependency org.jetbrains.compose.hot-reload to v1.0.0-beta04 by @slack-oss-bot in #2193
- fix(deps): update androidx.lifecycle to v2.9.2 by @slack-oss-bot in #2194
- fix(deps): update dependency androidx.compose:compose-bom to v2025.07.00 by @slack-oss-bot in #2196
- chore(deps): update plugin metro to v0.5.1 by @slack-oss-bot in #2198
- fix(deps): update dagger to v2.57 by @slack-oss-bot in #2195
- chore(deps): update plugin metro to v0.5.2 by @slack-oss-bot in #2201
- fix(deps): update coil to v3.3.0 by @slack-oss-bot in #2202
- Fix reset root crash when using the gesture navigation decoration by @stagg in #2206
- chore(deps): update dependency mkdocs-material to v9.6.16 by @slack-oss-bot in #2208
- Add support for CircuitContext in CodeGen by @CamiloVega in #2203
- Rework
ViewModelBackStackRecordLocalProviderby @stagg in #2207 - Bump local emulator running to match Star min sdk by @stagg in #2209
- chore(deps): update plugin metro to v0.5.3 by @slack-oss-bot in #2211
- Use full back stack to determine type of transition animation by @kvaster in #2104
- chore(deps): update dependency pymdown-extensions to v10.16.1 by @slack-oss-bot in #2210
- fix(deps): update ktor monorepo to v3.2.3 by @slack-oss-bot in #2212
- fix(deps): update okio to v3.16.0 by @slack-oss-bot in #2213
- fix(deps): update benchmark to v1.4.0 by @slack-oss-bot in #2214
- fix(deps): update dependency androidx.browser:browser to v1.9.0 by @slack-oss-bot in #2215
- fix(deps): update dependency androidx.test:monitor to v1.8.0 by @slack-oss-bot in #2216
- fix(deps): update dependency androidx.test.espresso:espresso-core to v3.7.0 by @slack-oss-bot in #2217
- fix(deps): update dependency androidx.test.ext:junit to v1.3.0 by @slack-oss-bot in #2218
- chore(deps): update dependency co.touchlab.skie to v0.10.5 by @slack-oss-bot in #2219
- fix(deps): update agp to v8.12.0 by @slack-oss-bot in #2220
New Contributors
- @CamiloVega made their first contribution in #2203
- @kvaster made their first contribution in #2104
Full Changelog: 0.29.1...0.30.0
0.29.1
- Fix
@AssistedFactorycode gen for Metro to use standard nested class semantics.
What's Changed
- Migrate STAR sample to Metro by @ZacSweers in #2168
Full Changelog: 0.29.0...0.29.1
0.29.0
- Update to Kotlin
2.2.0. - Update to KSP
2.2.0-2.0.2. - Support
@AssistedFactoryin code gen for Metro. - Add seekable transition support to
AnimatedOverlay. - Add predictive back support to
FullScreenOverlay. - Compile against Android SDK 36.
What's Changed
- fix(deps): update ksp monorepo to v2.1.21-2.0.2 by @slack-oss-bot in #2132
- chore(deps): update dependency fastlane to v2.228.0 by @slack-oss-bot in #2133
- fix(deps): update dependency app.cash.turbine:turbine to v1.2.1 by @slack-oss-bot in #2134
- fix(deps): update dependency org.jetbrains.kotlinx:atomicfu to v0.28.0 by @slack-oss-bot in #2135
- fix(deps): update okio to v3.13.0 by @slack-oss-bot in #2137
- fix(deps): update dependency com.facebook:ktfmt to v0.55 by @slack-oss-bot in #2139
- Add predictive back support to animated overlays by @stagg in #2138
- fix(deps): update dependency org.jetbrains.androidx.lifecycle:lifecycle-runtime-compose to v2.9.1 by @slack-oss-bot in #2141
- fix(deps): update compose.jb to v1.8.2 by @slack-oss-bot in #2140
- chore(deps): update dependency markdown to v3.8.1 by @slack-oss-bot in #2143
- fix(deps): update dependency androidx.compose.material:material to v1.8.3 by @slack-oss-bot in #2149
- fix(deps): update compose.ui to v1.8.3 by @slack-oss-bot in #2145
- fix(deps): update dependency androidx.compose:compose-bom to v2025.06.01 by @slack-oss-bot in #2146
- fix(deps): update dependency androidx.compose.animation:animation to v1.8.3 by @slack-oss-bot in #2147
- fix(deps): update roborazzi to v1.45.1 by @slack-oss-bot in #2142
- fix(deps): update dependency androidx.compose.foundation:foundation to v1.8.3 by @slack-oss-bot in #2148
- fix(deps): update compose.runtime to v1.8.3 by @slack-oss-bot in #2144
- Update Metro @assisted inject support by @aaalaniz in #2150
- chore(deps): update dependency markdown to v3.8.2 by @slack-oss-bot in #2151
- fix(deps): update dependency org.robolectric:robolectric to v4.15 by @slack-oss-bot in #2152
- chore(deps): update dependency pygments to v2.19.2 by @slack-oss-bot in #2154
- chore(deps): update dependency pymdown-extensions to v10.16 by @slack-oss-bot in #2155
- fix(deps): update dependency org.jsoup:jsoup to v1.21.1 by @slack-oss-bot in #2157
- chore(deps): update dependency com.vanniktech.maven.publish to v0.33.0 by @slack-oss-bot in #2156
- chore(deps): update dependency co.touchlab.skie to v0.10.4 by @slack-oss-bot in #2159
- fix(deps): update agp to v8.11.0 by @slack-oss-bot in #2161
- chore(deps): update plugin binarycompatibilityvalidator to v0.18.0 by @slack-oss-bot in #2160
- fix(deps): update dependency com.facebook:ktfmt to v0.56 by @slack-oss-bot in #2164
- Update to Kotlin 2.2.0 by @ZacSweers in #2105
- Update xcode version by @ZacSweers in #2166
- Compile against SDK 36 by @ZacSweers in #2062
New Contributors
Full Changelog: 0.28.1...0.29.0
0.28.1
Behaviour Changes:
Replacing rememberContinuityCanRetainChecker() with CanRetainChecker.Always, which changes the Android rememberRetained behaviour to retain based on the ViewModel lifecycle. This should fix rememberRetained not functioning as expected when used in a fragment. Previously rememberRetained would only retain if the Activity was in a configuration change.
Misc:
- Update to Kotlin
2.1.21. - Build against KSP
2.1.21-2.0.1. - Fix not being able to provide a custom ViewModel to
continuityRetainedStateRegistry() - Fix
rememberCircuitNavigatorandrememberInterceptingNavigatorreplaying a root pop at the same screen - Update Compose Android BOM to
2025.06.00. - Update Compose Android to
1.8.2. - Update to Compose Multiplatform to
1.8.1. - Update androidx.lifecycle to
2.9.1
What's Changed
- Update docs to reference circuitx navigation library by @MichaelEvans in #2095
- fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-collections-immutable to v0.4.0 by @slack-oss-bot in #2097
- Migrate away from deprecated dependencyProject APIs by @ZacSweers in #2100
- Update to Kotlin 2.1.20 by @ZacSweers in #1929
- fix(deps): update ksp monorepo to v2.1.21-2.0.1 by @slack-oss-bot in #2027
- Update
AndroidContinuityto work with a customViewModelby @stagg in #2090 - fix(deps): update compose.jb to v1.8.1 by @slack-oss-bot in #2106
- fix(deps): update compose.runtime to v1.8.2 by @slack-oss-bot in #2109
- Replace
rememberContinuityCanRetainChecker()withCanRetainChecker.Alwaysby @stagg in #2118 - fix(deps): update kotlininject.anvil to v0.1.6 by @slack-oss-bot in #2120
- fix(deps): update agp to v8.10.1 by @slack-oss-bot in #2123
- fix(deps): update androidx.lifecycle to v2.9.1 by @slack-oss-bot in #2127
- fix(deps): update dependency androidx.appcompat:appcompat to v1.7.1 by @slack-oss-bot in #2128
- fix(deps): update dependency androidx.compose:compose-bom to v2025.06.00 by @slack-oss-bot in #2129
- chore(deps): update dependency gradle to v8.14.2 by @slack-oss-bot in #2130
- Better
BackHandlerguarding of root pops by @stagg in #2131
New Contributors
- @MichaelEvans made their first contribution in #2095
Full Changelog: 0.28.0...0.28.1
0.28.0
Compose 1.8
This release updates to Compose 1.8 🎉
As part of this update the published jvmTarget has moved to 11 to match the upstream change.
Behaviour Changes
The Android version of rememberCircuitNavigator() that could handle back navigation was changed to delay the root Navigator.pop by a composition such that its BackHandler could be fully disabled first. This change fixed an issue where a root pop would not propagate to outer BackHandler's or OnBackPressedCallback's. With the addition of compose:ui-backhandler, this variant of rememberCircuitNavigator() was moved from the Android to the common circuit-foundation artifact.
New circuitx-navigation adding navigation interception capabilities
We've added a new navigation intercepting system to CircuitX that lets you hook into and modify navigation before it happens. The InterceptingNavigator sits before a regular Circuit Navigator, giving you a chance to inspect or change navigation events. With the NavigationInterceptor interface, you can handle goTo, pop, and resetRoot calls and decide if they should proceed, fail, be skipped, or be rewritten to navigate somewhere else. There's also aNavigationEventListener if you just want to know when navigation happens without changing it.
This new system is handy for advanced routing, blocking navigation, or tracking navigation events for analytics.
dependencies {
implementation("com.slack.circuit:circuitx-navigation:<version>")
}Docs: https://slackhq.github.io/circuit/circuitx/navigation
Misc:
- Fix the provided
Modifiernot being used inNavigatorDefaults.EmptyDecoration - [docs] Add more alternative state designs.
- [docs] Split up the Circuitx docs into sub pages
What's Changed
- Rename navigation sample by @stagg in #2041
- fix(deps): update dagger to v2.56.2 by @slack-oss-bot in #2039
- Split up the Circuitx docs into sub pages by @stagg in #2053
- fix(deps): update kotlininject to v0.8.0 by @slack-oss-bot in #2059
- Flesh out state docs more + different designs by @ZacSweers in #2061
- fix(deps): update dependency app.cash.molecule:molecule-runtime to v2.1.0 by @slack-oss-bot in #2034
- CircuitX Navigation by @stagg in #1669
- Circuitx Navigation doc page by @stagg in #2068
- Circuitx navigation tests by @stagg in #2067
- Compose 1.8 by @stagg in #2056
- Fix navigation BackHandler by @stagg in #2073
- fix(deps): update agp to v8.10.0 by @slack-oss-bot in #2074
- fix(deps): update compose.runtime to v1.8.1 by @slack-oss-bot in #2076
- fix(deps): update dependency androidx.compose:compose-bom to v2025.05.00 by @slack-oss-bot in #2083
- fix(deps): update androidx.lifecycle to v2.9.0 by @slack-oss-bot in #2082
- fix(deps): update kotlininject.anvil to v0.1.5 by @slack-oss-bot in #2084
Full Changelog: 0.27.1...0.28.0
0.27.1
- Fix: Crash caused by calling
resetRootwhile the sameScreenwas still in the composition - New: Added a sample app demonstrating bottom bar navigation
- [gesture-navigation] Update
AndroidPredictiveBackNavDecoratorto behave more like the Android predictive back motion spec - [gesture-navigation] Change the Compose Material dependency to not be exposed as an api
- Update compose-bom to
2025.04.00 - Update dagger to
2.56.1 - Update kotlinInject.anvil to
0.1.3 - Update kotlinx-coroutines to
1.10.2 - Update androidx.core to
1.16.0 - [samples] Update mosaic to
0.17.0
Special thanks to @OSemenovBoyarka and @asapha for contributing to this release!
What's Changed
- Use .toUri by @ZacSweers in #1992
- Fix reset root by @stagg in #1995
- Sample app for navigation bar and tests by @stagg in #2001
- Sample navbar follow up by @stagg in #2004
- Update roborazzi to v1.43.1 by @slack-oss-bot in #2008
- Updating
AndroidPredictiveBackNavDecoratorby @stagg in #2009 - Update agp to v8.9.1 by @slack-oss-bot in #2010
- Update dagger to v2.56.1 by @slack-oss-bot in #2011
- Update kotlinInject.anvil to v0.1.3 by @slack-oss-bot in #2023
- fix(gesture-navigation): hide material dependency as an implementation detail by @OSemenovBoyarka in #2019
- fix(deps): update kotlinx-coroutines monorepo to v1.10.2 by @slack-oss-bot in #2026
- Fix the activity-compose dependency by @asapha in #2024
- fix(deps): update dependency androidx.compose.material3:material3 to v1.3.2 by @slack-oss-bot in #2029
- fix(deps): update dependency androidx.compose:compose-bom to v2025.04.00 by @slack-oss-bot in #2030
- fix(deps): update dependency androidx.core:core-ktx to v1.16.0 by @slack-oss-bot in #2031
New Contributors
- @OSemenovBoyarka made their first contribution in #2019
- @asapha made their first contribution in #2024
Full Changelog: 0.27.0...0.27.1
0.27.0
Screen based animation overrides
We have added experimental support for animations based on the source/target screens and the type of navigation event. This can be accomplished with the the new AnimatedScreenTransform interface, allowing customization of the ContentTransform used when transitioning between screens. Having support for screen based animation overrides is especially important for use with shared element transitions, as it provides the ability to replace the transition before the shared elements are loaded.
See this PR for more details and example implementations. Please share feedback in this discussion.
Behaviour Changes
State retention logic was simplified by removing LocalCanRetainChecker with CanRetainChecker becoming an implementation detail of a RetainedStateRegistry. This potentially impacts uses of rememberRetained that depended on LocalCanRetainChecker as rememberRetained would use the composition local before using rememberCanRetainChecker. Also, as rememberCanRetainChecker was only needed for Continuity it has been renamed to rememberContinuityCanRetainChecker.
Fixes
Fixed a crash caused by calling resetRoot while NavigableCircuitContent was animating. This was commonly encountered in a bottom nav bar scenario while rapidly changing tabs and calling resetRoot. Prior to 0.26.0 this was resulting in state loss.
What's Changed
- [FIXED] 404 errors for video demo and css files by @hossain-khan in #1951
- Update agp to v8.8.1 by @slack-oss-bot in #1949
- Update dependency com.jakewharton.mosaic:mosaic-runtime to v0.16.0 by @slack-oss-bot in #1952
- Update dependency me.saket.telephoto:zoomable-image-coil to v0.15.1 by @slack-oss-bot in #1955
- Update roborazzi to v1.42.0 by @slack-oss-bot in #1954
- Add Missing Configuration Info on Readme by @ansehoon1999 in #1957
- Update dependency mkdocs-material to v9.6.5 by @slack-oss-bot in #1958
- Update dependency io.gitlab.arturbosch.detekt to v1.23.8 by @slack-oss-bot in #1960
- Add shared elements baseline profile by @ZacSweers in #1963
- Fix random unnecessary parens by @ZacSweers in #1962
- Update to JDK 23 by @ZacSweers in #1964
- Fix reset root crash by @stagg in #1965
- Update dependency com.android.tools:desugar_jdk_libs to v2.1.5 by @slack-oss-bot in #1967
- Update agp to v8.8.2 by @slack-oss-bot in #1970
- Update roborazzi to v1.43.0 by @slack-oss-bot in #1975
- Update ktor monorepo to v3.1.1 by @slack-oss-bot in #1966
- Update dependency net.harawata:appdirs to v1.4.0 by @slack-oss-bot in #1974
- Update ksp monorepo to v2.1.10-1.0.31 by @slack-oss-bot in #1976
- Update androidx.activity to v1.10.1 by @slack-oss-bot in #1971
- Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.1 by @slack-oss-bot in #1972
- Update dependency androidx.datastore:datastore-preferences to v1.1.3 by @slack-oss-bot in #1973
- Update kotlinpoet to v2.1.0 by @slack-oss-bot in #1969
- Update dependency gradle to v8.13 by @slack-oss-bot in #1968
- Proposal for modifying CanRetainChecker to apply exclusively to RetainedStateRegistry by @vulpeszerda in #1934
- Screen based animation overrides by @stagg in #1901
- Make assisted injection detection more robust in code gen by @ZacSweers in #1979
- Add regression test for parameter order by @ZacSweers in #1981
- Docs - Shared element updates by @stagg in #1978
New Contributors
- @ansehoon1999 made their first contribution in #1957
Full Changelog: 0.26.1...0.27.0
0.26.1
- Fix crash on right side back gesture.
- Update
CupertinoGestureNavigationDecorationto be aAnimatedNavDecorator. - Fix value restoration after
removeStatecall inRetainedStateHolder. - Update Android compose artifacts to
1.7.8. - [docs] Add tutorial for how to use Circuit shared elements.
- [docs] Added basic reference guide on deep-linking using circuit for Android platform.
Special thanks to @vulpeszerda for contributing to this release!
What's Changed
- Update dependency mkdocs-material to v9.6.3 by @slack-oss-bot in #1925
- Update dependency com.github.ajalt.clikt:clikt to v5.0.3 by @slack-oss-bot in #1928
- Fix crash on right side back gesture by @stagg in #1935
- [📖 User Guide] Added basic reference guide on deep-linking using circuit for Android platform. by @hossain-khan in #1926
- Add tutorial for how to use Circuit shared elements by @stagg in #1936
- Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.6.2 by @slack-oss-bot in #1932
- Update roborazzi to v1.41.0 by @slack-oss-bot in #1933
- Add Metro code gen support by @ZacSweers in #1937
- Update ktor monorepo to v3.1.0 by @slack-oss-bot in #1938
- Update compose.material to v1.7.8 by @slack-oss-bot in #1941
- Update compose.runtime to v1.7.8 by @slack-oss-bot in #1942
- Update dependency androidx.compose.animation:animation to v1.7.8 by @slack-oss-bot in #1944
- Update dependency mkdocs-material to v9.6.4 by @slack-oss-bot in #1946
- Update roborazzi to v1.41.1 by @slack-oss-bot in #1947
- Update dependency androidx.compose:compose-bom to v2025.02.00 by @slack-oss-bot in #1948
- Fix value restoration after
removeStatecall inRetainedStateHolderby @vulpeszerda in #1931 - Update
CupertinoGestureNavigationDecorationto be aAnimatedNavDecoratorby @stagg in #1939 - Update dependency androidx.compose.foundation:foundation to v1.7.8 by @slack-oss-bot in #1945
- Update compose.ui to v1.7.8 by @slack-oss-bot in #1943
Full Changelog: 0.26.0...0.26.1
0.26.0
Happy new year!
Shared Elements API!
After a lot of iteration and work, this release adds support for Compose's new shared elements APIs.
These are still experimental and subject to change, both in Circuit and the underlying Compose APIs.
See this PR for full details as well as sample integrations: #1550. Please share feedback in this discussion. More formal docs to come as well, we'll publish updates there!
For now, the easiest way to support shared element transitions is to wrap your content with a SharedElementTransitionLayout.
CircuitCompositionLocals(circuit) {
SharedElementTransitionLayout {
NavigableCircuitContent(
navigator = navigator,
backStack = backStack,
)
}
}SharedElementTransitionLayout creates and provides a SharedElementTransitionScope to content within it, and in turn exposes a SharedTransitionScope for use with standard compose shared elements/bounds animations. This is supported in NavigableCircuitContent and overlays.
There is also a PreviewSharedElementTransitionLayout for help with Compose previews.
Behaviour Changes: rememberRetained
Previously, rememberRetained could sometimes restore values when a composable was re-added, depending on whether its parent RetainedStateRegistry had been saved (#1783).
Now, rememberRetained aligns with remember and rememberSaveable: if a composable is removed and later re-added, its value will not be restored unless it is explicitly saved and then restored via the registry.
Update rememberRetained to allow CanRetainChecker to be updated in place.
Behaviour Change: RetainedStateRegistry
saveAllnow returns the saved values.RetainedStateRegistry.Entry.unregisternow returns whether the unsaved valueProvider was actually removed.saveAllandsaveValuenow skip storing child values whenCanRetainCheckerreturnsfalse.
New: RetainedStateHolder
Similar to SaveableStateHolder, RetainedStateHolder provides a mechanism to maintain separate RetainedStateRegistry entries for specific keys. This allows saving the state defined with rememberRetained for a subtree before it is disposed, so that the subtree can later be recomposed with its state restored.
val retainedStateHolder = rememberRetainedStateHolder()
var currentTab by remember { mutableStateOf(TabA) }
retainedStateHolder.RetainedStateProvider(key = currentTab.name) {
// rememberRetained values in tab content are preserved across tab switches
when (currentTab) {
TabA -> {
TabAContent()
}
TabB -> {
TabBContent()
}
TabC -> {
TabCContent()
}
}
}Implementation Changes: NavigableCircuitContent
- The approach of managing a separate
RetainedStateRegistryfor each record has been changed to useRetainedStateHolderinstead. - Change
SaveableStateHolderto release saved states of removed records.
Misc
- Fixe an issue causing codegen to fail for class @Inject annotations.
- Compile against Android SDK 35.
- Update Compose Android BOM to
2025.01.01. - Update to androidx.annotation
1.9.1. - Update to androidx.activity
1.10.0. - Update to Compose Android
1.7.7. - Update to Compose Multiplatform
1.7.3. - Update to Kotlin
1.9.10. - [code gen] Update to KSP
1.9.10-1.0.29. - [code gen] Update to Dagger
2.55. - [code gen] Update to KotlinPoet
2.0.0. - [code gen] Build against Anvil-KSP
0.4.1. Should still be compatible with square/anvil as well. - [code gen] Build against kotlin-inject-anvil
0.1.2. Should still be compatible with square/anvil as well. - [samples] Update mosaic + modernize mosaic counter sample to fully use effects.
- [docs] Fix variable casing in Navigation documentation example.
Special thanks to @vulpeszerda, @rharter, @alexvanyo, and @easyhooon for contributing to this release!
What's Changed
- Update dependency mkdocs-macros-plugin to v1.3.7 by @slack-oss-bot in #1756
- Update coil3 to v3.0.0-rc02 by @slack-oss-bot in #1757
- Update ktor monorepo to v3.0.1 by @slack-oss-bot in #1759
- Update dependency pymdown-extensions to v10.12 by @slack-oss-bot in #1758
- Update androidx.lifecycle to v2.8.7 by @slack-oss-bot in #1761
- Update compose.material to v1.7.5 by @slack-oss-bot in #1762
- Update compose.runtime to v1.7.5 by @slack-oss-bot in #1763
- Update dependency androidx.annotation:annotation to v1.9.1 by @slack-oss-bot in #1765
- Update dependency androidx.compose.foundation:foundation to v1.7.5 by @slack-oss-bot in #1767
- Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0 by @slack-oss-bot in #1772
- Update anvil to v0.4.0 by @slack-oss-bot in #1773
- Update dependency androidx.compose.material3:material3 to v1.3.1 by @slack-oss-bot in #1769
- Update dependency mkdocs-material to v9.5.43 by @slack-oss-bot in #1771
- Update dependency androidx.compose.animation:animation to v1.7.5 by @slack-oss-bot in #1766
- Update dependency androidx.compose:compose-bom to v2024.10.01 by @slack-oss-bot in #1770
- Update agp to v8.7.2 by @slack-oss-bot in #1768
- Update compose.ui to v1.7.5 by @slack-oss-bot in #1764
- Update dependency androidx.core:core-ktx to v1.15.0 by @slack-oss-bot in #1774
- Update dependency com.facebook:ktfmt to v0.53 by @slack-oss-bot in #1775
- Update dependency com.fleeksoft.ksoup:ksoup-ktor2 to v0.2.0 by @slack-oss-bot in #1776
- Update roborazzi to v1.30.1 by @slack-oss-bot in #1777
- Update kotlinInject.anvil to v0.1.0 by @slack-oss-bot in #1780
- Update coil3 to v3.0.0 by @slack-oss-bot in #1779
- Update dependency mkdocs-material to v9.5.44 by @slack-oss-bot in #1781
- Update roborazzi to v1.32.1 by @slack-oss-bot in #1782
- Update coil3 to v3.0.1 by @slack-oss-bot in #1784
- Update dependency app.cash.paparazzi to v1.3.5 by @slack-oss-bot in #1786
- Update dependency com.android.tools:desugar_jdk_libs to v2.1.3 by @slack-oss-bot in #1787
- Update roborazzi to v1.32.2 by @slack-oss-bot in #1788
- Update coil3 to v3.0.2 by @slack-oss-bot in #1789
- Update kct to v0.6.0 by @slack-oss-bot in #1793
- Update dependency gradle to v8.11 by @slack-oss-bot in #1792
- Update ksp to v2.0.21-1.0.27 by @slack-oss-bot in #1753
- Update compose.jb to v1.7.1 by @slack-oss-bot in #1795
- Update dependency androidx.compose:compose-bom to v2024.11.00 by @slack-oss-bot in #1798
- Update dependency me.saket.telephoto:zoomable-image-coil to v0.14.0 by @slack-oss-bot in #1799
- Update kotlinpoet to v2 (major) by @slack-oss-bot in #1754
- Introduce kotlin binary compatibility checker by @ZacSweers in #1800
- Update coil3 to v3.0.3 by @slack-oss-bot in #1802
- Update ksp to v2.0.21-1.0.28 by @slack-oss-bot in #1804
- Update plugin emulatorWtf to v0.18.1 by @slack-oss-bot in #1806
- Update dependency org.robolectric:robolectric to v4.14 by @slack-oss-bot in #1803
- Fixes issue causing codegen to fail for class
@Injectannotations. by @rharter in #1807 - Update dependency gradle to v8.11.1 by @slack-oss-bot in #1808
- Update dependency mkdocs-material to v9.5.45 by @slack-oss-bot in #1809
- Update dependency org.robolectric:robolectric to v4.14.1 by @slack-oss-bot in #1810
- Remove coil 2 by @ZacSweers in #1811
- Enable configuration cache sharing on CI by @ZacSweers in #1812
- Update dependency tornado to v6.4.2 by @slack-oss-bot in #1813
- Update kotlinInject.anvil to v0.1.1 by @slack-oss-bot in #1814
- Update roborazzi to v1.33.0 by @slack-oss-bot in #1815
- Update roborazzi to v1.34.0 by @slack-oss-bot in #1816
- Update dependency mkdocs-material to v9.5.46 by @slack-oss-bot in #1819
- Update dependency io.reactivex.rxjava3:rxjava to v3.1.10 by @slack-oss-bot in https://github.com/slack...