feat: ItemCollectionTransition#22960
Conversation
There was a problem hiding this comment.
Pull request overview
This PR ports WinUI’s ItemCollectionTransition* type system into Uno, adding the core transition descriptor/progress/provider APIs plus a runtime test suite to validate expected add/remove/move transition behavior.
Changes:
- Added
ItemCollectionTransition, related enums, progress type, completed-event args, and the baseItemCollectionTransitionProviderimplementation underUI/Xaml/Controls/Repeater/. - Updated generated stubs to defer to the new handwritten implementations.
- Added runtime tests validating provider callbacks, filtering behavior, and
TransitionCompletedsemantics.
Reviewed changes
Copilot reviewed 7 out of 13 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionTriggers.cs | Adds [Flags] triggers enum used to describe why transitions occur. |
| src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionOperation.cs | Adds operation enum (Add/Remove/Move) for transition classification. |
| src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransition.cs | Adds transition descriptor object + Start()/HasStarted. |
| src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProgress.cs | Adds progress object used to signal completion back to the provider. |
| src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionCompletedEventArgs.cs | Adds event args for the provider’s TransitionCompleted event. |
| src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.cs | Adds provider batching logic using CompositionTarget.Rendering and keep-alive timers. |
| src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ItemCollectionTransition*.cs | Updates generated stubs to skip members now implemented in Uno sources. |
| src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_ItemCollectionTransitionProvider.cs | Adds runtime tests for transition provider call patterns and completion event behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
morning4coffe-dev
left a comment
There was a problem hiding this comment.
LGTM, lets just recheck with WinUI3 source please
a51ff01 to
a171406
Compare
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 23 changed files in this pull request and generated 4 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-22960/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html |
8402d72 to
bcc9f47
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 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 Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22960/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html |
|
|
…ollection # Conflicts: # src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ItemCollectionTransition.cs # src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ItemCollectionTransitionCompletedEventArgs.cs # src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ItemCollectionTransitionProgress.cs Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
|
@copilot adjust When_Items_Changed_TransitionProvider_Receives_Correct_Calls() test, which currently fails (even on WinUI) - actual count 0, expected count 1; and adjust When_Progress_Complete_TransitionCompleted_Is_Raised() which also fails even on winui with "at least one Transition should have been started" |
|
|
Resolved merge conflicts in commit fc5da14. The conflicts were in 3 generated files ( |
|
@copilot adjust When_Items_Changed_TransitionProvider_Receives_Correct_Calls() test, which currently fails (even on WinUI) - actual count 0, expected count 1; and adjust When_Progress_Complete_TransitionCompleted_Is_Raised() which also fails even on winui with "at least one Transition should have been started" |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22960/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html |
Agent-Logs-Url: https://github.com/unoplatform/uno/sessions/f41e80f9-014b-4817-b43b-62c9272ce1dc Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
Fixed in commit 327b333. Both tests were rewritten to call
Fixed in commit 327b333. Both tests rewritten to call |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22960/wasm-skia-net9/index.html |
|
@copilot winui build fails with src\Uno.UI.RuntimeTests\Tests\Microsoft_UI_Xaml_Controls\Given_ItemCollectionTransitionProvider.cs(61,27): Error CS1729: 'ItemCollectionTransition' does not contain a constructor that takes 4 arguments Either adjust test or disable it on Native winui via platform condition |
Agent-Logs-Url: https://github.com/unoplatform/uno/sessions/4dc16bea-1bb7-440a-838b-10b3f444cb95 Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
Fixed in commit 6a6bdb9 — wrapped both test methods and the helper class in |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22960/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html |
GitHub Issue: closes #22904
PR Type: ✨ Feature
What is the current behavior? 🤔
Support for
ItemCollectionTransitionmissingWhat is the new behavior? 🚀
Support for
ItemCollectionTransitionaddedPR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️