Skip to content

[Drag] Allow to drag and drop between different FluentDragContainers - #5442

Merged
Denis Voituron (dvoituron) merged 10 commits into
microsoft:devfrom
MarvinKlein1508:drag-between-containers
Oct 19, 2026
Merged

Denis Voituron (dvoituron) merged 10 commits into
microsoft:devfrom
MarvinKlein1508:drag-between-containers

Conversation

@MarvinKlein1508

Copy link
Copy Markdown
Collaborator

Pull Request

📖 Description

This PR implements a new feature into FluentDragContainer which allows the user the drag and drop items from non nested FluentDragContainer instances.

Previously this was only possible if all containers are nested within each other.

2026-10-13.16-16-12.mp4

This makes it possible to create UIs like this

2026-10-13.16-35-44.mp4

👩‍💻 Reviewer Notes

📑 Test Plan

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

Copilot AI balanced review requested due to automatic review settings October 13, 2026 14:42
@MarvinKlein1508
Marvin Klein (MarvinKlein1508) marked this pull request as draft October 13, 2026 14:42
@MarvinKlein1508

Copy link
Copy Markdown
Collaborator Author

Will do more testing on this before I remove the Draft status

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Drag state can become stale, and touch drag-end events may be delivered to the destination instead of the original source.

2 open findings
What changed in this PR

Adds drag-and-drop support between non-nested FluentDragContainer instances using shared group state.

Changes:

  • Introduces FluentDragGroup<TItem> and cross-container touch targeting.
  • Adds lifecycle handling and tests for grouped containers.
  • Adds a two-list documentation example.
File Description
tests/​Core/​Components/​Drag/​FluentDragTests.razor Adds grouped drag and lifecycle tests.
src/​Core/​Components/​Drag/​FluentDragGroup.cs Implements shared drag state.
src/​Core/​Components/​Drag/​FluentDragContainer.razor.ts Enables grouped touch targets.
src/​Core/​Components/​Drag/​FluentDragContainer.razor.cs Integrates grouping and cross-container lookup.
src/​Core/​Components/​Drag/​FluentDragContainer.razor Emits the group identifier.
examples/​Demo/​FluentUI.Demo.Client/​Documentation/​Components/​Drag/​FluentDragDrop.md Links the new example.
examples/​Demo/​FluentUI.Demo.Client/​Documentation/​Components/​Drag/​Examples/​DragDropBetweenContainers.razor Demonstrates moving list items.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Drag-end resolution can invoke callbacks on the wrong container, while disposal can leave stale shared state.

1 open finding
2 resolved since last review

🧠 Review effort: Balanced

@MarvinKlein1508
Marvin Klein (MarvinKlein1508) marked this pull request as ready for review October 14, 2026 07:30
@vnbaaij Vincent Baaij (vnbaaij) added this to the v5.1.0 milestone Oct 14, 2026
This was referenced Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants