Skip to content

v2.3.0 — Scroll-proof drags, RTL, reduced motion

Choose a tag to compare

@kindintelligence kindintelligence released this 08 Jul 12:49
· 20 commits to main since this release
d145b0d

Tier-1 correctness release: drags now survive scrolling, and two accessibility gaps are closed.

Added

  • RTL keyboard navigation. Direction::Rtl on DndProvider (or ZoneRegistry::set_direction for hook users) mirrors the keyboard experience: spatial zone ordering runs right-to-left within a row, and the descend/ascend arrows swap so "into" is always the arrow pointing along reading order - the WAI-ARIA tree convention. LTR unchanged and default.
  • prefers-reduced-motion support. SortableList's live preview and FlipItem's glide mark their moving elements with data-dnd-motion and ship a media-query override, so drags snap instead of gliding when the user asks the OS for less motion. Near-zero duration rather than zero, so transitionend still fires. Mark your own animated elements with the same attribute to opt them in.

Fixed

  • Stale hit-test rects while auto-scrolling. Zone rects were cached at drag start, but AutoScroll moves the zones mid-drag - so hover and drops targeted where zones sat at pickup. A new payload-type-erased RectRefresh channel (one per provider tree; thunks self-gate on having a drag in flight) fixes it: AutoScroll pings after every scroll it performs and on any other scroll of its container, and the new use_rect_refresh() hook lets custom layout mutators ping too.
  • Sortables and grids track scrolling too. AutoScroll anchors the channel when it's the outermost participant, so the provider-less SortableList/SortableGrid join it. The grid re-measures plainly; the list re-anchors - its rows carry live-preview transforms (often mid-transition, unreadable exactly), but the wrapper never transforms, so one wrapper measurement per ping shifts every cached base slot by the exact scroll distance.

Tests

134 passing: 78 unit, 40 runtime, 2 doctests, 14 Playwright browser regressions - including two new scroll regressions (drop zones and sortable slots that auto-scrolled into place), each verified red without its fix.