Repository navigation
feat(Grid): scroll="edge" - #95
Merged
Merged
Conversation
The grid stays still while focus moves through the rows that fit between its unscrolled top and the bottom of a clipping parent (or the screen). Past the last one it scrolls just enough to show the focused row; above the first row shown, that row returns to the grid's y. 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.
Adds
scroll="edge"toGrid(target:main).Behaviour
stage.root.h) when the parent does not clip. At least one row always counts as fitting.y.selectedchanges follow the same rules.auto(the default) andnoneare unchanged.Unlike Row's
edge, which asks the renderer whether the next child is in the viewport, Grid works out which rows fit from its sizes. Positions are read on each move down, so a Grid inside a Column that is still animating counts its rows from that moment's position.Tests
Three new cases in
tests/contract-grid.test.tsx:selectedchangesnpm test,npm run tscandnpm run lintpass.🤖 Generated with Claude Code