Repository navigation
Adaptive pane layouts with circuitx-adaptive
circuitx-adaptive is a new experimental artifact that shows one back stack as one, two, or three panes. A phone shows one screen at a time. This helps ease targeting different form factors like tablets, foldables, or desktop layouts.
data class DetailScreen(val id: String) : PaneScreen {
override val paneStyle = PaneStyle.ListDetail
}
val (paneNavigator, decoration) = rememberPaneNavigation(navigator)
NavigableCircuitContent(paneNavigator, backStack, decoration = decoration)On a wide window, DetailScreen now opens beside the screen below it. Opening another detail replaces the first one, so back returns to the list.
See the docs.
New
- circuit-foundation: Add experimental
RecordLifecycle.isVisibleand aProvideRecordLifecycle(isActive, isVisible)overload, so a decoration can report whether a record is shown separately from whether it's active. - circuitx-gesture-navigation: Add
SlideOverNavDecoration, an iOS-style slide-overNavDecorationwith forward and backward swipes and optional off-screen warming of adjacent screens. - circuitx-navigation: Add
InterceptedResult.RewriteAll, which rewrites a navigation into severalNavEvents thatInterceptingNavigatorapplies in one snapshot. - circuit-sharedelements: Add
ProvideStaticAnimatedTransitionScope, which provides anAnimatedScopeto content that renders outside the transition that normally provides it.
Fixed
- circuit-foundation: A record in a nested
NavigableCircuitContentis now only active (LocalRecordLifecycle.isActive) while its parent record is active, unless aNavDecorationprovides its own lifecycle. - circuit-serialization-reflect: Compile an Android variant against Android SavedState to avoid a
NoSuchMethodErrorwhen saving screens.
Contributors
Special thanks to the following contributors for contributing to this release!
What's Changed
- Update kct to v0.14.0 by @slack-oss-bot in #2895
- Update jb.compose to v1.12.1 by @slack-oss-bot in #2903
- Fix reflective serialization on Android by @ZacSweers in #2906
- Update dependency androidx.annotation:annotation to v1.11.0 by @slack-oss-bot in #2907
- Update dependency com.slack.lint.compose:compose-lint-checks to v1.6.1 by @slack-oss-bot in #2917
- Update kotlin monorepo to v2.4.21 by @slack-oss-bot in #2920
- Update ZacSweers/kempt action to v0.4.0 by @slack-oss-bot in #2921
- Prevent crash during Activity destruction by @shayann07 in #2914
- Update dependency com.google.testparameterinjector:test-parameter-injector to v1.25 by @slack-oss-bot in #2936
- [eMudhra 53119][Java] Upgrade JDK to 27 by @davidmreed in #2940
- Make nested records inactive while their parent record is inactive by @adewan-slack in #2950
- Add RecordLifecycle.isVisible by @stagg in #2967
- Update dependency org.jetbrains.kotlinx:kotlinx-serialization-core to v1.13.0 by @slack-oss-bot in #2965
- Update dependency dev.zacsweers.metro:runtime to v1.6.0 by @slack-oss-bot in #2971
- Update dependency org.robolectric:robolectric to v4.18.1 by @slack-oss-bot in #2973
- Add SlideOverNavDecoration to gesture-navigation by @stagg in #2927
- Add RewriteAll, a static animated scope helper, and the NavDecoration contract by @ZacSweers in #2974
- Add the circuitx-adaptive module with pane strategies and pane state by @ZacSweers in #2975
- Add PaneNavDecoration and PaneReplaceInterceptor to circuitx-adaptive by @ZacSweers in #2976
- Add a drag handle that resizes two panes in circuitx-adaptive by @ZacSweers in #2986
- More small adaptive tweaks by @ZacSweers in #2987
- Update agp to v9.5.3 by @slack-oss-bot in #2988
- Update ksp monorepo to v2.3.14 by @slack-oss-bot in #2969
- Update Gradle to v9.9.3 by @slack-oss-bot in #2993
New Contributors
- @shayann07 made their first contribution in #2914
- @davidmreed made their first contribution in #2940
- @adewan-slack made their first contribution in #2950
Full Changelog: 0.39.0...0.40.0