Repository navigation
[Windows][CV1] Fix RemainingItemsThresholdReached Not Firing with GridItemsLayout in CollectionView - #40368
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 40368Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 40368" |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/rebase |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PR Test Gate
🧪 Gate analysis — click to expand⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect. No interpretable test-group summary was produced. No additional test execution is inferred. Setup did not capture a verified PR head; no commit is claimed as tested. No immutable without-fix baseline was prepared. |
d698fbd to
687293e
Compare
This comment has been minimized.
This comment has been minimized.
PR Test Gate
🧪 Gate analysis — click to expand⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect. No interpretable test-group summary was produced. No additional test execution is inferred. Setup did not capture a verified PR head; no commit is claimed as tested. No immutable without-fix baseline was prepared. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PR Test Gate
🧪 Gate analysis — click to expand⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect. No interpretable test-group summary was produced. No additional test execution is inferred. Setup did not capture a verified PR head; no commit is claimed as tested. No immutable without-fix baseline was prepared. |
This comment has been minimized.
This comment has been minimized.
PR Test Gate
🧪 Gate analysis — click to expand⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect. No interpretable test-group summary was produced. No additional test execution is inferred. Setup did not capture a verified PR head; no commit is claimed as tested. No immutable without-fix baseline was prepared. |
| firstVisibleItemIndex = itemsPanel.FirstVisibleIndex; | ||
| lastVisibleItemIndex = itemsPanel.LastVisibleIndex; | ||
| } | ||
| else if (CollectionViewSource?.IsSourceGrouped == false && ListViewBase.ItemsPanelRoot is ItemsWrapGrid itemsWrapGrid) |
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - The grouped-source exclusion has no discriminating negative-case test. All three added tests use ungrouped sources, so removing CollectionViewSource?.IsSourceGrouped == false && leaves every new assertion unchanged while routing grouped grids through native-panel indexes instead of the intentionally retained presenter fallback. Existing grouped-grid tests check rendering and group styles, not visible indexes. Add a multi-group CV1 ItemsWrapGrid scrolling test that distinguishes the fallback from the native-panel calculation, so accidental removal of this exclusion is detected.
0d7f770
into
dotnet:candidate/11.0.1xx-sr2
Target Branch
mainnet11, for reviewFor .NET 11 fixes, only a maintainer retargets the approved PR to the active
inflight lane and merges it after CI validates that final base. Do not merge
individual fixes directly into
net11; agents must not retarget or merge.Issue Details:
On Windows CV1, a CollectionView using GridItemsLayout stops firing RemainingItemsThresholdReached after item containers are recycled. The Scrolled event also reports incorrect visible item indexes.
The handler counted positions within realized containers rather than actual collection indexes, preventing the remaining-items threshold from being reached.
Description of Changes:
Updated ItemsViewHandler.Windows.cs to read FirstVisibleIndex and LastVisibleIndex directly from ItemsWrapGrid for ungrouped sources.
This keeps indexes accurate after recycling and allows incremental loading to continue.
Issues Fixed
Fixes #40239
Tested the behavior in the following platforms.
Before-40239.mp4
After-40239.mp4