Repository navigation
feat: let maintainVisibleContentPosition keep the last visible item in place - #597
Open
chrispader wants to merge 1 commit into
Open
chrispader wants to merge 1 commit into
chrispader wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
chrispader
force-pushed
the
fix/anchor-end-aligned-lists
branch
from
November 9, 2026 10:53
5b488c9 to
141508e
Compare
…n place prepareMVCP always keeps the first visible item in place, so a size or data change moves the content below it. Chat-style lists are read from the bottom and need the opposite. For example, when older messages load and the oldest loaded message loses its sender header, it shrinks, and every message below it moves up. maintainVisibleContentPosition now accepts anchor: "start" | "end". With "end", the last visible item stays in place for size changes and is tried first among the fallback anchors for data changes, so changes only move the content above it, like in an inverted list. "start" stays the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrispader
force-pushed
the
fix/anchor-end-aligned-lists
branch
from
November 11, 2026 12:14
141508e to
ff4a88f
Compare
38 tasks done
chrispader
added a commit
to margelo/Expensify
that referenced
this pull request
Nov 12, 2026
Each LegendList patch is now the build output of its upstream PR, so the patches change exactly what the PRs change, in every bundle the PRs touch. - 001 and 003 now also patch the native bundles, as their PRs change shared code. - 002 adds the explicit maintainVisibleContentPosition anchor option that LegendApp/legend-list#597 now proposes, instead of anchoring the last visible item in every list with alignItemsAtEnd. - 004 contains LegendApp/legend-list#600, which now also skips deferred adjustments that a later native scroll already includes and moves the initial scroll target with each adjustment. - 006 keeps only the silent-retry fix from LegendApp/legend-list#604. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrispader
added a commit
to margelo/Expensify
that referenced
this pull request
Nov 12, 2026
LegendList patch 002 now follows LegendApp/legend-list#597, which makes anchoring the last visible item an explicit maintainVisibleContentPosition option instead of deriving it from alignItemsAtEnd. The chat list passes anchor "end" whenever it aligns its messages to the end, so rows that resize or load above the reader's position keep moving only the content above it. 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.
MVCP keeps the first visible item in place when items resize or data changes. Chat-style lists are read from the bottom, so when an item near the top of the viewport changes height, every item below it moves. A common case is the oldest loaded message losing its author header after older messages from the same author load. This adds
anchor: "end"tomaintainVisibleContentPosition, which keeps the last visible item in place instead, like an inverted list.An earlier version of this PR tied the behavior to
alignItemsAtEnd. It is an explicit option now, so lists that only usealignItemsAtEndto pin short content keep their current anchoring, and the default stays"start".We need this for Expensify/App#100733, which moves the chat message list to LegendList. Expensify currently carries this change as a patch.
Reproduction
maintainVisibleContentPosition={{ anchor: "end" }}, scrolled so that several items are visible.🤖 Generated with Claude Code