Repository navigation
Commit e8d01cc
committed
fix(mobile): seed the v2 home recycler with a measured-average row height
Both device passes hit the LegendList dev warning ("no unused container
available, creating one on demand") while scrolling the expanded
snoozed/settled shelves: iOS debugInfo 9 pooled / stillNeeded 3, Android
11 / stillNeeded 1. Reading the pool math (LegendList 3.3.5): the initial
container count is ceil((scrollLength + 2 * INITIAL_DRAW_DISTANCE=50) /
estimatedItemSize), so on a phone the 92pt estimate seeded only 9-10
containers — fewer than the ~11-12 items a shelf-expand puts in view at
once, so the re-layout overran the pool and created containers on demand
(one warned pass behind the measured-height expansion that follows).
Measured row heights: settled slim ~60dp, single-line cards ~74dp (252px
at Pixel 10 Pro density), two-line cards ~94dp. Seeding with 72 (the
average of the mix that actually sits under the finger, and the constant
the v1 list on this screen already uses) makes the initial pool
ceil(800/72) = 12, which covers the expand demand, removing the warning
class for the short/expanded-list regime where the pool tracks the item
count; LegendList self-corrects to measured spans afterwards, and long
lists pool 3x the estimate-based container count regardless. The prior
"taller bias is safe" note was wrong: the bias was exactly what
under-sized the pool.1 parent e0c3a3f commit e8d01cc
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| |||
0 commit comments