Skip to content

SelectionListNode: add WithFillHeight() for full-height list mode#210

Merged
Aaronontheweb merged 3 commits into
devfrom
feature/selection-node-fill-height
May 18, 2026
Merged

SelectionListNode: add WithFillHeight() for full-height list mode#210
Aaronontheweb merged 3 commits into
devfrom
feature/selection-node-fill-height

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Owner

Summary\n\n 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.\n\n## Changes\n\n- Add _fillHeight field and WithFillHeight() fluent builder\n- HeightConstraint returns FillRemaining() in fill mode, AutoSize() otherwise\n- Measure() updates _visibleRows from available.Height to keep scroll math (EnsureVisible) and scrollbar correct\n- WithVisibleRows() resets _fillHeight to 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

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
@Aaronontheweb Aaronontheweb force-pushed the feature/selection-node-fill-height branch from 5edbaf8 to 3f331c0 Compare May 18, 2026 14:30
- 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)
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) May 18, 2026 16:22
@Aaronontheweb Aaronontheweb merged commit d238e71 into dev May 18, 2026
7 checks passed
@Aaronontheweb Aaronontheweb deleted the feature/selection-node-fill-height branch May 18, 2026 16:25
@Aaronontheweb Aaronontheweb mentioned this pull request May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant