Repository navigation
Add collection item dragging with Hierarchy reordering - #197
Merged
Merged
Conversation
CollectionDragDispatcher reports before/after insertion points while a ListView or TreeView row is dragged past a threshold, without consuming the press, so clicks still select. Escape, Cancel and PointerCancel cancel; refresh recomputes the target after scrolling. The Inspector reorders Scene's children through a node-free typed item.move command over published item IDs, with dimmed source, inset insertion band and Alt+Up/Down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Combine Hierarchy drag reordering with NumberInput scrubbing: both dispatchers route after the popups, and both smokes and docs remain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
This is the first slice of the proposed typed drag and drop: moving one item within a single ListView or TreeView.
CollectionDragDispatcherandcollection_drop_targetin collection_drag.hpp. No new document vocabulary, roles or semantic state.startedand the host resets the ordinary pointer press. Moves report the source key and abefore/afterinsertion point at the nearest displayed row. The release reports it asdrop; releasing outside the collection cancels.PointerCancelcancel and are consumed. Other key, text and logical input cancels unconsumed.refreshrecomputes the target at the last position, so a wheel scroll moves the insertion point. It cancels when the collection or the dragged row disappears, collapses away or becomes disabled.item.movecommand (item/targetobject IDs,placementenumeration), resolved withCommandSnapshot::resolveover published item IDs. Moving Scene, dropping before Scene and no-op drops reject withitem_move. Item data, selection and focus are kept.Verification
collection_drag: insertion points (halves, gaps, below rows, clipping, collapsed and disabled), threshold, click pass-through, toggles, drag/drop, cancellation paths, scroll and replacement refresh, rejection.inspector_hierarchywindow-free smoke: newreorder_smoke. The injected native smoke drags Light below Camera with Windows mouse messages under OS capture.collection_drag,inspector_hierarchyandinspector_hierarchy_nativepass.scripts/check-docs.ps1passes. Formatted with clang-format 23.1.1.This PR is independent of #196 (number scrubbing). Both edit
examples/inspector-hierarchy/main.cpp,CHANGELOG.mdand the Inspector guide, so whichever merges second needs a small rebase.Not included
Payload types beyond item keys, copy/link operations, drag previews, dragging between collections or into other targets, external OS drags, automatic scrolling while dragging, reparenting, transactions/history and native accessibility.
🤖 Generated with Claude Code