Skip to content

v2.4.0 - Drop-settle, closest edge, localization, devtools, headless testing, 10k-row lists

Choose a tag to compare

@kindintelligence kindintelligence released this 08 Jul 22:43
· 9 commits to main since this release

The world-class roadmap, shipped. Seven features and three fixes, one commit per item.

Added

  • Drop-settle animation - DragOverlay { settle: true } glides the ghost from the release point into the receiving zone instead of vanishing, honoring prefers-reduced-motion. The core gains a settling phase where dragging() is false but payload() stays readable, so the ghost keeps its content.
  • Closest-edge primitive - pure edge_of(point, rect, EdgeSet) -> Edge, an opt-in edge prop on DropZone rendering live data-edge="top|right|bottom|left" for insertion indicators, and the edge held at release delivered in the new DropOutcome::edge. Gallery: Itinerary.
  • Localizable announcements - every phrase the crate voices reads a DndStrings context (whole sentences as functions, English defaults, struct-update to override). A live language switch takes effect on the very next announcement. Gallery: Packing list, wiring dioxus-i18n with an English/Spanish toggle.
  • Debug overlay (dev-only) - DndDebugOverlay<T> draws every registered zone as a tinted, labeled outline with live hover and per-zone acceptance during drags, plus a census of unmeasured zones.
  • Headless test driver - dioxus_dnd::test runs whole drag interactions inside a VirtualDom in CI, no browser: place the rects, pick_up, move_to, release, or one-line simulate_drag. Drops run the production delivery path, shared with Draggable itself.
  • BridgeDropZone<A, B> - the cross-type bridge promoted from documented recipe to crate component: one element registered in two providers' worlds, per-world acceptance, every drop typed. Gallery: Standup.
  • Virtualized lists, proven at 10,000 rows - zones now measure on mount so rows recycled in mid-drag are droppable, AutoScroll gains on_scroll, and the README documents the onvisible row-sentinel windowing pattern. Gallery: Archive.

Fixed

  • The 48px near-miss snap measured to the zone's center, silently disabling it for zones larger than ~96px; it now measures to the nearest edge. Found by dogfooding the test driver.
  • Zones mounting mid-drag were invisible to hit-testing (rects only filled at drag start and on scroll pings); they now measure on mount.
  • Documented findings: dioxus-web 0.7 delivers no element scroll events, so 2.3.0's "onscroll covers wheel mid-drag" was never true on web; the dead handler is gone and the working patterns are documented.

Notes

  • README gains dedicated Accessibility (with a WCAG 2.2 compliance mapping) and Localization sections.
  • DropOutcome and DragState each gained a field; code constructing them as struct literals (typically hand-rolled tests) adds edge: None / ..Default::default(). The new test driver removes the need to construct outcomes by hand.
  • Verified by 156 tests: 83 unit, 52 runtime, 2 doc, 19 Playwright browser regressions.

Full changelog: CHANGELOG.md · Live gallery: https://kindintelligence.github.io/dioxus-dnd/