windows-reactor list drag-and-drop#4550
Open
kennykerr wants to merge 12 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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, andallow_dropto 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.
windows-reactor list drag-and-drop supportwindows-reactor list drag-and-drop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
can_drag_items,can_reorder_items, andallow_dropbuilder methods tolist_viewandgrid_viewfor 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 thelist_viewandgrid_viewexamples to demonstrate reordering, and fixes a pre-existingpaddingvsmarginwarning in thelist_viewexample.Examples:
Fixes: #4506