fix(data-table): keep the last row clear of the horizontal scrollbar - #60
Merged
Merged
Conversation
MoonDataTable draws its horizontal scrollbar as an absolute overlay pinned to the root's bottom edge, while the rows container is pinned to that same edge. The track therefore paints over the bottom of whichever row sits at the viewport bottom; mid-list the user scrolls past it, but at the end of the scroll range the last row can never be moved out from under the track and stays clipped. The rows container now insets by the track's own thickness whenever the track is drawn, under one shared predicate that both the overlay and the gutter call, so the two can never disagree about when the gutter exists. The track thickness becomes a single constant instead of a duplicated literal. Rendered-geometry tests pin both cases: rows end above the track when there is horizontal overflow, and reach the root bottom when there is none.
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.
What & why
MoonDataTabledraws its horizontal scrollbar as an absolute overlay pinned to the root'sbottom edge, while the rows container is pinned to that same edge. The track therefore paints
over the bottom of whichever row sits at the viewport bottom; mid-list the user scrolls past
it, but at the end of the scroll range the last row can never be moved out from under the track
and stays clipped.
The rows container now insets by the track's own thickness whenever the track is drawn, under
one shared predicate that both the overlay and the gutter call, so the two can never disagree
about when the gutter exists. The track thickness becomes a single constant instead of a
duplicated literal.
How to verify
Rendered-geometry tests pin both cases: rows end above the track when there is horizontal
overflow, and reach the root bottom when there is none. Checked by eye in MoonTerminal's
Report panel with the sibling override: the last row is fully visible at the end of the scroll
range.