feat: 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.
|
@roryabraham
Explanation of Change
Migrates the main chat action list (
ReportActionsList) from FlashList to LegendList.The new
InvertedLegendListadapter keeps the existing newest-to-oldest ReportActionsList contract while LegendList renders chronological data internally. It preserves inverted index semantics for rendering, imperative scrolling, initial positioning, viewability callbacks, pagination endpoints, scroll offsets, header/footer placement, maintain-visible-content behavior, and composer scroll events.This intentionally excludes the previous work related to vertically centering an initially scrolled item.
Fixed Issues
$ TODO: Add the Expensify issue URL
PROPOSAL: TODO: Add the approved proposal comment URL
Tests
Automated coverage completed:
nr test --runInBand --watchman=false tests/unit/InvertedLegendListTest.tsx tests/unit/ReportActionsListThresholdTest.tsx tests/ui/ReportActionsListTest.tsx tests/unit/useReportScrollManagerTest.tsx tests/unit/useReportActionsScrollTest.tsxnr react-compiler-compliance-check check-changedTODO: Add repeatable manual chat-list testing steps for all supported platforms, including initial positioning, pagination, deep links, new messages, scroll restoration, action badges, unread markers, and failure scenarios.
Offline tests
TODO: Add repeatable offline, spotty-network, and reconnect testing steps for the migrated chat list.
QA Steps
TODO: Add repeatable staging QA steps after manual coverage is confirmed.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avatar, 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.thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler)Screenshots/Videos
Android: Native
TODO: Add screenshot or video.
Android: mWeb Chrome
TODO: Add screenshot or video.
iOS: Native
TODO: Add screenshot or video.
iOS: mWeb Safari
TODO: Add screenshot or video.
MacOS: Chrome / Safari
TODO: Add screenshot or video.