Fixed
Status Update
Comments
je...@google.com <je...@google.com>
ap...@google.com <ap...@google.com> #2
Describing use case. Currently I have a following layout:
Box {
val state = rememberLazyListState()
LazyColumn(state) {
...
}
ThreeButtons(state)
}
In this example overscroll effect applied only to LazyColumn
, and because ThreeButtons
are outside of LazyColumn
, overscroll effect isn't applied to it. But ThreeButtons
are listening to the list scroll, and visually it looks like buttons are within the list. Video, attached to original description of the isue shows how it looks like.
But if I hoist overScrollController outside of LazyColumn
, I can achieve overscroll effect to be applied to buttons as well:
val overScrollController = ScrollableDefaults.overScrollController()
Box(Modifier.overScroll(overScrollController)) {
CompositionLocalProvider(LocalOverScrollConfiguration provides null) {
LazyColumn(state, overScrollController = overScrollController) {
...
}
}
ThreeButtons(state)
}
ap...@google.com <ap...@google.com> #3
I would vote for creating a separate feature request for it. This bug was intended to allow creating your own LazyColumn like components. How to customize the existing LazyColumn is a separate issue.
To add more context on this issue though, we we were thinking how to correctly implement something similar to item decorators. For example to draw lines between cells in LazyVerticalGrids. Theoretically it is possible via just adding Modifier.drawBehind {} oh it where in the draw block we read LazyGridState.layoutInfo and draw what we need according to it. However such drawing will not be moved with the content when overscroll happens in the same way as with ThreeButtons in the example.
To add more context on this issue though, we we were thinking how to correctly implement something similar to item decorators. For example to draw lines between cells in LazyVerticalGrids. Theoretically it is possible via just adding Modifier.drawBehind {} oh it where in the draw block we read LazyGridState.layoutInfo and draw what we need according to it. However such drawing will not be moved with the content when overscroll happens in the same way as with ThreeButtons in the example.
Description
When asserting the position of a node, or when printing positions of nodes in the semantics tree, use the unclipped bounds instead of the clipped bounds. Using the clipped bounds is confusing to the user, and makes it impossible to distinguish between a correctly sized node that is clipped to size S, and an incorrectly sized node that is clipped to size S.