Repository navigation
Improve QuickGrid virtualization coverage - #67671
Merged
Merged
Conversation
…under fast scroll.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands Blazor QuickGrid virtualization E2E coverage by adding a new scenario that exercises fast scrolling with an asynchronous ItemsProvider and an under-estimated ItemSize, helping ensure QuickGrid doesn’t get stuck rendering placeholders under cancellation/starvation conditions.
Changes:
- Add a new BasicTestApp QuickGrid test component that virtualizes rows with intentionally incorrect
ItemSizeplus async provider latency. - Register the new test component in the BasicTestApp component picker.
- Add a new E2E test that fast-scrolls the QuickGrid container and asserts the viewport eventually renders real (non-placeholder) data.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Components/test/testassets/BasicTestApp/QuickGridTest/QuickGridVirtualizeCapacityComponent.razor | New test component to reproduce fast-scroll + async provider + incorrect ItemSize conditions for QuickGrid virtualization. |
| src/Components/test/testassets/BasicTestApp/Index.razor | Adds a navigation entry for the new QuickGrid virtualization capacity test page. |
| src/Components/test/E2ETest/Tests/VirtualizationTest.cs | Adds an E2E test that fast-scrolls a virtualized QuickGrid and validates the viewport recovers from placeholder-only rendering. |
ilonatommy
marked this pull request as draft
July 8, 2026 12:34
dariatiurina
approved these changes
Jul 10, 2026
ilonatommy
enabled auto-merge (squash)
July 10, 2026 12:18
dariatiurina
approved these changes
Jul 10, 2026
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.
QuickGrid uses
Virtualize<TItem>internally, but our E2E suite exercises almost all of those behaviors only against the rawVirtualizecomponent. Only two tests today run virtualization through a grid. One notable gap is capacity/robustness under a misconfiguredItemSize- a very common real-world mistake, since QuickGrid forwardsItemSizebut can't know the true rendered row height.The an async
ItemsProvidercombined with a under-estimatedItemSize, when scrolling fast exposing the bottom spacer, is prone to callback cancellation. We have to make sure the items are eventually loaded and the viewport is not left blank.The symmetric raw-Virtualize test is
aspnetcore/src/Components/test/E2ETest/Tests/VirtualizationTest.cs
Line 227 in 3e156e1
The variable-height version of the test was failing because wrong placeholder size was used. We are passing
PlaceholderContexttoRenderPlaceholderRowfor some reason we were not setting it in QuickGrid, like we do for Virtualize:aspnetcore/src/Components/Web/src/Virtualization/Virtualize.cs
Line 523 in 4b9040e
So the JS code that was reading it in
aspnetcore/src/Components/Web.JS/src/Virtualize.ts
Line 86 in 4b9040e
Situation before the variable height fix:
QuickGrid-vairaible-height.mp4
After this PR:
variable-height-working.mp4