feat(outline): PROG-86 drag-to-reorder issues in the Outline view#55
Open
exe-dev-github-integration[bot] wants to merge 2 commits into
Open
feat(outline): PROG-86 drag-to-reorder issues in the Outline view#55exe-dev-github-integration[bot] wants to merge 2 commits into
exe-dev-github-integration[bot] wants to merge 2 commits into
Conversation
The Outline already sorted each sibling group by the fractional-index rank
(PROG-43) the board orders a status column by. So dragging a row to reorder
needs no backend change: the drop mints a key strictly between the two
neighbours (rankForReorder / rankBetween) and fires one optimistic
updateIssue({ rank }) — the same write the board makes. Because the rank is
shared, a drag in the Outline moves the card on the board and vice-versa,
which is what the issue asks for.
- Reorder within a sibling group only; a drop under a different parent/arc is
a no-op. Reparenting stays on Tab/Shift+Tab (rank-only, like the board).
- A dedicated grip handle starts drags, so the title input and the open-link
keep working; the whole subtree is the sortable block so a parent carries
its children. One DndContext per product, a SortableContext per group.
- PointerSensor (distance 4) covers mouse + touch from the grip (touch-none so
a grip drag reorders, not scrolls); KeyboardSensor makes the handle
arrow-key reorderable.
- Math is unit-tested (outlineReorder.test.ts); drag wiring verified in a
browser (reorder persisted across reload).
REFERENCE (Outline section) + a PROG-86 DECISIONS entry covering the shared-rank reuse and the reorder-within-siblings / grip-handle decisions.
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.
Closes the work for PROG-86 — drag issues up/down in the Outline, using the same backend rank as the board so a drag in either view moves the issue in the other.
How
The Outline already sorted each sibling group by the fractional-index
rank(PROG-43) the board uses to order a status column. So this needs no backend change: a drop mints a key strictly between the two drop neighbours (rankForReorder→rankBetween) and fires one optimisticupdateIssue({ rank })— the exact write the board makes. Shared key ⇒ bidirectional sync for free.Decisions
setActivatorNodeRefgrip in the left gutter starts drags while tapping/typing the input and the ⋯ open-link keep working.DndContextper product, aSortableContextper group.touch-noneso a grip drag reorders rather than scrolls); the focused handle is arrow-key reorderable for accessibility.Testing
outlineReorder.test.ts— 7 unit tests on the rank math (up/down/top/bottom/no-op/invalid).rankPATCH landed). Mobile (390px): grip renders, rows stay aligned.tsc -bclean.Docs
docs/REFERENCE.md(Outline) +docs/DECISIONS.md(### PROG-86).