-
Notifications
You must be signed in to change notification settings - Fork 839
feat(wasmskia): Drag & drop support #22315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 implements drag and drop support for WebAssembly/Skia platforms by integrating browser's native drag and drop API with Uno's drag and drop framework.
Key Changes:
- Adds a finalizer to
DataPackageto trigger cleanup via theDestroyedevent when the object is garbage collected - Implements browser-side drag and drop handling in TypeScript to capture drag events and manage data transfer
- Creates C# interop layer to bridge browser events to Uno's
CoreDragDropManager
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Uno.UWP/ApplicationModel/DataTransfer/DataPackage.cs | Adds finalizer and Destroyed event for cleanup when DataPackage is collected |
| src/Uno.UI.Runtime.Skia.WebAssembly.Browser/ts/Runtime/BrowserDragAndDropExtension.ts | New TypeScript implementation handling browser drag/drop events and data retrieval |
| src/Uno.UI.Runtime.Skia.WebAssembly.Browser/Extensions/BrowserDragDropExtension.cs | C# interop layer converting browser events to Uno drag/drop operations |
| src/Uno.UI.Runtime.Skia.WebAssembly.Browser/Hosting/WebAssemblyBrowserHost.cs | Registers the drag/drop extension with the API extensibility system |
| src/Uno.UI.Runtime.Skia.WebAssembly.Browser/Devices/Input/BrowserPointerInputSource.cs | Changes HtmlPointerButtonsState enum to internal for shared use |
src/Uno.UI.Runtime.Skia.WebAssembly.Browser/ts/Runtime/BrowserDragAndDropExtension.ts
Outdated
Show resolved
Hide resolved
src/Uno.UI.Runtime.Skia.WebAssembly.Browser/Extensions/BrowserDragDropExtension.cs
Outdated
Show resolved
Hide resolved
src/Uno.UI.Runtime.Skia.WebAssembly.Browser/Extensions/BrowserDragDropExtension.cs
Outdated
Show resolved
Hide resolved
src/Uno.UI.Runtime.Skia.WebAssembly.Browser/ts/Runtime/BrowserDragDropExtension.ts
Show resolved
Hide resolved
src/Uno.UI.Runtime.Skia.WebAssembly.Browser/Extensions/BrowserDragDropExtension.cs
Show resolved
Hide resolved
src/Uno.UI.Runtime.Skia.WebAssembly.Browser/ts/Runtime/BrowserDragAndDropExtension.ts
Outdated
Show resolved
Hide resolved
src/Uno.UI.Runtime.Skia.WebAssembly.Browser/ts/Runtime/BrowserDragAndDropExtension.ts
Outdated
Show resolved
Hide resolved
src/Uno.UI.Runtime.Skia.WebAssembly.Browser/Extensions/BrowserDragDropExtension.cs
Outdated
Show resolved
Hide resolved
|
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22315/wasm-skia-net9/index.html |
|
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22315/docs/index.html |
| { | ||
| if (pendingId == id) | ||
| { | ||
| _log.Error( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you validate if LogLevel.Error is enabled?
GitHub Issue: closes https://github.com/unoplatform/kahua-private/issues/400
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 βΉοΈ