SelectionListNode: add WithFillHeight() for full-height list mode#210
Merged
Conversation
SelectionListNode<T> was capped at a static _visibleRows of 10 with no way to expand to fill available vertical space. Adding WithFillHeight() as an opt-in that switches HeightConstraint to FillRemaining and uses available.Height at measure time as the visible row count. - Add _fillHeight field and WithFillHeight() fluent builder - HeightConstraint returns FillRemaining() in fill mode, AutoSize() otherwise - Measure() updates _visibleRows from available.Height to keep scroll math (EnsureVisible) and scrollbar correct - WithVisibleRows() resets _fillHeight to false so it properly overrides - 7 new tests covering fill mode, clamping, and override semantics Fixes #207
5edbaf8 to
3f331c0
Compare
- Render() now syncs _visibleRows from bounds.Height in fill mode so EnsureVisible()'s scroll math is correct even when Render() runs without a preceding Measure() (as VerticalLayout.Render does for Fill children) - Simplify Measure() by removing the duplicated height calculation - WithFillHeight(bool fill = true) for consistency with WithShowNumbers - Add scroll-behavior test covering the render-without-measure path - Gallery: convert column 3 to a 100-item WithFillHeight() list to visually demonstrate the feature - Docs: clarify fill mode caps at item count and needs a full-height parent; document WithFillHeight(false)
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.
Summary\n\n was capped at a static
_visibleRowsof 10 with no way to expand to fill available vertical space. AddingWithFillHeight()as an opt-in that switchesHeightConstrainttoFillRemainingand usesavailable.Heightat measure time as the visible row count.\n\n## Changes\n\n- Add_fillHeightfield andWithFillHeight()fluent builder\n-HeightConstraintreturnsFillRemaining()in fill mode,AutoSize()otherwise\n-Measure()updates_visibleRowsfromavailable.Heightto keep scroll math (EnsureVisible) and scrollbar correct\n-WithVisibleRows()resets_fillHeightto false so it properly overrides\n- 7 new tests covering fill mode, clamping, and override semantics\n\n## Testing\n\nAll 47 tests pass (40 existing + 7 new), 0 failures.\n\nFixes #207