Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c278450
Fix the spacer callback and item-alignment call race on initial trans…
ilonatommy Jul 30, 2026
e60afe5
Align tolerance with the most commonly used in tests.
ilonatommy Jul 30, 2026
0af1bd2
JS hook that assures test fails on regression.
ilonatommy Jul 31, 2026
92a340e
Feedback: JS can inform C# about the reason why spacer is visible.
ilonatommy Aug 6, 2026
8b8fc77
Merge branch 'main' into fix-68099
ilonatommy Aug 6, 2026
ba746b7
Limit the docs for internal class.
ilonatommy Aug 6, 2026
211f8b4
Remove orphaned suppressSpacerCallbacks write left by #68064 merge
ilonatommy Aug 6, 2026
6750257
Feedback: Add info about the cause when callback doesn't fire.
ilonatommy Aug 6, 2026
dbf91e9
Initialindex and ScrollToItem should test in-memory items as well.
ilonatommy Aug 7, 2026
0f9bb04
Update src/Components/Web.JS/src/Virtualize.ts
ilonatommy Aug 7, 2026
c688c09
Fix in memory tests: move the data window after refreshing data.
ilonatommy Aug 7, 2026
aa751ae
Test further actions after the initial load.
ilonatommy Aug 7, 2026
0332c35
Tighten test for https://github.com/dotnet/aspnetcore/issues/64029.
ilonatommy Aug 10, 2026
f898550
Fix both spacers visible case tested by `InitialRender_DispatchesSing…
ilonatommy Aug 10, 2026
11d988d
Fix jumps. Leave the viewport fill for the follow up PR.
ilonatommy Aug 10, 2026
22c3059
Clean tests: id=1 and id=5 are the same case. Move jumping and expans…
ilonatommy Aug 10, 2026
c239d69
Fix InitialItemIndex jump landing at wrong item on first scroll.
ilonatommy Aug 10, 2026
b172f57
Fix Virtualize programmatic scroll-to-bottom convergence and make sur…
ilonatommy Aug 10, 2026
5480a17
Tighten the test.
ilonatommy Aug 10, 2026
0dc8dc8
Fix `ScrollToItems` after `IntiailItemIndex!=0`: Pending state for In…
ilonatommy Aug 11, 2026
847a030
`ScrollToItemAsync` respects cancellation token.
ilonatommy Aug 11, 2026
6039b1e
Tests use real scrolling, not JS symulation of scrolling.
ilonatommy Aug 13, 2026
1f618c8
`scroll` even is triggered by both user scoll and self scroll. Listen…
ilonatommy Aug 13, 2026
6c67d88
Feedback: Avoid repeated programmatic scroll events being treated as …
ilonatommy Aug 13, 2026
01cac72
More tests need real wheel srolling.
ilonatommy Aug 13, 2026
89f4c00
More tests need correcting the scroll action.
ilonatommy Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
246 changes: 173 additions & 73 deletions src/Components/Web.JS/src/Virtualize.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ namespace Microsoft.AspNetCore.Components.Web.Virtualization;

internal interface IVirtualizeJsCallbacks
{
void OnBeforeSpacerVisible(float spacerSize, float spacerSeparation, float containerSize);
void OnAfterSpacerVisible(float spacerSize, float spacerSeparation, float containerSize);
void OnBeforeSpacerVisible(float spacerSize, float spacerSeparation, float containerSize, SpacerVisibilityReason reason);
void OnAfterSpacerVisible(float spacerSize, float spacerSeparation, float containerSize, SpacerVisibilityReason reason);
}
32 changes: 32 additions & 0 deletions src/Components/Web/src/Virtualization/SpacerVisibilityReason.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Microsoft.AspNetCore.Components.Web.Virtualization;

/// <remarks>
/// The numeric values must stay in sync with the <c>SpacerVisibilityReason</c> constant in
/// <c>Virtualize.ts</c>.
/// </remarks>
internal enum SpacerVisibilityReason
{
/// <summary>The user scrolled the spacer into view.</summary>
UserScroll = 0,

/// <summary>
/// A scroll the component itself performed (initial positioning, <c>ScrollToItemAsync</c>, or an
/// anchor restore) transiently exposed the spacer.
/// </summary>
ProgrammaticScroll = 1,

/// <summary>
/// The spacer is visible at rest because the rendered window does not cover the viewport, so the
/// window should grow toward the spacer to fill it.
/// </summary>
ViewportFill = 2,

/// <summary>
/// Not a real spacer-visibility event. Refines the item-size estimate from the already-rendered
/// window without triggering window redistribution.
/// </summary>
RenderedContentMeasurement = 3,
}
Loading
Loading