fix(desktop): enable drag-and-drop for single pane tabs#1271
Conversation
react-mosaic-component skips connecting the drag source for root panes (path=[]), preventing single-pane tabs from being dragged to other tabs. Use MosaicWindowContext.connectDragSource to manually connect the drag source for root panes while preserving the library's default behavior for multi-pane layouts.
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe change modifies BasePaneWindow component to enable cross-tab drag-and-drop for root panes by introducing a RootDraggable internal component that connects to the Mosaic drag source via MosaicWindowContext. Root panes are identified using an isRoot flag based on path.length === 0. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
react-mosaic-componentskips connecting the drag source for root panes (path=[]), which prevents cross-tab drag-and-drop when a tab has only one paneMosaicWindowContext.connectDragSourceto manually connect the drag source for root panes while preserving the library's default behavior for multi-pane layoutsTest plan
Summary by CodeRabbit