Skip to content

feat: ItemCollectionTransition#22960

Merged
MartinZikmund merged 11 commits intomasterfrom
dev/mazi/repeater-collection
Apr 17, 2026
Merged

feat: ItemCollectionTransition#22960
MartinZikmund merged 11 commits intomasterfrom
dev/mazi/repeater-collection

Conversation

@MartinZikmund
Copy link
Copy Markdown
Member

GitHub Issue: closes #22904

PR Type: ✨ Feature

What is the current behavior? 🤔

Support for ItemCollectionTransition missing

What is the new behavior? 🚀

Support for ItemCollectionTransition added

PR Checklist ✅

Please check if your PR fulfills the following requirements:

Other information ℹ️

Copilot AI review requested due to automatic review settings April 3, 2026 08:12
@MartinZikmund MartinZikmund self-assigned this Apr 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 base ItemCollectionTransitionProvider implementation under UI/Xaml/Controls/Repeater/.
  • Updated generated stubs to defer to the new handwritten implementations.
  • Added runtime tests validating provider callbacks, filtering behavior, and TransitionCompleted semantics.

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.

Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProgress.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProgress.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.cs Outdated
Copy link
Copy Markdown
Member

@morning4coffe-dev morning4coffe-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets just recheck with WinUI3 source please

@MartinZikmund MartinZikmund force-pushed the dev/mazi/repeater-collection branch from a51ff01 to a171406 Compare April 6, 2026 09:54
@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html

Copilot AI review requested due to automatic review settings April 6, 2026 10:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.mux.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProvider.mux.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransitionProgress.h.mux.cs Outdated
@unodevops
Copy link
Copy Markdown
Contributor

🤖 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

@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html

@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html

Copilot AI review requested due to automatic review settings April 16, 2026 06:51
@MartinZikmund MartinZikmund force-pushed the dev/mazi/repeater-collection branch from 8402d72 to bcc9f47 Compare April 16, 2026 06:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/Uno.UI/UI/Xaml/Controls/Repeater/ItemCollectionTransition.mux.cs Outdated
@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html

@unodevops
Copy link
Copy Markdown
Contributor

🤖 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

@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html

@unodevops
Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 207520 has failed on Uno.UI - CI.

…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>
@MartinZikmund
Copy link
Copy Markdown
Member Author

@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"

Copilot AI review requested due to automatic review settings April 17, 2026 07:31
@MartinZikmund MartinZikmund review requested due to automatic review settings April 17, 2026 07:31
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ MartinZikmund
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

@copilot resolve the merge conflicts in this pull request

Resolved merge conflicts in commit fc5da14. The conflicts were in 3 generated files (ItemCollectionTransition.cs, ItemCollectionTransitionCompletedEventArgs.cs, ItemCollectionTransitionProgress.cs) where master had regenerated them with [NotImplemented] stubs. Kept our versions which correctly reference the handwritten implementations via "Skipping already declared" comments. Build passes with 0 warnings/errors.

@MartinZikmund
Copy link
Copy Markdown
Member Author

@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"

@unodevops
Copy link
Copy Markdown
Contributor

🤖 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

@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html

Copilot AI review requested due to automatic review settings April 17, 2026 08:13
@MartinZikmund MartinZikmund review requested due to automatic review settings April 17, 2026 08:13
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

@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_Transit...

Fixed in commit 327b333. Both tests were rewritten to call QueueTransition directly (bypassing ItemsRepeater integration, which isn't wired up yet) and wait for CompositionTarget.Rendering to fire — the same frame where the provider processes its batch. This matches the pattern used in ElementAnimatorTests. Both tests now pass on Skia Desktop.

@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_Transit...

Fixed in commit 327b333. Both tests rewritten to call QueueTransition directly and await CompositionTarget.Rendering instead of WaitForIdle. Verified passing on Skia Desktop.

@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html

@unodevops
Copy link
Copy Markdown
Contributor

🤖 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

@MartinZikmund
Copy link
Copy Markdown
Member Author

@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

Copilot AI review requested due to automatic review settings April 17, 2026 09:29
@MartinZikmund MartinZikmund review requested due to automatic review settings April 17, 2026 09:29
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

@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 c...

Fixed in commit 6a6bdb9 — wrapped both test methods and the helper class in #if HAS_UNO. The tests use internal Uno-only constructors on ItemCollectionTransition (ported from WinUI C++ internal factory methods) that don't exist on native WinUI, so they must be excluded from the Windows/WinAppSDK build.

@unodevops
Copy link
Copy Markdown
Contributor

🤖 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

@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22960/docs/index.html

@MartinZikmund MartinZikmund merged commit eb2838f into master Apr 17, 2026
43 checks passed
@MartinZikmund MartinZikmund deleted the dev/mazi/repeater-collection branch April 17, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Repeater] Port ItemCollectionTransition type system (new types)

6 participants