Repository navigation
feat(Repeater): VirtualizingLayoutContext.VisibleRect - #23111
Conversation
There was a problem hiding this comment.
Pull request overview
Adds WinUI-parity VisibleRect support to VirtualizingLayoutContext and wires it through the ItemsRepeater layout contexts so layouts can distinguish what’s actually visible from what’s realized (cache window).
Changes:
- Added
VirtualizingLayoutContext.VisibleRectandVisibleRectCore(). - Implemented
VisibleRectCore()inRepeaterLayoutContext(delegates toItemsRepeater.VisibleWindow) and inLayoutContextAdapter(infinite rect). - Updated repeater
ViewportTeststo record/assertVisibleRectbehavior alongsideRealizationRect.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Uno.UI/UI/Xaml/Controls/Repeater/VirtualizingLayoutContext.cs | Introduces VisibleRect API and core virtual method. |
| src/Uno.UI/UI/Xaml/Controls/Repeater/RepeaterLayoutContext.cs | Wires VisibleRect to the repeater owner’s visible window. |
| src/Uno.UI/UI/Xaml/Controls/Repeater/LayoutContextAdapter.cs | Provides an infinite visible rect for non-virtualizing contexts. |
| src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/VirtualizingLayoutContext.cs | Removes generated NotImplemented stubs now that the API exists in the real partial. |
| src/Uno.UI.RuntimeTests/MUX/Microsoft_UI_Xaml_Controls/Repeater/ViewportTests.cs | Extends tests to capture/validate VisibleRect vs RealizationRect. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
WinAppSDK sync generator drift detected on
|
|
|
|
/apply-sync-gen |
|
Pushed GitHub does not re-trigger workflows for commits pushed by the default bot, so the WinAppSDK Sync Generator Check will not automatically re-run. To turn it green, push any additional commit (for example |
2854989 to
4032f35
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 22 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/Uno.UI/UI/Xaml/Controls/Repeater/ViewManager.cs:873
- ClearElementToAnimator/MoveOwnershipToAnimator naming is now misleading because the logic was switched to TransitionManager and ItemCollectionTransitionProvider. Renaming these identifiers (and the ElementOwner.Animator enum value where applicable) to reflect transitions rather than an animator would reduce confusion when debugging ownership flows.
bool ClearElementToAnimator(UIElement element, VirtualizationInfo virtInfo)
{
bool cleared = m_owner.TransitionManager.ClearElement(element);
if (cleared)
{
int clearedIndex = virtInfo.Index;
virtInfo.MoveOwnershipToAnimator();
if (m_lastFocusedElement == element)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
WinAppSDK sync generator drift detected on
|
4032f35 to
195386e
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23111/wasm-skia-net9/index.html |
195386e to
7a89414
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 23 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23111/wasm-skia-net9/index.html |
7a89414 to
25e6b8a
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23111/wasm-skia-net9/index.html |
25e6b8a to
a7463a8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 24 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23111/wasm-skia-net9/index.html |
Port VisibleRect property and VisibleRectCore() from WinUI. Wire through RepeaterLayoutContext (delegates to owner.VisibleWindow) and LayoutContextAdapter (returns infinite rect). Port ViewportTests delta exercising VisibleRect vs RealizationRect distinction. Fixes #22902 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
a7463a8 to
9054f5d
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23111/wasm-skia-net9/index.html |
|
|
Port VisibleRect property and VisibleRectCore() from WinUI. Wire through RepeaterLayoutContext (delegates to owner.VisibleWindow) and LayoutContextAdapter (returns infinite rect). Port ViewportTests delta exercising VisibleRect vs RealizationRect distinction.
Fixes #22902
GitHub Issue: closes #
PR Type:
What is the current behavior? 🤔
What is the new behavior? 🚀
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️