Adi Trioka
02/14/2025, 1:50 AMPhilip Dukhov
02/20/2025, 5:31 AMStateKeeper
`consume`/`register` methods could use the same technique (or have an overload) that Json.encodeToString
does, so we don't have to pass the serializer manually, with something like essentyJson.serializersModule.serializer()
?
I think I can use Json
instead of essentyJson
and do an extension on my end, as the lib doesn't and is not expected to modify the serializersModule
in the future, but it would be nicer to be shipped with the lib.Andrey Larionov
02/25/2025, 1:46 PMBottomNavigation
tab (ExploreRootScreen
, WalletRootScreen
and ProfileRootScreen
) has it's own ChildStack
@Composable
internal fun HomeRootScreen(component: HomeRootComponent) = Box(
modifier = Modifier.fillMaxSize()
) {
StackContent(component)
BottomNavigation(component)
}
@Composable
private fun StackContent(component: HomeRootComponent) {
val homeStack by component.stackRouter.subscribeAsState()
Children(
// ...
content = { childStack -> childStack.instance.getContentByChild() }
)
}
@Composable
private fun HomeRootChild.getContentByChild() = when (this) {
// ...
is ProfileRootChild -> ProfileRootScreen(this) // with ProfileRootComponent
}
BottomNavigation
is drawn over StackContent
using Alignment.Bottom
If we need to display a Dialog (ChildSlot
) somewhere deep inside of tab's ChildStack
, it should be drawn above BottomNavigation
I created a diagram where LogoutDialog
and SwitchLanguageDialog
(marked with yellow color) should appear. Each child in the diagram (marked with blue, yellow and pink colors) has it's own ChildComponent
(e.g, LanguageComponent
and SwitchLanguageComponent
)
And as I understand Decompose, for SwitchLanguageDialog
I should create ChildSlot
inside LanguageComponent
and this Dialog should be displayed on LanguageScreen
That's ok, but it will be drawn under the BottomNavigation
I assume I could create ChildSlot
at HomeRootComponent
level, but
• I'm not sure how to handle different children from different nested screens (e.g, using activeSlotChild: Flow<BaseSlotChild>
seems odd due to a large when
check)
• I don't know if this approach would break children back navigation (e.g, when Dialog is displayed, using system back swipe might trigger ChildStack
's backHandler)
How should I handle this properly?
Thanks in advanceAndrey Larionov
02/25/2025, 1:46 PMArkadii Ivanov
02/25/2025, 4:30 PM3.3.0
is released!
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.3.0Philip Dukhov
03/12/2025, 6:11 AMPhilip Dukhov
03/12/2025, 2:08 PMPhilip Dukhov
03/24/2025, 5:57 AMtypeOf
related to generic type
data class InstanceToRetain<T>(val value: T)
retainedSimpleInstance { InstanceToRetain(0) }
Looks like it's something you've faced already, what do you think is the best workaround here? For now I switched to T::class
, it obviously loses nested T
info, but at least it would crash in debug app version if I try to use the same key somewhere, so it's easier to catch during development.sasikanth
03/26/2025, 4:24 AMVaibhav Jaiswal
04/05/2025, 1:37 PMCan
04/09/2025, 9:15 AMbringToFront
function in RootComponent. If the user—_for some mysterious reason_—starts rapidly switching between tabs, the navigation can get stuck on one of the screens. When that happens, the screen becomes unresponsive to clicks. We share the RootComponent in android and iOS and it affects both. I also noticed the same issue in the sample Decompose app.Andrey Larionov
04/09/2025, 6:07 PM1.8.0-beta01
When I changed it with 1.7.3
---> 👍Andrew Steinmetz
04/20/2025, 8:27 PMComponentContext
, I wrote a library that extends kotlin-inject-anvil to help bind and generate the assisted factory interface glue code to bind it in the kotlin-inject dependency graph that I thought others who use the library might be interested in.
https://plusmobileapps.com/blog/2025/04/04/kotlin-inject-anvil-extensions/Vaibhav Jaiswal
05/01/2025, 11:20 AMdoOnCreate
but i am facing a bug that
it sometimes completes after the ChildComponent is created, which then crashes as the app as db goes empty
I want it to complete first (success or failure), then the ChildStack child components to be createdVaibhav Jaiswal
05/01/2025, 2:32 PMGuyaume Tremblay
05/01/2025, 8:30 PMListDetailPaneScaffold
with ?Arkadii Ivanov
05/03/2025, 12:33 AM3.4.0-alpha01
is released!
👉 Use SPDX identifier in POMs
👉 Relax StrictMode
with restarting the Activity stack for deep links
👉 Don't restart Activity stack when there is no deep link
👉 Added backHandlerPriority
argument to childContext
extension function
👉 Updated Compose to 1.8.0-rc01
and compileSdkVersion
to 35
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.4.0-alpha01Alexandru Caraus
05/13/2025, 1:17 PMCXwudi
05/19/2025, 11:37 PMchildPanels()
called backHandler
. As the name suggested, it allows the user to provide a customized back handler, and one of the handlers I provided is that in a MultiModeChildPanelsBackHandler
where in triple mode, pressing back goes to dual mode, and dual to single.
https://gist.github.com/CXwudi/03c5c7fae17518912b305f4e4b0423ea
Let me know what do you thoughtCXwudi
05/19/2025, 11:48 PMAdaptiveDetailsHorizontalChildPanelsLayout
at https://gist.github.com/CXwudi/218dacd0b39c5f24ee5a6e6b2ebc6f9e where the detail page is adaptive but the other two have configurable fixed size. Let me know what do you think?Rok Oblak
05/24/2025, 5:20 AM3.3.0
+ CMP 1.7.3
worked fine
upgrading to CMP 1.8.0
started crashing whenever back swipe was performed (something in a coroutine crashed, but crashlog is hard to decipher; normal back button i.e. pop from stack worked fine)
then keeping CMP 1.8.0
but upgrading Decompose to 3.4.0-alpha01
fixed it againArkadii Ivanov
05/31/2025, 12:22 PMPagesNavigator#setItems
extension function
👉 Deprecated Value#getValue
operator overload
👉 Exposed ChildPagesPager
typealias
👉 Avoid using Modifier.graphicLayer
in predictive back animatables
👉 Fixed IndexOutOfBoundsException
in ChildPages
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.4.0-alpha02John O'Reilly
06/08/2025, 5:38 PMArkadii Ivanov
06/14/2025, 11:58 AMVaibhav Jaiswal
06/27/2025, 7:59 AMArkadii Ivanov
06/28/2025, 1:15 PMJetpackComponentContext
API
👉 Updated Compose to 1.8.2
👉 Fixed ClassCastException
in SlotNavigator#dismiss
on wasmJs
on Kotlin 2.2
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.4.0-alpha03Vaibhav Jaiswal
07/07/2025, 12:24 PMretainedComponent
which means that the rootComponent survives config change
And this root Component has a stack navigation, so does this mean the child components for each screen in the nav will also survive config change?UzMbApps
07/12/2025, 5:38 AMfun fadeThroughAnimator(
animationSpec: FiniteAnimationSpec<Float> = tween(220),
minAlpha: Float = 0f,
minScale: Float = 0.92f,
): StackAnimator = stackAnimator(animationSpec = animationSpec) { factor, direction, content ->
if (direction.isEnter) {
val alpha = getFadeAlpha(factor, minAlpha)
val scale = 1f - abs(factor) * (1f - minScale)
content(
Modifier
.alpha(alpha)
.scale(scale)
)
}
}
//....
Scaffold(...
content = { innerPadding ->
Children(
modifier = Modifier.fillMaxSize().padding(innerPadding),
stack = stack,
animation = stackAnimation(fadeThroughAnimator())
) { child ->
Hi Arkadii, I'm facing a small issue... the fadeThroughAnimator animation works just as I want, but it doesn't keep the screen state. How can I fix that?
Philip Dukhov
08/07/2025, 9:56 AMstackAnimation
, which is probably related to movableContent
, as discussed here.
When I push a screen with a text field and this text field focuses automatically with a launched effect, the text field becomes unfocused after the transition finishes. If this is not a known bug and you need a reproducible example, let me know. I stopped investigating when I found that removing stackAnimation
fixed the bug.
Using extensions-compose-experimental also solves the issue.
My questions are:
1. What are the plans for the experimental module? Is it planned to replace extensions-compose?
2. Do you use it in your production apps? Are there any known issues with it compared to extensions-compose?Philip Dukhov
08/18/2025, 2:43 PMMaterialPredictiveBackAnimatable
for myself to be closer to what the system settings app has. The current version feels a bit strange in the final disappearing stage to me. Let me know if you're interested in such a contribution.
However, I noticed that you updated the alpha version to eliminate the use of the graphicsLayer
https://github.com/arkivanov/Decompose/issues/877.
Do you know if this issue has been reported? I use graphicsLayer
because I feel it's a performant solution. I'd like to reconsider it, knowing the corner cases where it could fail.