Repository navigation
Conversation
Android pointed lazy_stack at the scroll view renderer as a stopgap, which ignored content-padding. LazyStackRenderer replaces it and matches iOS: - children are keyed by node id - gap-* becomes the column's spacing - p-* and bg-* come in on the modifier like any element - content_padding_* becomes the LazyColumn's contentPadding - shows-indicators is accepted but does nothing, since a LazyColumn has no scroll indicator A LazyColumn keeps the first visible child in place by key when children are added above it, which is right for a reader scrolled down. It does that at the very top too, so new rows would land above the screen. The renderer checks during composition, before the new children are measured, whether the reader was at the top, and if so asks for the top again with requestScrollToItem(0). Inside a scroll view the height is unbounded and a LazyColumn would throw, so it falls back to a plain column, like the lazy grid does. On an API 35 emulator with the heimdall firehose (60 rows a second, capped at 1,000), the main thread applied 56 to 60 updates a second for the whole minute, before and after the cap, with new rows showing at the top. Scrolled down, the rows on screen stayed put until they were trimmed off the end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Android renderer for
<native:lazy-stack>, as a ComposeLazyColumn. Stacked on the iOS PR, so merge that first.gap-*sets the spacing between rows,content-paddingbecomescontentPadding, andp-*andbg-*work as on any element.shows-indicatorsdoes nothing, sinceLazyColumnhas no scrollbar.LazyColumnwould also hold its place and the new rows would land out of sight, so the renderer scrolls back to the top when you were there.lazy_grid.ScrollViewRenderer.Numbers
Heimdall firehose on an API 35 emulator, 60 rows a second for 60 seconds:
Worth checking
Tests: 4 new Robolectric tests. The existing list tests and the 501 PHP tests pass.
🤖 Generated with Claude Code