Skip to content

fix(home): reorder slots live during the drag without ending it - #62

Merged
thypon merged 1 commit into
masterfrom
fix/slot-drag-live
Nov 12, 2026
Merged

thypon merged 1 commit into
masterfrom
fix/slot-drag-live

Conversation

@thypon

@thypon thypon commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Live reordering during the slot drag

Follow-up to #61 (merged before this landed — the branch was recreated, hence this new PR).

Device feedback: the drag should genuinely reorder the stack while held, move the crossed neighbours down/up organically, keep the held row under the finger — and never stop the drag on its own.

What was wrong

Re-parenting the held row mid-gesture detaches the touched view, which drops the touch stream — that is why the drag auto-dropped after a single swap in #60.

This change

  • The held row is never removed from its parent. When its center crosses into a neighbouring slot, the neighbour is re-parented around the held row (real order change, mid-drag), animating into its new place (150 ms; instant when animations are disabled).
  • The held row tracks the finger 1:1 the whole time and only settles on release.
  • The reorder threshold is measured from the slot-grid origin (the stack is gravity-centered, so the naive screen-top math overshot by one swap).

Testing

  • BDD scenario rewritten: a picked-up slot reorders live (labels swapped mid-drag), keeps following the finger across further moves, and the drop persists the order. ./gradlew check green (Cucumber suite + 80% coverage gate).

Commits are unsigned (commit.gpgsign=false — signing key passphrase-locked).

The held row is never removed from its parent (a detached view loses
the touch stream, which dropped the drag after one swap); the crossed
neighbour is re-parented around it instead and animates into its new
slot, while the held row keeps tracking the finger one to one until
release.
@github-actions

Copy link
Copy Markdown

The following commits were not verified:
11747cb (unsigned)

@thypon
thypon merged commit 59eca21 into master Nov 12, 2026
5 checks passed
@thypon
thypon deleted the fix/slot-drag-live branch November 12, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant