You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+66-6
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,54 @@ Changelog
3
3
4
4
**Unreleased**
5
5
--------------
6
-
### Behaviour Change: rememberRetained
6
+
7
+
0.26.0
8
+
------
9
+
10
+
_2025-02-06_
11
+
12
+
Happy new year!
13
+
14
+
### Shared Elements API!
15
+
16
+
After a lot of iteration and work, this release adds support for Compose's new shared elements APIs.
17
+
18
+
These are still experimental and subject to change, both in Circuit and due to how the underlying
19
+
20
+
See this PR for full details as well as sample integrations: https://github.com/slackhq/circuit/pull/1550. Please share feedback in [this discussion](https://github.com/slackhq/circuit/discussions/1924). More formal docs to come as well, we'll publish updates there!
21
+
22
+
For now, the easiest way to support shared element transitions is to wrap your content with a `SharedElementTransitionLayout`.
23
+
24
+
```kotlin
25
+
CircuitCompositionLocals(circuit) {
26
+
SharedElementTransitionLayout {
27
+
NavigableCircuitContent(
28
+
navigator = navigator,
29
+
backStack = backStack,
30
+
)
31
+
}
32
+
}
33
+
```
34
+
35
+
`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.
36
+
37
+
There is also a `PreviewSharedElementTransitionLayout` for help with Compose previews.
38
+
39
+
### Behaviour Changes: `rememberRetained`
40
+
7
41
Previously, `rememberRetained` could sometimes restore values when a composable was re-added, depending on whether its parent `RetainedStateRegistry` had been saved (#1783).
8
42
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.
9
43
10
-
### Behaviour Change: RetainedStateRegistry
44
+
Update rememberRetained to allow CanRetainChecker to be updated in place.
45
+
46
+
### Behaviour Change: `RetainedStateRegistry`
47
+
11
48
-`saveAll` now returns the saved values.
12
49
-`RetainedStateRegistry.Entry.unregister` now returns whether the unsaved valueProvider was actually removed.
13
50
-`saveAll` and `saveValue` now skip storing child values when `CanRetainChecker` returns `false`.
14
51
15
-
### New: RetainedStateHolder
52
+
### New: `RetainedStateHolder`
53
+
16
54
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.
17
55
18
56
```kotlin
@@ -21,7 +59,7 @@ var currentTab by remember { mutableStateOf(TabA) }
- The approach of managing a separate `RetainedStateRegistry` for each record has been changed to use `RetainedStateHolder` instead.
79
+
- Change `SaveableStateHolder` to release saved states of removed records.
80
+
81
+
### Misc
82
+
83
+
- Fixe an issue causing codegen to fail for class @Inject annotations.
84
+
- Compile against Android SDK 35.
85
+
- Update Compose Android BOM to `2025.01.01`.
86
+
- Update to androidx.annotation `1.9.1`.
87
+
- Update to androidx.activity `1.10.0`.
88
+
- Update to Compose Android `1.7.7`.
89
+
- Update to Compose Multiplatform `1.7.3`.
90
+
- Update to Kotlin `1.9.10`.
91
+
-[code gen] Update to KSP `1.9.10-1.0.29`.
92
+
-[code gen] Update to Dagger `2.55`.
93
+
-[code gen] Update to KotlinPoet `2.0.0`.
94
+
-[code gen] Build against Anvil-KSP `0.4.1`. Should still be compatible with square/anvil as well.
95
+
-[code gen] Build against kotlin-inject-anvil `0.1.2`. Should still be compatible with square/anvil as well.
96
+
-[samples] Update mosaic + modernize mosaic counter sample to fully use effects.
97
+
-[docs] Fix variable casing in Navigation documentation example.
98
+
99
+
Special thanks to [@vulpeszerda](https://github.com/vulpeszerda), [@rharter](https://github.com/rharter), [@alexvanyo](https://github.com/alexvanyo), and [@easyhooon](https://github.com/easyhooon) for contributing to this release!
0 commit comments