PoC: Migrate to LegendList - #98270
Conversation
|
|
There was a problem hiding this comment.
Can we avoid creating the InvertedLegendList wrapper? Legend list intentionally doesn't provide an inverted mode, because Jay claims that it's stupid and we should just call .reverse on the data prop. If true, I agree it's simpler not to think about an inverted list 🤷🏼
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Keep positioned zero-sized anchors eligible for native scroll compensation when LegendList corrects estimated item sizes.
Enable native data and size anchoring, limit end-following to the latest page near its bottom, and remove competing message and draft scroll effects. Consume explicit live-tail requests after rendering instead of on a future viewport layout. Keep the configured 1500px render window, correct the action-badge offset, and add regression coverage for scroll ownership and end-following.
Enable native data and size anchoring, limit end-following to the latest page near its bottom, and remove competing message and draft scroll effects. Consume explicit live-tail requests after rendering instead of on a future viewport layout. Keep the configured 1500px render window, correct the action-badge offset, and add regression coverage for scroll ownership and end-following.
…ader/feat/legend-list
|
@roryabraham i've split this PR up into several smaller PRs that are going to be easier to merge: Review order:
The diff of PRs >2 include all the changes of the previous PRs. |
|
Thanks for doing that proactively @chrispader. Good call |
|
We can probably split up PRs 4 and 5 even more, at the moment these just replace all FlashList/FlatList usages with LegendList, but we can also merge these migrations in batches. For now i'd say we focus on merging PRs 1-3 first 🙌🏼 |
@roryabraham
Explanation of Change
The main chat history still uses FlashList's inverted-list behavior, which makes pagination, index calculations, and imperative scrolling depend on reversed coordinates. This PR migrates
ReportActionsListto LegendList with chronological data and normal start/end semantics while preserving the existing chat behavior.InvertedFlashListimplementation and adds regression coverage for pagination, recycling, initial positioning, unread tracking, FullStory refs, and report scrolling.This intentionally excludes the earlier work related to vertically centering an initially scrolled item.
Fixed Issues
$ #98994
$ #99202
PROPOSAL:
Tests
Offline tests
QA Steps
Same as Tests and Offline tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Screenshots and videos are not included yet because this PR is still a draft.