WIP: Port native chat thread list to Legend List#29331
Open
chrisnojima wants to merge 2 commits into
Open
Conversation
Replace the inverted FlatList in NativeConversationList with KeyboardAwareLegendList (@legendapp/list/keyboard), matching the desktop LegendList: non-inverted data, initialScrollAtEnd + maintainScrollAtEnd + alignItemsAtEnd + maintainVisibleContentPosition, onStartReached/onEndReached pagination, and the keyboard-controller integration hooks. - Gate the list mount on loaded so its first render always has data; initialScrollAtEnd is one-time and otherwise runs on an empty list when a thread loads async from the inbox, leaving it scrolled mid-list. - Reserve bottom clearance via contentContainerStyle paddingBottom so the newest message clears the sticky input bar; keep the composer inset seed at 0 so the two don't stack into a gap. - Stub @legendapp/list/keyboard for the web build in native-only-modules.js.
…o Legend List Master's #29332 search fixes were built for the inverted FlatList and did not survive the Legend List port. Re-derive them for the non-inverted KeyboardAwareLegendList: - Hit centering: master's closed-loop scrollToOffset corrector oscillates here (avg-height offset guessing fights Legend List virtualization plus the centered-load pagination that prepends older messages and blows up the target index mid-correction). Drop it. Real cause was disabling maintainVisibleContentPosition while centered, which let prepends shift the target; keep MVCP {data:true} on always and re-assert the native scrollToItem(viewPosition:0.5) across a few frames so MVCP holds the row steady between asserts. - Search-bar padding: consume searchOverlayHeight (previously measured but unread) by mirroring the shared value to state and reserving it as extra content paddingBottom so the centered hit clears the bar. - Jump-to-recent lift: jump-to-recent.tsx moved its mobile positioning into a list-area wrapper, which the port had removed; re-add the keyboard-aware jumpWrapper so the button is centered and rides above the bar/keyboard.
d6b4b7a to
a2f961f
Compare
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.
Replace the inverted FlatList in NativeConversationList with KeyboardAwareLegendList (@legendapp/list/keyboard), matching the desktop LegendList: non-inverted data, initialScrollAtEnd + maintainScrollAtEnd + alignItemsAtEnd + maintainVisibleContentPosition, onStartReached/onEndReached pagination, and the keyboard-controller integration hooks.