Repository navigation
[WASM] Add full support of RenderTransform in TransformToVisual - #2091
Conversation
Obviously! I will also add some documentation :) But before I'll see if I can multi target this method |
|
@davidjohnoliver @jeromelaban @ghuntley |
I'm not sure I see the point of draft PRs. |
|
A draft PR is a way to make sure it's working with CI and get resulting nuget packages for more testing. It's also a way to start a discussion about eventual changes. |
In that case it was to get your review on the fonctionnal aspect of this PR, especially as we chat about this specific method in one of your recent PRs :) |
|
Thanks @dr1rrb , still no joy, I checked out dev/dr/TouchTrans generated Still same behaviour buttons do not generate the command
|
|
Note: this PR only targets WASM, and a issue was opened to multi-target this for other platforms (#2114) |
1e86055 to
ae65c88
Compare
03cb4d5 to
907d775
Compare
1ee167b to
0ea1a10
Compare
|
/azp run |
1 similar comment
|
/azp run |
| else | ||
| { | ||
| // First apply any pending arrange offset that would have been impacted by this RenderTransform (eg. scaled) | ||
| // Friendly reminder: Matrix multiplication is usually not commutative ;) |
…ed to RuntimeTests)
Co-Authored-By: Jérôme Laban <[email protected]>
f60e5b6 to
526ca57
Compare
_skipBaseTypes suppressed the base clause on the generated partial for 51 types "because of legacy mismatched hierarchy". That legacy was the native view hierarchy, and the 7.0 native drop removed it: UIElement now derives from DependencyObject and FrameworkElement from UIElement, exactly as WinUI does, and 41 more entries beneath them fall out with them. 47 entries go: 43 whose Uno base already equals the WinUI base, three that name types absent from the WinAppSDK 2.1.3 projection or skipped wholesale elsewhere (Data.CollectionView, Controls.WebView, Controls.UIElementCollection), and one duplicate (Controls.ComboBox). The four that stay each mask a real divergence and now say which one. Regeneration adds a base clause to exactly 43 generated partials, each naming the type the hand-written partial already derives from, so the compiled metadata is unchanged. Uno.UI builds clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016ifDe4QKvwkcq5tp4tmxX7
_skipBaseTypes suppressed the base clause on the generated partial for 51 types "because of legacy mismatched hierarchy". That legacy was the native view hierarchy, and the 7.0 native drop removed it: UIElement now derives from DependencyObject and FrameworkElement from UIElement, exactly as WinUI does, and 41 more entries beneath them fall out with them. 47 entries go: 43 whose Uno base already equals the WinUI base, three that name types absent from the WinAppSDK 2.1.3 projection or skipped wholesale elsewhere (Data.CollectionView, Controls.WebView, Controls.UIElementCollection), and one duplicate (Controls.ComboBox). The four that stay each mask a real divergence and now say which one. Regeneration adds a base clause to exactly 43 generated partials, each naming the type the hand-written partial already derives from, so the compiled metadata is unchanged. Uno.UI builds clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016ifDe4QKvwkcq5tp4tmxX7
_skipBaseTypes suppressed the base clause on the generated partial for 51 types "because of legacy mismatched hierarchy". That legacy was the native view hierarchy, and the 7.0 native drop removed it: UIElement now derives from DependencyObject and FrameworkElement from UIElement, exactly as WinUI does, and 41 more entries beneath them fall out with them. 47 entries go: 43 whose Uno base already equals the WinUI base, three that name types absent from the WinAppSDK 2.1.3 projection or skipped wholesale elsewhere (Data.CollectionView, Controls.WebView, Controls.UIElementCollection), and one duplicate (Controls.ComboBox). The four that stay each mask a real divergence and now say which one. Regeneration adds a base clause to exactly 43 generated partials, each naming the type the hand-written partial already derives from, so the compiled metadata is unchanged. Uno.UI builds clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016ifDe4QKvwkcq5tp4tmxX7
_skipBaseTypes suppressed the base clause on the generated partial for 51 types "because of legacy mismatched hierarchy". That legacy was the native view hierarchy, and the 7.0 native drop removed it: UIElement now derives from DependencyObject and FrameworkElement from UIElement, exactly as WinUI does, and 41 more entries beneath them fall out with them. 47 entries go: 43 whose Uno base already equals the WinUI base, three that name types absent from the WinAppSDK 2.1.3 projection or skipped wholesale elsewhere (Data.CollectionView, Controls.WebView, Controls.UIElementCollection), and one duplicate (Controls.ComboBox). The four that stay each mask a real divergence and now say which one. Regeneration adds a base clause to exactly 43 generated partials, each naming the type the hand-written partial already derives from, so the compiled metadata is unchanged. Uno.UI builds clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016ifDe4QKvwkcq5tp4tmxX7
_skipBaseTypes suppressed the base clause on the generated partial for 51 types "because of legacy mismatched hierarchy". That legacy was the native view hierarchy, and the 7.0 native drop removed it: UIElement now derives from DependencyObject and FrameworkElement from UIElement, exactly as WinUI does, and 41 more entries beneath them fall out with them. 47 entries go: 43 whose Uno base already equals the WinUI base, three that name types absent from the WinAppSDK 2.1.3 projection or skipped wholesale elsewhere (Data.CollectionView, Controls.WebView, Controls.UIElementCollection), and one duplicate (Controls.ComboBox). The four that stay each mask a real divergence and now say which one. Regeneration adds a base clause to exactly 43 generated partials, each naming the type the hand-written partial already derives from, so the compiled metadata is unchanged. Uno.UI builds clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016ifDe4QKvwkcq5tp4tmxX7
_skipBaseTypes suppressed the base clause on the generated partial for 51 types "because of legacy mismatched hierarchy". That legacy was the native view hierarchy, and the 7.0 native drop removed it: UIElement now derives from DependencyObject and FrameworkElement from UIElement, exactly as WinUI does, and 41 more entries beneath them fall out with them. 47 entries go: 43 whose Uno base already equals the WinUI base, three that name types absent from the WinAppSDK 2.1.3 projection or skipped wholesale elsewhere (Data.CollectionView, Controls.WebView, Controls.UIElementCollection), and one duplicate (Controls.ComboBox). The four that stay each mask a real divergence and now say which one. Regeneration adds a base clause to exactly 43 generated partials, each naming the type the hand-written partial already derives from, so the compiled metadata is unchanged. Uno.UI builds clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016ifDe4QKvwkcq5tp4tmxX7
_skipBaseTypes suppressed the base clause on the generated partial for 51 types "because of legacy mismatched hierarchy". That legacy was the native view hierarchy, and the 7.0 native drop removed it: UIElement now derives from DependencyObject and FrameworkElement from UIElement, exactly as WinUI does, and 41 more entries beneath them fall out with them. 47 entries go: 43 whose Uno base already equals the WinUI base, three that name types absent from the WinAppSDK 2.1.3 projection or skipped wholesale elsewhere (Data.CollectionView, Controls.WebView, Controls.UIElementCollection), and one duplicate (Controls.ComboBox). The four that stay each mask a real divergence and now say which one. Regeneration adds a base clause to exactly 43 generated partials, each naming the type the hand-written partial already derives from, so the compiled metadata is unchanged. Uno.UI builds clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016ifDe4QKvwkcq5tp4tmxX7
GitHub Issue (If applicable): #2035
BugFix & Feature
Add full support of the
RenderTransformin theUIElement.TransformToVisualWhat is the current behavior?
The
UIElement.TransformToVisualonly request the current bounds of the UIElements and makes a diff to get an approximation of the offsetX and offsetY, but does not take in consideration the possible scale in between, nor the rotation.On WASM this impacts the pointers coordinates as they are computed from absolute coordinates and should be "scaled down" in order to remain in the bounds of the control.
What is the new behavior?
The returned transform is now including scale and rotation applied by any parent control.
PR Checklist
Screenshots Compare Test Runresults.