Status Update
Comments
da...@well.co <da...@well.co> #2
I don't think there is any workaround available so I recommend for everyone affected to stay on beta06 for a bit.
da...@well.co <da...@well.co> #3
Take this with a huge grain of salt but I had the same/similar issue occasionally on beta06
and before as well. It got a lot worse with beta07
. Just scrolling and randomly finding items that are not rendered whatsoever. I'm developing deeply nested dynamic forms so I could be hitting multiple edge cases or perhaps made a mistake myself but I don't have these issues with a verticalScroll
modifier on a regular column.
da...@well.co <da...@well.co> #4
je...@google.com <je...@google.com>
ap...@google.com <ap...@google.com> #5
Found a temporary workaround
Instead of your current:
LazyColumn {
items(myList) {
MyItem(it)
}
}
Do
LazyColumn {
itemsIndexed(myList) { index, it ->
key(index) { // TODO remove key() after upgrade to beta08
MyItem(it)
}
}
}
mn...@google.com <mn...@google.com> #6
Branch: androidx-main
commit a3b566102eb60c3396dfae0dd5ea57e8eb15f0a1
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Thu May 20 20:57:53 2021
Fix for LazyColumn/Row items displayed partially after the scroll
It was the old issue with how we handle not placed children which became often reproducible after introducing slots reuse in LazyColumn. When the layout was not placing its children node remeasuring and redrawing for such node and its children was skipped as this node is not visible. Once this node was becoming visible again we weren't correctly restoring the node's sub-hierarchy. Now we correctly reschedule remeasurings and redrawings for the dirty nodes for the whole subtree.
Relnote: Fixed the bug introduced in beta07 where LazyColumn/Row items were displayed partially after the scroll
Test: InvalidatingNotPlacedChildTest
Bug: 188566058
Change-Id: I8c9ac2df59f3183bf6067dd20092a127f16c9e80
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/InvalidatingNotPlacedChildTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutTreeConsistencyChecker.kt
da...@well.co <da...@well.co> #7
In case you want to try it earlier you can try the snapshot build. buildId is 7393783. See this site with instructions:
Thanks everyone!
da...@well.co <da...@well.co> #8
se...@google.com <se...@google.com> #9
Compose generally releases every two weeks on Wednesday. That puts the next release on Jun 2.
se...@google.com <se...@google.com> #10
As for how to track something like this - the best bet is the release notes which contains a link to all CLs. That's the final authoritative answer to "what's in a release" (sometimes a few last second cherry-picks or fixes are needed, so hard to predict until the day of the cut)
na...@google.com <na...@google.com> #11
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.7.2
androidx.compose.ui:ui-android:1.7.2
androidx.compose.ui:ui-jvmstubs:1.7.2
androidx.compose.ui:ui-linuxx64stubs:1.7.2
Description
2023.10.00-alpha01 // broken
2023.09.00-alpha03 // working
Jetpack Compose component(s) used:
LiveRegion
Android Studio Build:
Android Studio Koala | 2024.1.1 Canary 8
Kotlin version:
1.9.0
Steps to Reproduce or Code Sample to Reproduce:
1. Run this project
2. Click on Button
Expected: I would expect it to announce "David" when pressing the button which is a LiveRegion that becomes visible.
Actual: It does not announce the live region.
If you run the exact code but then change the toml file to the
"2023.09.00-alpha03" as mentioned here
It works
Summary:
So either compose changed something and I need to change my live region or its just broke.
I am going to keep digging into this and see if I can give more detail but it appears these dependencies have updated
So compose 1.6.0-alpha04 vs 1.6.0-alpha05 there is the change.
This is a pretty bad bug as any errors are not announced in most apps as they happen or whatever else use case a person has for live region