Uh oh!
There was an error while loading. Please reload this page.
feat(fabric): Implement Drag and Drop on View - #2713
Conversation
Summary: Add support for `draggedTypes` to the View component, enabling the configuration of a native view as a drop target. Test Plan: * Run Zeratul with Fabric enabled * Drag a file over the messages view and check that the cursor is changing indicating a drop target https://pxl.cl/4ldkW Reviewers: shawndempsey, #rn-desktop Reviewed By: shawndempsey Subscribers: taskcreeper Differential Revision: https://phabricator.intern.facebook.com/D53674739
decc891 to
daad2f3CompareSummary: Add the drag and drop event emitters to View with the payload conversion matching the Paper API for dragEnter/dragLeave/drop events. Test Plan: Tested later in this stack. Reviewers: shawndempsey, #rn-desktop Reviewed By: shawndempsey Differential Revision: https://phabricator.intern.facebook.com/D53674738
Summary: Add support for drag and drop to the `ViewComponent` for files and images. The implementation converts the dropped pasteboard items the same way as in Paper. The `DataTransferItem` resulting from the pasteboard conversion of the dragged items is used to build the JS payload for the dragEnter/dragLeave/drop events. Test Plan: * Run Zeratul with Fabric enabled * Drag and drop an image on the messages view * Send the attachment https://pxl.cl/4ldB7 Reviewers: shawndempsey, #rn-desktop Reviewed By: shawndempsey Differential Revision: https://phabricator.intern.facebook.com/D53674742
3261b1e to
f1c03bfCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Patrick Boyd (PPatBoyd)
commented
Oct 2, 2025
fascinating -- would love to see a video and also a link to relevant docs for the current (core or community) API being supported here! |
Saad Najmi (Saadnajmi)
commented
Oct 2, 2025
I can link the PR where it was implemented for paper.. we have a demo in RNTester |
47cfc2b to
3d8f5f8CompareCo-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
2d4bee4 to
9a6095cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ddb1bc2 to
23c38b1CompareUh oh!
There was an error while loading. Please reload this page.
Summary:
Cherry pick more commits from #2117 to implement Drag and Drop Support on View.
Test Plan:
Moved the TextInput example (which doesn't work on Fabric yet) to a new page, and added a View example (which does work on Fabric)
Screen.Recording.2025-10-03.at.4.39.11.PM.mov