CXwudi
01/19/2025, 6:48 PMchildPanels()
navigation model and the ListDetailPaneScaffold()
together instead of the ChildPanels()
composable? It looks like the navigation models are so different that it doesn't seems to be possible.
Maybe the only solution to use ListDetailPaneScaffold()
with Decompose is to just call childContent()
but not childPanels()
?Rafael Costa
02/03/2025, 12:20 PMuiState
flow to my UI. As part of that UI State, if child slot is active, I want to provide the child instance, if it is not active I want to provide some other state data class.
The way I see it, to do this, I would combine the Value<ChildSlot<X, Y>>
with some other internal state flow.
Question is: can I convert the Value
into a StateFlow to allow me to combine it? Or is there any consequence of doing so, such as performance considerations or the like? I have a snippet that I think came from you @Arkadii Ivanov to do that conversion, I can paste on the thread.Djuro
02/05/2025, 9:22 AMArkadii Ivanov
02/09/2025, 8:28 PM3.3.0-beta01
is released!
- Updated Essenty to 2.5.0-beta01
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.3.0-beta01Adi 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-alpha03