Repository navigation
Fix InitialItemIndex is intermittently ignored on fresh page load
#68114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 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 e60afe5
Align tolerance with the most commonly used in tests.
ilonatommy 0af1bd2
JS hook that assures test fails on regression.
ilonatommy 92a340e
Feedback: JS can inform C# about the reason why spacer is visible.
ilonatommy 8b8fc77
Merge branch 'main' into fix-68099
ilonatommy ba746b7
Limit the docs for internal class.
ilonatommy 211f8b4
Remove orphaned suppressSpacerCallbacks write left by #68064 merge
ilonatommy 6750257
Feedback: Add info about the cause when callback doesn't fire.
ilonatommy dbf91e9
Initialindex and ScrollToItem should test in-memory items as well.
ilonatommy 0f9bb04
Update src/Components/Web.JS/src/Virtualize.ts
ilonatommy c688c09
Fix in memory tests: move the data window after refreshing data.
ilonatommy aa751ae
Test further actions after the initial load.
ilonatommy 0332c35
Tighten test for https://github.com/dotnet/aspnetcore/issues/64029.
ilonatommy f898550
Fix both spacers visible case tested by `InitialRender_DispatchesSing…
ilonatommy 11d988d
Fix jumps. Leave the viewport fill for the follow up PR.
ilonatommy 22c3059
Clean tests: id=1 and id=5 are the same case. Move jumping and expans…
ilonatommy c239d69
Fix InitialItemIndex jump landing at wrong item on first scroll.
ilonatommy b172f57
Fix Virtualize programmatic scroll-to-bottom convergence and make sur…
ilonatommy 5480a17
Tighten the test.
ilonatommy 0dc8dc8
Fix `ScrollToItems` after `IntiailItemIndex!=0`: Pending state for In…
ilonatommy 847a030
`ScrollToItemAsync` respects cancellation token.
ilonatommy 6039b1e
Tests use real scrolling, not JS symulation of scrolling.
ilonatommy 1f618c8
`scroll` even is triggered by both user scoll and self scroll. Listen…
ilonatommy 6c67d88
Feedback: Avoid repeated programmatic scroll events being treated as …
ilonatommy 01cac72
More tests need real wheel srolling.
ilonatommy 89f4c00
More tests need correcting the scroll action.
ilonatommy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
26 changes: 26 additions & 0 deletions
26
src/Components/Web/src/Virtualization/SpacerVisibilityReason.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // 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, | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.