0.21.0
- New: Add WASM targets.
- New: Add
FakeNavigator
functions to check for the lack of pop/resetRoot events. - New: Add
FakeNavigator
constructor param to add additional screens to the backstack. - New: Add support for static UIs. In some cases, a UI may not need a presenter to compute or manage its state. Examples of this include UIs that are stateless or can derive their state from a single static input or an input [Screen]'s properties. In these cases, make your screen implement the
StaticScreen
interface. When aStaticScreen
is 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. - New: Add
RecordLifecycle
andLocalRecordLifecycle
composition 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. - New: Add a
rememberRetainedSaveable
variant that participates in bothRetainedStateRegistry
andSaveableStateRegistry
restoration, allowing layered state persistence.- The logic is the following upon
rememberRetainedSaveable
entering composition:- consume from both
RetainedStateRegistry
andSaveableStateRegistry
, if available - if the retained value is available, use that
- otherwise, if the saveable restored value is available, use that
- otherwise, re-initialize the value
- consume from both
- There is also an overload of
rememberRetained
that explicitly requires aSaver
parameter.
- The logic is the following upon
- Behaviour Change: Presenters are now 'paused' when inactive and replay their last emitted
CircuitUiState
when they are not active. Presenters can opt-out of this behavior by implementingNonPausablePresenter
. - Behaviour Change:
NavigatorImpl.goTo
no longer navigates if theScreen
is equal toNavigator.peek()
. - Behaviour Change:
Presenter.present
is 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 useallWarningsAsErrors
to fail the build on this event. - Behaviour Change: Guard against
Navigator.goTo()
calls to the same current screen. - Change:
Navigator.goTo
now returns a Bool indicating navigation success. - Change: Move iOS
GestureNavigationDecoration
impl tocommonMain
and rename toCupertinoGestureNavigationDecoration
. - Change: Target jvmTarget
1.8
in core libraries. - Fix: Fix saveable state being restored when using reset root navigation events.
- Deprecation:
FakeNavigator.assertIsEmpty
andexpectNoEvents
(use the specific event type methods instead) - Mark
Presenter.Factory
as@Stable
. - Mark
Ui.Factory
as@Stable
. - Mark
CircuitContext
as@Stable
. - Mark
EventListener
as@Stable
. - Mark
EventListener.Factory
as@Stable
. - [samples] Improve interop sample significantly.
- Update Kotlin to
1.9.24
. - Update KSP to
1.9.24-2.0.20
. - Update compose-compiler to
1.5.14
. - Update KotlinPoet to
1.17.0
. - Update androidx.lifecycle to
2.8.0
. - Update Molecule to
1.4.3
. - Update androidx.annotation to
1.8.0
. - Update kotlinx.coroutines to
1.8.1
. - Update Compose Multiplatform to
1.6.2
. - Update Compose UI to
1.6.7
. - Update Compose Runtime to
1.6.7
. - Update Compose Animation to
1.6.7
. - Update Compose Material to
1.6.7
. - Update androidx.core to
1.13.1
. - Update androidx.activity to
1.9.0
. - Update dagger to
2.51.1
. - Update uuid to
0.8.4
.
Special thanks to @chrisbanes, @alexvanyo, @eboudrant, @edenman, and @JustinBis for contributing to this release!
What's Changed
- Update retrofit to v2.10.0 by @slack-oss-bot in #1293
- Update agp to v8.3.1 by @slack-oss-bot in #1292
- Update dependency com.benasher44:uuid to v0.8.4 by @slack-oss-bot in #1294
- Update dependency androidx.compose:compose-bom to v2024.03.00 by @slack-oss-bot in #1302
- Update dependency androidx.compose.foundation:foundation to v1.6.4 by @slack-oss-bot in #1301
- Update compose.ui to v1.6.4 by @slack-oss-bot in #1298
- Update dependency androidx.compose.animation:animation to v1.6.4 by @slack-oss-bot in #1299
- Update compose.runtime to v1.6.4 by @slack-oss-bot in #1297
- Update compose.material to v1.6.4 by @slack-oss-bot in #1296
- Update dependency mkdocs-material to v9.5.15 by @slack-oss-bot in #1303
- Update dependency gradle to v8.7 by @slack-oss-bot in #1304
- Update dependency androidx.compose.compiler:compiler to v1.5.11 by @slack-oss-bot in #1300
- Add WASM support by @ZacSweers in #1245
- Update dependency io.gitlab.arturbosch.detekt to v1.23.6 by @slack-oss-bot in #1306
- Update dependency me.saket.telephoto:zoomable-image-coil to v0.9.0 by @slack-oss-bot in #1308
- Revamp interop sample by @ZacSweers in #1193
- Update kct to v0.4.1 by @slack-oss-bot in #1307
- Update dependency com.github.ajalt.clikt:clikt to v4.3.0 by @slack-oss-bot in #1310
- Update molecule to v1.4.2 by @slack-oss-bot in #1309
- Update retrofit to v2.11.0 by @slack-oss-bot in #1311
- Update dependency org.robolectric:robolectric to v4.12 by @slack-oss-bot in #1314
- Update dagger to v2.51.1 by @slack-oss-bot in #1313
- Update dependency mkdocs-material to v9.5.17 by @slack-oss-bot in #1315
- Update dependency org.robolectric:robolectric to v4.12.1 by @slack-oss-bot in #1316
- Update compose.material to v1.6.5 by @slack-oss-bot in #1318
- Update compose.runtime to v1.6.5 by @slack-oss-bot in #1319
- Update compose.ui to v1.6.5 by @slack-oss-bot in #1320
- Update dependency androidx.compose.foundation:foundation to v1.6.5 by @slack-oss-bot in #1322
- Update dependency androidx.compose.animation:animation to v1.6.5 by @slack-oss-bot in #1321
- Update dependency androidx.datastore:datastore-preferences to v1.1.0-rc01 by @slack-oss-bot in #1323
- Update dependency androidx.compose:compose-bom to v2024.04.00 by @slack-oss-bot in #1324
- Update dependency fastlane to v2.220.0 by @slack-oss-bot in #1325
- Remember keys in rememberSaveableBackStack by @JustinBis in #1326
- Update ksp to v1.9.23-1.0.20 by @slack-oss-bot in #1327
- Update actionsdesk/lfs-warning action to v3.3 by @slack-oss-bot in #1328
- Update sqldelight to v2.0.2 by @slack-oss-bot in #1329
- Update ktor to v2.3.10 by @slack-oss-bot in #1332
- Update agp to v8.3.2 by @slack-oss-bot in #1333
- Update compose.jb to v1.6.2 by @slack-oss-bot in #1335
- Update roborazzi to v1.12.0 by @slack-oss-bot in #1336
- Update gradle/wrapper-validation-action action to v3 by @slack-oss-bot in #1337
- Navigator - Guard against a goTo to the current screen by @stagg in #1331
- Update dependency me.saket.telephoto:zoomable-image-coil to v0.10.0 by @slack-oss-bot in #1339
- Update dependency co.touchlab.skie to v0.6.3 by @slack-oss-bot in #1338
- Update dependency mkdocs-material to v9.5.18 by @slack-oss-bot in #1340
- Update dependency co.touchlab.skie to v0.6.4 by @slack-oss-bot in #1341
- Update benchmark to v1.2.4 by @slack-oss-bot in #1343
- Update compose.material to v1.6.6 by @slack-oss-bot in #1344
- Update compose.runtime to v1.6.6 by @slack-oss-bot in #1345
- Update dependency androidx.compose.animation:animation to v1.6.6 by @slack-oss-bot in #1347
- Update dependency androidx.compose.compiler:compiler to v1.5.12 by @slack-oss-bot in #1348
- Update dependency androidx.compose.foundation:foundation to v1.6.6 by @slack-oss-bot in #1349
- Update dependency androidx.compose:compose-bom to v2024.04.01 by @slack-oss-bot in #1350
- Update dependency androidx.datastore:datastore-preferences to v1.1.0 by @slack-oss-bot in #1351
- Update dependency com.willowtreeapps.assertk:assertk to v0.28.1 by @slack-oss-bot in #1352
- Update dependency org.jetbrains.compose.compiler:compiler to v1.5.10.2 by @slack-oss-bot in #1353
- Update compose.ui to v1.6.6 by @slack-oss-bot in #1346
- Update okhttp monorepo to v5.0.0-alpha.14 by @slack-oss-bot in #1355
- Update roborazzi to v1.13.0 by @slack-oss-bot in #1363
- Update dependency pymdown-extensions to v10.8 by @slack-oss-bot in #1361
- Update leakcanary to v2.14 by @slack-oss-bot in #1362
- Update dependency mkdocs to v1.6.0 by @slack-oss-bot in #1359
- Update dependency org.jetbrains.kotlinx:atomicfu to v0.24.0 by @slack-oss-bot in #1360
- Update dependency androidx.core:core-ktx to v1.13.0 by @slack-oss-bot in #1358
- Update dependency androidx.activity:activity-compose to v1.9.0 by @slack-oss-bot in #1357
- Update androidx.activity to v1.9.0 by @slack-oss-bot in #1356
- Update dependency org.jline:jline to v3.26.1 by @slack-oss-bot in #1364
- Update dependency mkdocs-material to v9.5.19 by @slack-oss-bot in #1365
- Test ComposableTarget on Presenters by @ZacSweers in #1366
- Update dependency com.google.testparameterinjector:test-parameter-injector to v1.16 by @slack-oss-bot in #1368
- Update dependency com.github.ajalt.clikt:clikt to v4.4.0 by @slack-oss-bot in #1372
- Update dependency me.saket.telephoto:zoomable-image-coil to v0.11.2 by @slack-oss-bot in #1373
- Update dependency pymdown-extensions to v10.8.1 by @slack-oss-bot in #1371
- Update dependency com.facebook:ktfmt to v0.49 by @slack-oss-bot in #1367
- Deprecate assertIsEmpty/expectNoEvents, add versions for all event types by @edenman in #1375
- Add ability to pass multiple screens to the FakeNavigator constructor by @edenman in #1376
- Update dependency mkdocs-material to v9.5.20 by @slack-oss-bot in #1377
- Target Java 1.8 for Circuit published libraries (from Java 11) by @eboudrant in #1378
- Update agp to v8.4.0 by @slack-oss-bot in #1379
- Update compose.material to v1.6.7 by @slack-oss-bot in #1382
- Update dependency com.google.android.material:material to v1.12.0 by @slack-oss-bot in #1391
- Update dependency androidx.compose:compose-bom to v2024.05.00 by @slack-oss-bot in #1390
- Update dependency androidx.core:core-ktx to v1.13.1 by @slack-oss-bot in #1388
- Update dependency androidx.datastore:datastore-preferences to v1.1.1 by @slack-oss-bot in #1389
- Update dependency androidx.compose.foundation:foundation to v1.6.7 by @slack-oss-bot in #1387
- Update dependency androidx.compose.compiler:compiler to v1.5.13 by @slack-oss-bot in #1386
- Update dependency androidx.compose.animation:animation to v1.6.7 by @slack-oss-bot in #1385
- Update compose.runtime to v1.6.7 by @slack-oss-bot in #1383
- Update compose.ui to v1.6.7 by @slack-oss-bot in #1384
- Update roborazzi to v1.14.0 by @slack-oss-bot in #1394
- Update dependency mkdocs-material to v9.5.21 by @slack-oss-bot in #1393
- Update dependency Pygments to v2.18.0 by @slack-oss-bot in #1395
- Update dependency Jinja2 to v3.1.4 by @slack-oss-bot in #1396
- Update roborazzi to v1.15.0 by @slack-oss-bot in #1398
- Update ktor monorepo to v2.3.11 by @slack-oss-bot in #1402
- Update kotlinx.coroutines to v1.8.1 by @slack-oss-bot in #1403
- Update dependency co.touchlab.skie to v0.7.0 by @slack-oss-bot in #1404
- Update dependency mkdocs-material to v9.5.22 by @slack-oss-bot in #1405
- Update dependency dev.zacsweers.moshix to v0.26.0 by @slack-oss-bot in #1406
- Update kotlin monorepo to v1.9.24 by @slack-oss-bot in #1397
- Small baseline profile generation tweaks by @ZacSweers in #1260
- Update dependency androidx.annotation:annotation to v1.8.0 by @slack-oss-bot in #1409
- Update dependency mkdocs-material to v9.5.23 by @slack-oss-bot in #1412
- Move iOS GestureNavigationDecoration impl to commonMain by @chrisbanes in #1415
- Update dependency org.robolectric:robolectric to v4.12.2 by @slack-oss-bot in #1417
- Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.6.0 by @slack-oss-bot in #1410
- Update dependency co.touchlab.skie to v0.7.2 by @slack-oss-bot in #1411
- Update molecule to v1.4.3 by @slack-oss-bot in #1413
- Update roborazzi to v1.16.1 by @slack-oss-bot in #1414
- Update dependency androidx.compose.compiler:compiler to v1.5.14 by @slack-oss-bot in #1407
- Update androidx.lifecycle to v2.8.0 by @slack-oss-bot in #1408
- Update plugin emulatorWtf to v0.17.0 by @slack-oss-bot in #1419
- Update dependency org.jetbrains.compose.compiler:compiler to v1.5.13.3 by @slack-oss-bot in #1399
- Update agp to v8.4.1 by @slack-oss-bot in #1422
- Update dependency mkdocs-material to v9.5.24 by @slack-oss-bot in #1423
- Implement support for stateless UIs by @ZacSweers in #1418
- Update dependency co.touchlab.skie to v0.8.0 by @slack-oss-bot in #1425
- Update dependency org.jetbrains.compose.compiler:compiler to v1.5.14 by @slack-oss-bot in #1420
- Update dependency app.cash.paparazzi to v1.3.4 by @slack-oss-bot in #1428
- Update roborazzi to v1.17.0 by @slack-oss-bot in #1429
- Update kotlinpoet to v1.17.0 by @slack-oss-bot in #1430
- Update roborazzi to v1.18.0 by @slack-oss-bot in #1431
- Add lifecycle aware Presenters by @chrisbanes in #1282
- Fix saveable state being restored when using reset root navigation events by @chrisbanes in #1354
- Add rememberRetainedSaveable by @alexvanyo in #1305
New Contributors
- @JustinBis made their first contribution in #1326
- @edenman made their first contribution in #1375
- @eboudrant made their first contribution in #1378
Full Changelog: 0.20.0...0.21.0