-
-
Notifications
You must be signed in to change notification settings - Fork 19
Update circuit to v0.32.0 #309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
modern
Choose a base branch
from
renovate/circuit
base: modern
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generated by 🚫 Danger Kotlin against 6a43bbe |
b52bf06 to
f5b4b4f
Compare
f5b4b4f to
ca39858
Compare
0fce516 to
f1f8a33
Compare
501e13f to
255d46d
Compare
2bbc0cb to
7c279db
Compare
c3aabc8 to
71df052
Compare
205a202 to
6bab46f
Compare
a45656e to
d2c3b72
Compare
d2c3b72 to
d596852
Compare
d596852 to
ea6ee05
Compare
ea6ee05 to
e5b35c7
Compare
e5b35c7 to
d88d017
Compare
d88d017 to
463b137
Compare
463b137 to
75e5a7e
Compare
75e5a7e to
5aec545
Compare
5aec545 to
fe7bc76
Compare
fe7bc76 to
6a43bbe
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.20.0→0.32.00.20.0→0.32.00.20.0→0.32.00.20.0→0.32.00.20.0→0.32.0Release Notes
slackhq/circuit (com.slack.circuit:circuitx-gesture-navigation)
v0.32.0Compare Source
2026-01-13
Enhancements
produceAndCollectAsRetainedStatethat produces and collects values from aFlow.Changes
2.3.0.1.10.0.BackHandleruses now depend onorg.jetbrains.androidx.navigationevent.Code-gen
@Originannotations for kotlin-inject-anvil and Metro code gen.jakarta.injecttypes for Dagger/Anvil code gen. This should have no source-breaking changes to users since this only affected generated code, but note that the square/anvil implementation may not support this in factory generation (the KSP fork does). If you need to only use javax annotations, use thecircuit.codegen.useJavaxOnly=trueKSP option.kotlin-injectAnvil codegen mode.Contributors
Special thanks to the following contributors for contributing to this release!
v0.31.0Compare Source
2025-11-04
Breaking Changes:
Remove
kotlinx-immutabledependency. With Compose's strong skipping mode, we no longer feel this is necessary.Result delivery is now handled by
NavigableCircuitContentvia an internalAnsweringResultNavigatorwrapper, and resulthandling APIs have been removed from
BackStackandSaveableBackStackas this is now purely a navigation concern. Thisseparates result handling concerns from the backstack implementation and provides better encapsulation.
The callback block in
rememberAnsweringNavigatoris no longer suspendable as it was never intended for any long running operations.Behaviour Changes:
On iOS
GestureNavigationDecorationFactorynow usesIOSPredictiveBackNavDecoratorinstead ofCupertinoGestureNavigationDecorator.This new decorator uses the Compose multiplatform
PredictiveBackHandlerto drive the back animation, instead of a swipeable gesture or nested scroll.The
Navigator.resetRootAPI is now using aStateOptionsclass to allow saving, restoring, andclearing of back stack state. The previous
resetRootfunction withsaveStateandrestoreStatebooleans is available as an extension function.Misc:
minSdk23BackstackNavigator.onNavEvent()not passing all arguments toresetRoot()rememberCircuitNavigator()capturingonRootPopand not recreating if a new backstack was provided1.9.2.2.2.21.2.2.0.2.2.20-2.0.4.Special thanks to @simon-duchastel and @eboudrant for contributing to this release!
v0.30.0Compare Source
2025-08-01
Behaviour Changes:
Rebuilt
continuityRetainedStateRegistryas a commonlifecycleRetainedStateRegistryand madeViewModelan implementation detail of it.AnimatedNavDecorationis now using the full back stack to determine the transition animation.Updates to
ViewModelBackStackRecordLocalProviderViewModelBackStackRecordLocalProviderhas moved from thebackstackmodule to thecircuit-foundationmodule while also changing to use the multiplatformViewModelimplementation.ViewModelBackStackRecordLocalProvideris now provided as a default through the Circuit instance,enabling customization of the default
BackStackRecordLocalProviders.Also added
backStackHostViewModel()to access aViewModellocated in theViewModelStoreOwnerofNavigableCircuitContent.Misc:
AndroidPredictiveBackNavDecoratorand having previously calledresetRoot()withrestoreState=false.CircuitContextas an assisted param in code genv2.57.2025.07.00.2.9.2.Special thanks to @CamiloVega and @kvaster for contributing to this release!
v0.29.1Compare Source
2025-06-30
@AssistedFactorycode gen for Metro to use standard nested class semantics.v0.29.0Compare Source
2025-06-26
2.2.0.2.2.0-2.0.2.@AssistedFactoryin code gen for Metro.AnimatedOverlay.FullScreenOverlay.v0.28.1Compare Source
2025-06-09
Behaviour Changes:
Replacing
rememberContinuityCanRetainChecker()withCanRetainChecker.Always, which changes theAndroid
rememberRetainedbehaviour to retain based on theViewModellifecycle. This should fixrememberRetainednot functioning as expected when used in a fragment. PreviouslyrememberRetainedwould only retain if the Activity was in a configuration change.
Misc:
2.1.21.2.1.21-2.0.1.continuityRetainedStateRegistry()rememberCircuitNavigatorandrememberInterceptingNavigatorreplaying a root pop at the same screen2025.06.00.1.8.2.1.8.1.2.9.1v0.28.0Compare Source
2025-05-12
New: circuitx-navigation adding navigation interception capabilities:
We've added a new navigation intercepting system to Circuit that lets you hook into and modify
navigation before it happens. The
InterceptingNavigatorsits before a regular CircuitNavigator,giving you a chance to inspect or change navigation events. With the
NavigationInterceptorinterface, you can handle
goTo,pop, andresetRootcalls and decide if they should proceed,fail, be skipped, or be rewritten to navigate somewhere else. There's also a
NavigationEventListenerif 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:
Modifiernot being used inNavigatorDefaults.EmptyDecorationrememberCircuitNavigator()not being able to propagate the root pop as itsBackHandlerwas still activerememberCircuitNavigator()that uses aBackHandlerto triggerNavigator.popcalls2025.05.00.1.8.1.1.8.0.112.1.0v0.27.1Compare Source
2025-04-14
resetRootwhile the sameScreenwas still in the compositionAndroidPredictiveBackNavDecoratorto behave more like the Android predictive back motion spec2025.04.002.56.10.1.31.10.21.16.00.17.0Special thanks to @OSemenovBoyarka and @asapha for contributing to this release!
v0.27.0Compare Source
2025-02-28
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
AnimatedScreenTransforminterface, allowing customization of theContentTransformused 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, withCanRetainCheckerbecoming an implementation detail of aRetainedStateRegistry.This potentially impacts uses of
rememberRetainedthat depended onLocalCanRetainChecker, asrememberRetainedwould use the composition local before usingrememberCanRetainChecker. Also, asrememberCanRetainCheckerwas only needed forContinuityit has been renamed torememberContinuityCanRetainChecker.Misc:
resetRootwhileNavigableCircuitContentwas animating.v1.10.1.2.1.10-1.0.31.2.1.0.0.16.0Special thanks to @vulpeszerda for contributing to this release!
v0.26.1Compare Source
2025-02-13
CupertinoGestureNavigationDecorationto be aAnimatedNavDecorator.removeStatecall inRetainedStateHolder.1.7.8.Special thanks to @vulpeszerda for contributing to this release!
v0.26.0Compare Source
2025-02-06
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.SharedElementTransitionLayoutcreates and provides aSharedElementTransitionScopeto content within it, and in turn exposes aSharedTransitionScopefor use with standard compose shared elements/bounds animations. This is supported inNavigableCircuitContentand overlays.There is also a
PreviewSharedElementTransitionLayoutfor help with Compose previews.Behaviour Changes:
rememberRetainedPreviously,
rememberRetainedcould sometimes restore values when a composable was re-added, depending on whether its parentRetainedStateRegistryhad been saved (#1783).Now,
rememberRetainedaligns withrememberandrememberSaveable: 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:
RetainedStateRegistrysaveAllnow returns the saved values.RetainedStateRegistry.Entry.unregisternow returns whether the unsaved valueProvider was actually removed.saveAllandsaveValuenow skip storing child values whenCanRetainCheckerreturnsfalse.New:
RetainedStateHolderSimilar to
SaveableStateHolder,RetainedStateHolderprovides a mechanism to maintain separateRetainedStateRegistryentries for specific keys. This allows saving the state defined withrememberRetainedfor a subtree before it is disposed, so that the subtree can later be recomposed with its state restored.Implementation Changes:
NavigableCircuitContentRetainedStateRegistryfor each record has been changed to useRetainedStateHolderinstead.SaveableStateHolderto release saved states of removed records.Misc
2025.01.01.1.9.1.1.10.0.1.7.7.1.7.3.1.9.10.1.9.10-1.0.29.2.55.2.0.0.0.4.1. Should still be compatible with square/anvil as well.0.1.2. Should still be compatible with square/anvil as well.Special thanks to @vulpeszerda, @rharter, @alexvanyo, and @easyhooon for contributing to this release!
v0.25.0Compare Source
2024-10-23
tonalElevationtoBottomSheetOverlayso that is reflected inModalBottomSheet.-dontwarnon Anvil classes from codegen annotations.0.0.5.1.9.3.2.8.6.2.0.21.2.0.21-1.0.25.1.2.0.1.7.4.1.7.0.Special thanks to @eboudrant, @bidrohi, @hossain-khan, and @dturner for contributing to this release!
v0.24.0Compare Source
2024-09-16
presenterTestOf()andPresenter.test()functions now return a newCircuitReceiveTurbineinterface. This interface slightly but importantly modifies the behavior ofawaitItem()by making it only emit changed items rather than every item. If you do want to assert the equivalent state is emitted across recompositions, you can useawaitUnchanged().LocalBackStackto public API.awaitItem(), you may need to update tests that previously assumed duplicate emissions.2.0.20.Uuid. This release now requires Kotlin2.0.20or later.rememberAnsweringNavigatorresult handling.1.9.0.2024.09.01.0.3.8.1.9.2.2.8.5.2.0.20.2.0.20-1.0.25.v0.23.1Compare Source
2024-07-30
NoOpRetainedStateRegistryto public API for use in testing and previews.CircuitPreviewhelper function for composable previews that contain Circuit content.LocalInspectionMode, Circuit's defaultonUnavailableContentnow shows a simpler non-intrusive placeholder UI instead.BottomSheetOverlaycrash when invoking back-press.2.0.10.1.8.2.2.0.10-1.0.24.v0.23.0Compare Source
2024-07-30
pausableState#1455.OverlayHost.showFullScreenOverlaynow returns thePopResult?that was popped by the screen.backstackdependency fromcircuit-runtime. It was unnecessary and also accidentally imposed Compose UI on the runtime/presenter artifacts.Overlayafun interface.OverlayEffectto use a newOverlayScopeAPI that implements bothCoroutineScopeandOverlayHost, making both contexts available in the lambda.2.0.0-1.0.24.1.9.1.2.8.4.1.8.1.1.18.1.1.6.11.Special thanks to @aschulz90 and @chrisbanes for contributing to this release!
v0.22.2Compare Source
2024-06-04
pausableStaterecomposition loops by avoiding backward snapshot writes.Circuit.presentWithLifecycleflag to enable/disable automaticpausableStateuse. This is enabled by default.1.6.11.2.8.1.1.7.0.Special thanks to @chrisbanes, @adamp, and Chuck Jazdzewski for contributing to this release and helping us find a runtime fix for the
pausableStateissue!v0.22.1Compare Source
2024-05-28
rememberRetainedimplicitly requiringLocalContextwhere it used to no-op.2.0.0.v0.22.0Compare Source
2024-05-28
2.0.0.2.0.0-1.0.21.1.6.10.This release is otherwise identical to
0.21.0, just updated to Kotlin 2.0.v0.21.2Compare Source
pausableStaterecomposition loops by avoiding backward snapshot writes.Circuit.presentWithLifecycleflag to enable/disable automaticpausableStateuse. This is enabled by default.Full Changelog: slackhq/circuit@0.21.1...0.21.2
v0.21.1Compare Source
rememberRetainedimplicitly requiringLocalContextwhere it used to no-op (#1438)What's Changed
rememberRetainedif theLocalRetainedStateRegistryisn't set by @stagg in #1438Full Changelog: slackhq/circuit@0.21.0...0.21.1
v0.21.0Compare Source
2024-05-28
FakeNavigatorfunctions to check for the lack of pop/resetRoot events.FakeNavigatorconstructor param to add additional screens to the backstack.StaticScreeninterface. When aStaticScreenis used, Circuit will internally allow the UI to run on its own and won't connect it to a presenter if no presenter is provided.RecordLifecycleandLocalRecordLifecyclecomposition local, allowing UIs and presenters to observe when they are 'active'. Currently, a record is considered 'active' when it is the top record on the back stack.rememberRetainedSaveablevariant that participates in bothRetainedStateRegistryandSaveableStateRegistryrestoration, allowing layered state persistence.rememberRetainedSaveableentering composition:RetainedStateRegistryandSaveableStateRegistry, if availablerememberRetainedthat explicitly requires aSaverparameter.CircuitUiStatewhen they are not active. Presenters can opt-out of this behavior by implementingNonPausablePresenter.NavigatorImpl.goTono longer navigates if theScreenis equal toNavigator.peek().Presenter.presentis now annotated with@ComposableTarget("presenter"). This helps prevent use of Compose UI in the presentation logic as the compiler will emit a warning if you do. Note this does not appear in the IDE, so it's recommended to useallWarningsAsErrorsto fail the build on this event.Navigator.goTo()calls to the same current screen.Navigator.goTonow returns a Bool indicating navigation success.GestureNavigationDecorationimpl tocommonMainand rename toCupertinoGestureNavigationDecoration.1.8in core libraries.FakeNavigator.assertIsEmptyandexpectNoEvents(use the specific event type methods instead)Presenter.Factoryas@Stable.Ui.Factoryas@Stable.CircuitContextas@Stable.EventListeneras@Stable.EventListener.Factoryas@Stable.1.9.24.1.9.24-2.0.20.1.5.14.1.17.0.2.8.0.1.4.3.1.8.0.1.8.1.1.6.2.1.6.7.1.6.7.1.6.7.1.6.7.1.13.1.1.9.0.2.51.1.0.8.4.Special thanks to @chrisbanes, @alexvanyo, @eboudrant, @edenman, and @JustinBis for contributing to this release!
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.