Repository navigation
chore: Sync master → feature/breakingchanges - #24355
Conversation
feat: Add opt-in press-to-stop-momentum for ManipulationMode panning
Lands master's press-to-stop-momentum opt-in on the branch's renamed surface: `ManipulationExtensions` moves with `Uno.UI.Toolkit` -> `src/Uno.UI.Extras`, and its namespace becomes the natural `Uno.UI.Xaml` (the namespace of the `UIElement` it extends), matching `UIElementExtensions` and the `uux` XAML prefix. The runtime test's `Uno.UI.Toolkit.DevTools.Input` becomes `Uno.UI.DevTools.Input`. `GestureRecognizer.Manipulation` conflicted only on adjacency: master's new `IsCoasting` sits next to the `AddPointer` signature this branch qualifies as `global::Microsoft.UI.Input.PointerPoint`. Both kept. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Gsfy1USDYeExNxsQGd3FQQ
|
Claude finished @MartinZikmund's task in 2m 26s —— View job Claude's review of PR #24355Todo list
Verdict: ✅ ShipThis is a clean branch-sync PR (master → Checks performed:
One pre-existing nit, not introduced by this PR (no inline comment posted, since it doesn't originate here): |
There was a problem hiding this comment.
🟡 Changes recommended
The newly added runtime test injects input and asserts immediately without an idle wait, which can make the test outcome timing-dependent and flaky in CI.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR synchronizes master into feature/breakingchanges, bringing in the “press-to-stop-momentum” opt-in work and resolving conflicts/relocations so the incoming changes land cleanly on the branch’s renamed surface.
Changes:
- Adds internal signaling in
GestureRecognizer/UIElementto detect when a pointer down aborts a coasting (inertia) manipulation, plus a helper to suppress gesture recognition for a given pointer. - Introduces
Uno.UI.Xaml.ManipulationExtensions.IsTapToStopInertiaEnabled(inUno.UI.Extras) to opt into “first tap stops momentum only” behavior on supported targets. - Carries over validation artifacts: unit tests, runtime tests, SamplesApp manual sample, and documentation updates.
File summaries
| File | Description |
|---|---|
| src/Uno.UI/UI/Xaml/UIElement.Pointers.cs | Exposes internal element-level helpers to read “last down stopped inertia” and to suppress gesture recognition for a pointer. |
| src/Uno.UI/UI/Input/WinRT/GestureRecognizer.Manipulation.cs | Adds IsCoasting to represent “in inertia with no active pointer” for manipulations. |
| src/Uno.UI/UI/Input/WinRT/GestureRecognizer.cs | Tracks LastDownStoppedInertia during ProcessDownEvent so callers can detect “press aborted inertia” without changing default behavior. |
| src/Uno.UI.UnitTests/Windows_UI_Input/Given_GestureRecognizer.cs | Adds unit coverage that inertia-aborting presses still raise tap by default and are reported via the new flag. |
| src/Uno.UI.RuntimeTests/Tests/Uno_UI_Toolkit/Given_ManipulationExtensions.cs | Adds runtime validation for the opt-in behavior across a small “DataGrid-like” visual tree. |
| src/Uno.UI.Extras/ManipulationExtensions.cs | Implements the attached property + tracking logic to mute tap-related gestures on the pointer path when a press aborts inertia (opt-in). |
| src/SamplesApp/SamplesApp.Samples/Windows/UI/Input/GestureRecognizerTests/Manipulation_TapStopsInertia.xaml.cs | Adds a manual validation sample demonstrating the opt-in’s effect on selection while coasting. |
| src/SamplesApp/SamplesApp.Samples/Windows/UI/Input/GestureRecognizerTests/Manipulation_TapStopsInertia.xaml | XAML UI for the manual sample, including instructions and the opt-in toggle. |
| doc/articles/additional-features.md | Documents the new opt-in behavior and its platform reach, including XAML usage examples. |
Review details
Suppressed comments (1)
src/Uno.UI.RuntimeTests/Tests/Uno_UI_Toolkit/Given_ManipulationExtensions.cs:83
PressWhileCoastinginjects the tap and returns immediately; add an idle wait after the tap so the resultingTappedevents have a chance to be raised before assertions in the calling test methods run.
using var tapFinger = injector.GetFinger(id: 43);
tapFinger.Tap(bounds.GetCenter());
return taps;
}
- Files reviewed: 9/9 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| finger.Tap(bounds.GetCenter()); | ||
|
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24355/wasm-skia-net9/index.html |
GitHub Issue: n/a — branch synchronization, no behavior change of its own.
PR Type:
🤖 Project automation
What changed? 🚀
Merges
masterintofeature/breakingchanges(11 commits, PR #24282 — the press-to-stop-momentum manipulation opt-in), and lands the incoming code on the branch's renamed surface.Conflict resolved —
GestureRecognizer.Manipulation.csAdjacency only:
masteraddsIsCoastingimmediately above theAddPointersignature that this branch qualifies asglobal::Microsoft.UI.Input.PointerPoint. Both sides kept.File relocations (git flagged these as "file location" conflicts):
master)src/Uno.UI.Toolkit/ManipulationExtensions.cssrc/Uno.UI.Extras/ManipulationExtensions.cs.../Windows_UI_Input/GestureRecognizerTests/Manipulation_TapStopsInertia.xaml{,.cs}.../Windows/UI/Input/GestureRecognizerTests/…doc/articles/Uno.UI.Toolkit.mddoc/articles/additional-features.md(auto-merged)Uno.UI.Toolkit→ natural namespacesFollowing the rule already applied to the rest of
Uno.UI.Extras— mirror the WinUI namespace of the type being extended:namespace Uno.UI.Toolkit(ManipulationExtensions)Uno.UI.XamlMicrosoft.UI.Xaml.UIElement, like the neighbouringUIElementExtensionsusing Uno.UI.Toolkit.DevTools.Input(runtime test)Uno.UI.DevTools.Inputnamespace …Tests.Uno_UI_Toolkit(runtime test)…Tests.Uno_UI_Extrasxmlns:toolkit="using:Uno.UI.Toolkit"(docs)xmlns:uux="using:Uno.UI.Xaml"XamlHelper.KnownXmlnses, matching theuuxcp:usage in the same documentTwo prose references to
Uno.UI.ToolkitinGestureRecognizer.cs/Given_GestureRecognizer.cscomments were repointed atUno.UI.Xaml.ManipulationExtensionsas well.Validation
Uno.UI.Extras.Skia(net10.0, pullsUno.UI)Uno.UI.RuntimeTests.Skia(net10.0)SamplesApphead (net10.0-desktop)MSB4011)dotnet xstyler -pon the new sample XAMLnet11.0 and the runtime-test execution are left to CI.
Known follow-up, deliberately not in this PR:
src/Uno.UI.RuntimeTests/Tests/Uno_UI_Toolkit/still carries the old folder name while every file inside it already declares…Tests.Uno_UI_Extras.PR Checklist ✅
masterScreenshots Compare Test Runresults.feature/breakingchanges🤖 Generated with Claude Code
https://claude.ai/code/session_01Gsfy1USDYeExNxsQGd3FQQ