Skip to content

Releases: slackhq/circuit

0.15.0

20 Sep 21:38
Compare
Choose a tag to compare

New: Allow retained state to be retained whilst UIs and Presenters are on the back stack.

Originally, circuit-retained was implemented as a solution for preserving arbitrary data across configuration changes on Android. With this change it now also acts as a solution for retaining state across the back stack, meaning that traversing the backstack no longer causes restored contents to re-run through their empty states anymore.

To support this, each back stack entry now has its own RetainedStateRegistry instance.

Note that circuit-retained is still optional for now, but we are considering making it part of CircuitCompositionLocals in the future. Please let us know your thoughts in this issue: #891.

Full details + demos can be found in #888. Big thank you to @chrisbanes for the implementation!

Other changes

  • New: Add collectAsRetainedState utility function, analogous to collectAsState but will retain the previous value across configuration changes and back stack entries.
  • Enhancement: Optimize rememberRetained with a port of the analogous optimization in rememberSaveable. See #850.
  • Enhancement: Presenter and Ui interfaces are now annotated as @Stable.
  • Fix: Fix GestureNavigationDecoration function parameter order.
  • Fix: BackHandler on iOS now has the proper file name.
  • Fix: Key the presenter.present() in CircuitContent on the Screen rather than the presenter itself, which fixes a severe issue that prevented currentCompositeKeyHash from working correctly on rememberRetained and rememberSaveable uses.
  • Update CM compiler to 1.5.2.
  • Update CM to 1.5.1.
  • Update androidx.compose.animation to 1.5.1.
  • Update androidx.compose.foundation to 1.5.1.
  • Update androidx.compose.runtime to 1.5.1.
  • Update androidx.compose.material to 1.5.1.
  • Update androidx.lifecycle to 2.6.2.
  • Update androidx.annotation to 1.7.0.

What's Changed

Full Changelog: 0.14.1...0.15.0

0.14.1

03 Sep 20:33
Compare
Choose a tag to compare
  • New: Add GestureNavigationDecoration to CircuitX courtesy of @chrisbanes.

This is a new NavDecoration that allows for gesture-based navigation, such as predictive back in Android 14 or drag gestures in iOS. See the docs for more details.

NavigableCircuitContent(
  navigator = navigator, 
  backstack = backstack,
  decoration = GestureNavigationDecoration(
    // Pop the back stack once the user has gone 'back'
    navigator::pop
  )
)
  • Fix embedded baseline profiles in published artifacts. Unfortunately GMDs used to generate these are quite finicky to run so these are sometimes tricky to regen each release.

Special thanks to @chrisbanes and @alexvanyo for contributing to this release!

What's Changed

New Contributors

Full Changelog: 0.14.0...0.14.1

0.14.0

30 Aug 20:51
Compare
Choose a tag to compare
  • New: Circuit now supports JS targets!
  • New: Introduce CircuitX artifacts. CircuitX is a suite of extension artifacts for Circuit. These artifacts are intended to be
    batteries-included implementations of common use cases, such as out-of-the-box Overlay types or
    Android navigation interop. See the docs for more details.
  • Enhancement: Promote Screen to its own artifact. This is now under the com.slack.circuit.runtime.screen.Screen name.
  • Enhancement: Use Screen directly in the BackStack in place of route.
  • Enhancement: No longer require SaveableBackStack in NavigableCircuitContent, now any BackStack impl is supported.
  • Enhancement: Make CanRetainChecker more customizable in circuit-retained.
  • Enhancement: Pass the whole list of active records to DecoratedContent, allowing more complex handling of back gestures (predictive back in android, drag gestures in iOS, etc).
  • Enhancement: Refactor out a buildCircuitContentProviders() in NavigableCircuitContent, which enables movableContentOf to work since it's reusing the same instance for records across changes.
  • Fix: Fix duplicated Modifier for DecoratedContent.
  • Fix: Fix new presenter instances of the same type not being recomposed. See #799 for more details.
  • Fix: Export iOS targets for circuit-test artifact.
  • Demonstrate back handling for Compose Multiplatform in Counter sample.
  • Add kotlinx.collections.immutable to core APIs.
  • Update to Compile SDK 34.
  • Update to Compose Multiplatform 1.5.0.
  • Update androidx.compose.compiler to 1.5.3.
  • Update androidx.compose.ui to 1.5.0.
  • Update androidx.compose.material to 1.5.0.
  • Update androidx.compose.runtime to 1.5.0.
  • Update androidx.compose.foundation to 1.5.0.
  • Update uuid to 0.8.1.
  • Update Molecule to 1.2.0.
  • Update Kotlin to 1.9.10.
  • Update KSP to 1.9.10-1.0.13.

Thanks to @chrisbanes and @ashdavies for contributing to this release!

What's Changed

Full Changelog: 0.12.1...0.14.0

0.13.0-beta01

17 Aug 16:06
Compare
Choose a tag to compare
  • New: Circuit now supports JS targets!
  • New: Introduce CircuitX artifacts. CircuitX is a suite of extension artifacts for Circuit. These artifacts are intended to be
    batteries-included implementations of common use cases, such as out-of-the-box Overlay types or
    Android navigation interop. See the docs for more details.
  • Fix: Fix new presenter instances of the same type not being recomposed. See #799 for more details.
  • Fix: Export iOS targets for circuit-test artifact.
  • Update to Compile SDK 34.
  • Update to Compose Multiplatform 1.5.0-beta02.
  • Update androidx.compose.ui to 1.5.0.
  • Update androidx.compose.material to 1.5.0.
  • Update androidx.compose.runtime to 1.5.0.
  • Update androidx.compose.foundation to 1.5.0.
  • Update Molecule to 1.2.0.
  • Update KSP to 1.9.0-1.0.13.

Note this release is a beta release due to the dependency on CM 1.5.0-beta02.

What's Changed

Full Changelog: 0.12.1...0.13.0-beta01

0.12.1

01 Aug 17:03
Compare
Choose a tag to compare
  • Patch release with baseline profiles bundled in the Android artifacts again.
  • Update to Anvil 2.4.7.

What's Changed

Full Changelog: 0.12.0...0.12.1

0.12.0

28 Jul 22:54
Compare
Choose a tag to compare
  • [foundation] Rename CircuitConfig -> Circuit. There is a source-compatible typealias for CircuitConfig left with a deprecation replacement to ease migration.
  • [foundation] Rename CircuitContext.config -> CircuitContext.circuit. The previous CircuitContext.config function is left with a deprecation replacement to ease migration.
  • [test] Add new TestEventSink helper for testing event emissions in UI tests.
  • [overlay] Add missing coroutines implementation dependency.
  • Update to Kotlin 1.9.0.
  • Update to KSP 1.9.0-1.0.12.
  • Update to Compose Multiplatform 1.4.3.
  • Update to Coroutines 1.7.3.
  • Update to Compose compiler to 1.5.1 (androidx) and 1.5.0 (compose-multiplatform).
  • Update uuid to 0.8.0.

What's Changed

Full Changelog: 0.11.0...0.12.0

0.11.0

20 Jul 14:22
Compare
Choose a tag to compare
  • [runtime] Fix race condition in EventListener.start() callback.
  • [code gen] Update to Dagger 2.47.
  • [docs] No longer recommend or require extracting intermediate event sink variables. This is no longer an issue 🎉.
  • Update Molecule to 1.0.0.

Thanks to @bryanstern for contributing to this release!

What's Changed

Full Changelog: 0.10.1...0.11.0

0.10.1

09 Jul 17:42
Compare
Choose a tag to compare
  • [runtime] Make CircuitContent overload with Navigator public.
  • [runtime] Remember Presenter and Ui in CircuitContent.
  • [runtime] Fix kdoc typo in RememberRetained .

Special thanks to @chrisbanes and @bryanstern for contributing to this release!

What's Changed

New Contributors

Full Changelog: 0.10.0...0.10.1

0.10.0

30 Jun 18:43
Compare
Choose a tag to compare
  • [runtime] Fix wrong compose-compiler used in iOS targets. Now we're using the compose-multiplatform fork.
  • [runtime] Allow creation of multiple RetainedStateRegistry instances.
  • [docs] Add clarifying links to Events docs.
  • [samples] Add new image detail view in STAR sample.
  • Update Molecule to 0.11.0.
  • Update AndroidX compose-compiler to 1.4.8.
  • Update compose-multiplatform to 1.4.1.
  • Update to coroutines 1.7.2.
  • Update to Turbine 1.0.0.
  • Update to Kotlin 1.8.22.

Special thanks to @bryanstern, @saket, and @chrisbanes for contributing to this release!

What's Changed

New Contributors

Full Changelog: 0.9.1...0.10.0

0.9.1

02 Jun 21:23
Compare
Choose a tag to compare
  • [runtime] Promote NavEvent subtypes to public API.
  • [runtime] Update com.benasher44:uuid to 0.7.1.
  • [code gen] Update Anvil to 2.4.6.