Skip to content

windows-reactor list drag-and-drop - #4550

Merged
Kenny Kerr (kennykerr) merged 13 commits into
masterfrom
reactor-dragdrop
Jun 12, 2026
Merged

windows-reactor list drag-and-drop#4550
Kenny Kerr (kennykerr) merged 13 commits into
masterfrom
reactor-dragdrop

Conversation

@kennykerr

@kennykerr Kenny Kerr (kennykerr) commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Add can_drag_items, can_reorder_items, and allow_drop builder methods to list_view and grid_view for drag-and-drop reordering support. Adds the required bindings filter entries, wires the properties through the reconciler and WinUI backend, includes a selftest fixture that verifies the native control properties, updates the list_view and grid_view examples to demonstrate reordering, and fixes a pre-existing padding vs margin warning in the list_view example.

Examples:

 cargo run -p reactor_minimal --example list_view
 cargo run -p reactor_minimal --example grid_view

Fixes: #4506

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.

Pull request overview

Adds WinUI drag-and-drop/reordering support to windows-reactor’s templated lists by exposing builder flags and plumbing them through reconciliation into the WinUI backend, with updated bindings and examples. This addresses #4506 by enabling ListView/GridView reordering scenarios similar to the C# gallery.

Changes:

  • Add can_drag_items, can_reorder_items, and allow_drop to the templated list builder and propagate them through the reconciler/backend.
  • Extend reactor binding generation inputs and generated bindings to include the required WinUI APIs.
  • Add a selftest fixture for the new behavior and update minimal examples to demonstrate reordering.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/tools/reactor/src/test.txt Adds getter APIs to the bindings filter for selftest validation.
crates/tools/reactor/src/base.txt Adds setter APIs to the bindings filter for runtime support.
crates/tests/libs/reactor_selftest/src/registry.rs Registers a new fixture covering reorderable list view.
crates/tests/libs/reactor_selftest/src/fixtures/controls.rs Adds a reorderable ListView fixture and validates native properties.
crates/tests/libs/reactor_selftest/src/bindings.rs Updates generated selftest bindings to include the new vtable methods.
crates/samples/reactor/minimal/examples/list_view.rs Demonstrates list_view drag-to-reorder and fixes the padding/margin warning.
crates/samples/reactor/minimal/examples/grid_view.rs Demonstrates grid_view drag-to-reorder.
crates/libs/reactor/src/winui/backend/mod.rs Wires the new flags through to WinUI put_* calls.
crates/libs/reactor/src/core/templated_list.rs Adds builder fields/methods and stores the new flags on the element.
crates/libs/reactor/src/core/reconciler/templated.rs Applies the new flags on mount and updates them on diff.
crates/libs/reactor/src/core/backend.rs Adds backend hooks + recording ops for the new templated list flags.
crates/libs/reactor/src/bindings.rs Updates generated runtime bindings with the required WinUI setters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/tests/libs/reactor_selftest/src/fixtures/controls.rs Outdated
@kennykerr Kenny Kerr (kennykerr) changed the title windows-reactor list drag-and-drop support windows-reactor list drag-and-drop Jun 10, 2026

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.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Comment thread crates/libs/reactor/src/core/templated_list.rs
Comment thread crates/libs/reactor/src/core/templated_list.rs
Comment thread crates/tests/libs/reactor_selftest/src/registry.rs
@kennykerr
Kenny Kerr (kennykerr) merged commit 2c37058 into master Jun 12, 2026
26 checks passed
@kennykerr
Kenny Kerr (kennykerr) deleted the reactor-dragdrop branch June 12, 2026 17:19
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.

windows-reactor: Add can_reorder_items and allow_drop to list_view

2 participants