Update circuit to v0.28.0 - autoclosed #280
Closed
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.25.0->0.28.00.25.0->0.28.00.25.0->0.28.0Release Notes
slackhq/circuit (com.slack.circuit:circuit-codegen)
v0.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: https://github.com/slackhq/circuit/pull/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!
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.