Skip to content

dioxus-dnd 4.0.0-alpha.1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 19 Oct 09:07
adfd5db

Breaking changes

  • Move the Dioxus public types from 0.7 to 0.8.0-alpha.1. Dioxus and
    Dioxus Desktop are pinned exactly to the published alpha.1 packages;
    later alphas have incompatible APIs. Existing 0.7 applications should
    remain on dioxus-dnd 3.x. The renderer-neutral dependency keeps
    default-features = false and its minimal, document, and mounted
    features.
  • Raise the minimum supported Rust version from 1.85 to 1.88. The
    published Dioxus alpha uses let-chains, including in the minimal graph.

Migration fixes

  • Close every forwarded style fragment with ; before the component's own
    declarations follow it, so a caller's style: "color: blue" no longer
    runs into touch-action and breaks both.

  • Require web-sys 0.3.98 or a later 0.3 release (the floor Dioxus Web
    alpha.1 pulls), so cargo unifies on the app's single web-sys and
    mounted-element downcasts match; apps on a newer web-sys still build. Enable Location in the web
    feature so minimal downstream document/history builds compile without
    relying on this crate's dev-dependency features.

  • Generate file-picker input IDs from a VDOM-root allocator instead of
    accessing ScopeId's numeric field, which is private at the supported
    Dioxus git revision. IDs remain stable during an instance's lifetime and
    start from the same sequence for independent SSR/client renders.

  • Upgrade Dioxus SSR, the gallery's Dioxus i18n integration, both standalone
    desktop examples, and all three lockfiles to the matching alpha graph.

  • Update installation/version guidance and replace obsolete 0.7-specific
    scroll-observation notes with the renderer-neutral sampling behavior.

  • Keep automatic sortable group IDs checked and atomic using a compare-exchange
    loop, avoiding Rust 1.99's deprecated fetch_update without raising the MSRV.

  • Refresh the transitive Rustls dependency in all three lockfiles to pick
    up its security fixes, and recognize xxhash-rust's permissive Boost license
    in the dependency policy.

  • Make additive-selection browser regressions use Ctrl on Windows/Linux
    and Cmd on macOS, avoiding native Control-click context menus.

  • Use the alpha.1 CLI in CI and gallery deployment, disable hot-patching in
    browser regressions and DWARF output in production gallery builds, and
    wait for the fixture build before starting browser tests. Test Rust 1.88
    and check a scratch downstream consumer against Dioxus git revision
    f9519967a6fb3e85bf3c1a2e2bf816a85033f752, and accept prerelease tags
    without marking alpha GitHub releases as latest.

The additions and fixes below were developed on dev after 3.1.0 and are
included in this release.

Added

  • Keyed board moves. try_apply_move locates the moved item in its
    source column by key instead of trusting the event's index, adjusts
    same-column forward inserts from the index it actually found, and returns
    ApplyMoveError::SourceNotFound without touching the board when the drop
    is stale. apply_move keeps its index-based behavior and now documents
    that a column reordered under the drag makes it remove the wrong item.
  • DropEffects set operators. &, &=, ! (the complement within
    STANDARD), From<DropEffect>, and FromIterator<DropEffect>.

Deprecated

  • The payload-only registry lookups acceptable, step_zone,
    step_sibling, children_of, and first_child, in favor of their
    _query forms over DropQuery::new(payload); each is now exactly that
    wrapper. hit_test_closest, in favor of resolve, which also ranks
    through the provider's collision policy (equal-distance fallback ties go
    to the later record there, the earlier record in the deprecated helper).

Fixed

  • One registry acceptance pipeline. The payload-only lookups above now
    run the same acceptance as the built-in components: accepts,
    accepts_query, and allowed_effects negotiation. A custom source
    using them no longer targets zones a Draggable would skip.
  • Pointer samples at the exact viewport corner track.
    DndContext::update_pointer used to drop every (0, 0) sample as a
    synthetic-event artifact, so a drag reaching the corner kept its
    previous position. It now drops only a (0, 0) that jumps in from more
    than 256 CSS px away; a sample continuing from nearby is real and is
    applied.
  • Ctrl/Cmd+click moves the range anchor. Selection::toggle re-anchors
    on the toggled key, so a following Shift+click ranges from it, as the
    documented click convention promised.
  • FileDropZone hover pairing. A zone that becomes disabled while a
    drag hovers it now reports on_hover(false); a zone disabled throughout
    no longer reports a false it never paired with a true.
  • AutoScroll sampling is bounded. Scroll-offset reads coalesce to one
    in flight, so a hovering pointer no longer issues one renderer round-trip
    per pointermove; the final offset after a burst is still observed.
  • Custom collision ranking is O(n log n). Registration order is
    indexed once instead of scanned per comparison.
  • SortableList and SortableGrid retire their pointer-capture flag on
    every return to Idle, matching Draggable.
  • CI runs on pushes to dev (the workflow filtered on a branch that no
    longer exists), and the contributor docs pin the same rumdl version CI
    runs.

Changed

  • DndContext's PartialEq documents that it compares handle identity
    (the shared announcement signal), never drag state.