benkuly
12/04/2024, 12:37 PMThe lifecycle of a child ComponentContext must never be destroyed manually.
Arkadii Ivanov
12/08/2024, 5:13 PM3.3.0-alpha01
is released!
๐ Added the new Web Navigation API with nested navigation support
๐ Added placeholders for ChildPanels
composable function
๐ Use Nothing
type for ChildPanels
composable function without Extra panel
๐ Fixed a crash when multiple retained components are created with different keys
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.3.0-alpha01Vaibhav Jaiswal
12/10/2024, 3:10 PMExpected to be called on the main thread, but was DefaultDispatcher-worker-2
com.arkivanov.decompose.mainthread.NotOnMainThreadException: Expected to be called on the main thread, but was DefaultDispatcher-worker-2
Even though im not calling navigate from any coroutine
I even tried adding this launch(Dispatchers.Main)
intentionally, but i still get this error
private fun navigate(
screen: ScreenConfig,
replace: Boolean = false,
replaceAll: Boolean = false
) = rootComponent.scope.launch(Dispatchers.Main){
when {
replaceAll -> navigator.replaceAll(screen)
replace -> navigator.navigate {
it.dropLast(1) - screen + screen
}
else -> navigator.pushToFront(screen)
}
}
Arkadii Ivanov
12/10/2024, 3:20 PMArkadii Ivanov
12/13/2024, 10:20 PM3.3.0-alpha02
is released!
๐ Added isPredictiveBack
flag to the experimental`stackAnimation` function with selector
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.3.0-alpha02Ozerov Max
12/24/2024, 5:32 AMModifier.handleBackGestures
from PredictiveBackGestureOverlay
is prioritized. Any ideas how to fix it?Vaibhav Jaiswal
12/28/2024, 5:04 AMBackCallback
but, it lands me back to that tab on back press, but on next back press it does not close the app
I'm using navigator.pop()
for thisAdam Brown
12/30/2024, 2:05 AMArkadii Ivanov
01/12/2025, 11:09 AM3.3.0-alpha03
is released!
๐ Updated Kotlin to 2.1.0
, Essenty to 2.4.0
, AGP to 8.7.3
, Gradle to 8.11.1
๐ Added AnimatedVisibilityScope
to ChildPanels
content composables
๐ Updated Essenty to 2.5.0-alpha01
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.3.0-alpha03CXwudi
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-alpha01