Repository navigation
Use the declared spacer height for the Virtualize scale factor - #70629
joshbarros wants to merge 11 commits into
Conversation
getScaleFactor divided the measured spacer height by offsetHeight, which is rounded to whole pixels. With fractional row heights the ratio drifts from 1 even without a zoom or transform, and dividing the large spacer separations by it moved the window behind the viewport until the list stayed blank. Use the fractional inline height the spacer was given when present and fall back to offsetHeight otherwise. Add a table-in-a-container test page and an E2E test that scrolls with the report's cadence and asserts a rendered row stays visible. Fixes dotnet#70553
|
Thanks for your PR, @joshbarros. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/review |
There was a problem hiding this comment.
Source-only review of frozen head e474cfaea0eae97dc2f4868894b29b801656e5ec.
One candidate is published inline as externally unresolved: repository source proves the changed scale calculation and its downstream item-distribution path, but the decisive browser box-model and IntersectionObserver behavior is not present in the frozen evidence. No existing feedback duplicated this concern; the frozen feedback contained only assignment/status comments.
Both routed guides completed: docs/CrossCuttingGuidance.md and docs/BlazorComponentsGuidance.md. Each used the requested gpt-5.6-sol worker model; reasoning effort was not supplied (runtime default). The post-gate verifier also used gpt-5.6-sol and downgraded the candidate for missing external contract evidence. No materially changed area was left without a routed guide.
Guidance provenance: immutable workflow commit 18781e9d03cba0f3df9cdf7fae90f77771ca9f00. Product evidence was limited to tracked frozen source for head, merge base dd1062f94f356d6be59ad340e5aff2fd829165c6, and base tip 18781e9d03cba0f3df9cdf7fae90f77771ca9f00. Tests, CI, browser workflows, and implementation samples were not executed; changed tests were assessed from source. Security assessment was excluded by repository policy. Symlink, submodule, LFS-target, runtime, and external browser-contract behavior remain outside this proof.
Generated by ASP.NET Core Pull Request Review for #70629 · copilot · gpt56 · 220.3 AIC · ⌖ 8.49 AIC · ⊞ 20.1K
Comment /review to run again
|
/review |
There was a problem hiding this comment.
🟡 Changes recommended
The regression test can pass without exercising the stalled-window failure because provider completion is not gated and the placeholder-only state is never verified.
1 open issue
What changed in this PR
This PR addresses #70553 by reducing rounding error in Blazor Virtualize scale calculations, which can leave fractional-height lists with a blank viewport.
Changes:
- Uses the fractional declared spacer height when it closely matches the rendered box, otherwise retaining the
offsetHeightfallback. - Adds a fractional-height table scenario with asynchronous loading.
- Adds a Selenium test that reproduces the reported scroll cadence and checks for visible rows afterward.
| File | Description |
|---|---|
src/Components/Web.JS/src/Virtualize.ts |
Updates the scale-factor denominator to avoid integer-height rounding error. |
src/Components/test/testassets/BasicTestApp/VirtualizationFractionalHeightTable.razor |
Adds the fractional-height table fixture. |
src/Components/test/testassets/BasicTestApp/Index.razor |
Registers the fixture in the test component selector. |
src/Components/test/E2ETest/Tests/VirtualizationTest.cs |
Adds browser coverage for row visibility after repeated scrolling. |
Review effort: Balanced
There was a problem hiding this comment.
Source-only review of frozen head 9908afea5bd1f9c6aa8ce748b3f124160c1b6d92.
One P3 candidate is published inline as externally unresolved: source proves the final assertion accepts any positive row intersection, but the frozen evidence contains no target-browser red/green artifact establishing that the reverted production path yields a substantially blank viewport that still passes this predicate.
Existing-feedback coverage was assessed without endorsement: inline comment 4609151068 already covers the distinct provider-timing false-pass risk, so it was not repeated. Inline thread 4591757756/reply 4600341383 covers spacer padding or border affecting the scale denominator; frozen source shows the one-pixel boundary remains accepted, but browser box-model/IntersectionObserver proof and the resulting observable failure are unavailable, so that concern remains unresolved rather than republished.
Both routed guides completed: docs/CrossCuttingGuidance.md and docs/BlazorComponentsGuidance.md. Each worker used gpt-5.6-sol; reasoning effort was not supplied (runtime default). The post-gate verifier also used gpt-5.6-sol. No materially changed area was left without a routed guide.
Guidance provenance: immutable workflow commit c5baf473f31fa3bbe9f8201e3411361c632f3a91. Product evidence was limited to tracked frozen source for the head, merge base dd1062f94f356d6be59ad340e5aff2fd829165c6, and base tip c5baf473f31fa3bbe9f8201e3411361c632f3a91. Tests, CI, browser workflows, and implementation samples were not executed; changed tests were assessed from source. Security assessment was excluded by repository policy. Symlink, submodule, LFS-target, runtime, and external browser-contract behavior remain outside this proof.
Generated by ASP.NET Core Pull Request Review for #70629 · copilot · gpt56 · 217.5 AIC · ⌖ 8.52 AIC · ⊞ 20.1K
Comment /review to run again
|
The local review panel (GPT-5.6, GPT-6.1 and Opus 5.5) completed review of The current-head Copilot feedback is still unresolved, so the campaign label is Informational discarded check: A reviewer considered residual subpixel table-layout snapping at Posted for informational purposes so the author can confirm the verifier didn't discard or leave unresolved a real finding; this item does not block Untested coverage: The panel did not establish identical-test browser fail-before/pass-after evidence. The spacer-decoration and provider/viewport-assertion diagnostics are already recorded in the current-head hosted review and existing feedback, so they are not repeated inline. Routine discarded checks: No new issue was established in invalid-height fallback, transform/zoom handling, cancellation, style synchronization or test-asset registration. Validation boundary: All three local arms assessed frozen source; none ran a target build, test or browser. Human-directed and GitHub Copilot-generated. |
|
CI is green except |
It can but since the failure is in the newly added test, it's not a good idea to let it be flaky. What's more, the problem seems to be deterministic.. It looks like the test waits for placeholders before the item provider had a chance to return. The provider waits for release button before returning the total item count. Without it, we cannot render any placeholder. In such cases, it's always good to run the tests locally. Was it passing locally for you? |
|
/review |
There was a problem hiding this comment.
🟡 Changes recommended
The test waits for placeholders while the provider blocks the initial load, leaving the item count at zero and causing a timeout before scrolling or releasing the pending load.
1 open issue
1 resolved since last review
Review effort: Balanced
|
The local review panel (GPT-5.6, GPT-6.1 and Opus 5.5) completed review of The current-head Copilot feedback is still unresolved, so Informational discarded/unresolved check: The panel revisited the one-pixel spacer-decoration boundary at Posted for informational purposes so the author can confirm the verifier didn't discard or leave unresolved a real finding; this item does not block Untested coverage: Identical-test real-browser fail-before/pass-after evidence for the fractional-height fix was not established. Routine discarded checks: No additional issue was established in invalid-height fallback, invariant pixel production, transform/zoom compensation, canceled-result handling, height synchronization/clamping, subpixel snapping, or the awaited scroll cadence. Validation boundary: All three local arms reviewed frozen source; none ran a target build, test or browser. Human-directed and GitHub Copilot-generated. |
Signed-off-by: Josue Barros <goldenglowitsolutions@gmail.com>
|
Hosted CI Human-directed and GitHub Copilot-generated. |
|
/review |
|
Hosted CI Human-directed and GitHub Copilot-generated. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
/review |
|
Hosted CI Human-directed and GitHub Copilot-generated. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
/review |
|
Hosted CI Human-directed and GitHub Copilot-generated. |
|
/review |

Description
getScaleFactordivided the measured spacer height byoffsetHeight, which is rounded to whole pixels. With fractional row heights the ratio drifts from 1 even without a zoom or transform (the report measures0.999756for 53.015625px rows). Dividing the large spacer separations by that scale moves the rendered window behind the viewport until the list stays blank.Use the fractional inline height the spacer was given when present, and fall back to
offsetHeightotherwise.Adds
VirtualizationFractionalHeightTable, a table with fractional row heights inside a container scroller, and an E2E test that scrolls with the report's cadence (25 steps of 120px, 60ms apart) and asserts that a rendered row stays visible.Validation
tsc --noEmitonVirtualize.tspasses.Fixes #70553