Skip to content

dioxus-dnd 3.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Aug 10:42
324fd80

Added

  • Stable-ID sortable kernel. SortableProvider, SortableGroup,
    SortableCollection, and SortableItem build sortable collections on the
    shared core. Reorder events report stable identities, source and target
    groups, item-or-background targets, and placement intent. Empty groups are
    keyboard reachable, background drops append, and explicit group IDs occupy
    a namespace disjoint from automatic IDs. project_layout derives
    variable-size previews from measured slots, while the index-based list and
    grid APIs remain available.
  • Checked model helpers. try_apply_clone_or_move and
    try_apply_list_clone_or_move reject unsupported effects without mutation,
    while the unprefixed helpers retain their existing 3.x signatures.
  • Composable activation. ActivationPolicy combines handle, surface, or
    manual activation with distance, delay, or either constraints.
    DragHandle supplies an accessible activator and NoDrag protects nested
    interactive content.
  • Collision, effect, and lifecycle policy. Providers accept configurable
    collision and release policy with ranked custom detectors, sticky hover,
    and configurable recovery. Targets can negotiate DropEffects through a
    rich DropQuery. Stable DragId values and use_dnd_monitor expose the
    Started, Moved, TargetChanged, Dropped, and Cancelled lifecycle without
    changing DropOutcome. Custom sources can start identified drags with
    DragStart and DndContext::start_with_id, inspect active snapshots, and
    cancel with monitor-visible reasons.
  • Selection ranges. Selection now supports anchored Shift ranges,
    additive ranges, and keyboard range movement.
  • Click-to-upload file drop zones. Clicking FileDropZone opens the
    native multi-file picker. Picker selections share the existing filtering,
    rejection, and on_files path with OS drops, while the wrapper remains
    headless and receives no library-owned visual styles.
  • Multi-window ownership and wiring primitives. use_dnd_model creates
    app-wide state under process-lived unsynchronized and synchronized owners;
    DndScope gives reclaimable dynamic state the same correct owner pair.
    With the desktop feature, MultiWindowProvider structurally installs the
    geometry feed, drag provider, and host bridge in their required order and
    warns when no world is present or when it was incorrectly nested beneath
    the old same-type provider. DndWorld::vdom pre-seeds spawned windows with
    that world while preserving ordinary root-context chaining.
  • Release and compatibility automation. CI now covers formatting,
    documentation, the full Rust feature surface, browser regressions, the
    release gallery, standalone desktop examples, the Rust 1.85 core MSRV,
    Windows, macOS, packaging, dependency policy, and SemVer. A required
    compatibility job runs the full Rust suite against published Dioxus
    0.8.0-alpha.1, while the supported and locked release line remains Dioxus
    0.7.10. Version tags validate the manifest, lockfiles, changelog, and
    protected main head before crates.io Trusted Publishing and GitHub Release
    creation.

Changed

  • Continuous coordinated auto-scroll. Auto-scroll now runs from one
    elapsed-time clock, continues while the pointer rests in an edge band, and
    hands nested scrolling from an inner container at its boundary to the next
    containing surface. New code can set exact speed_px_per_second; the 3.x
    speed prop retains its nominal-per-frame contract.
  • Accessible file zones. FileDropZone has button semantics, Enter and
    Space activation, an accessible label, a configurable multiple picker,
    and a disabled state.
  • Dioxus alpha canary. CI now checks source compatibility against
    0.8.0-alpha.1.
  • Dependency baseline. Committed lockfiles now verify Dioxus 0.7.10,
    futures-util 0.3.34, Serde 1.0.229, serde_json 1.0.151, Tokio
    1.53.1, webbrowser 1.2.2, and the direct Linux integration against
    x11rb 0.14. The root lockfile also selects non-yanked chacha20 0.10.2
    and spin 0.9.9. The browser suite uses Playwright 1.62.1 and Dioxus CLI
    0.7.10.
  • CI and deployment safety. Every Cargo release check uses the committed
    lockfiles, third-party actions are pinned to immutable revisions, and gallery
    deployment waits for successful main CI. The weekly upstream canary keeps
    released Dioxus 0.7 failures visible while treating Dioxus git-main churn as
    an informational early warning.
  • Dependency maintenance policy. Dependabot groups weekly Cargo, browser,
    and GitHub Actions updates against development. cargo-deny enforces
    advisory, license, duplicate, wildcard, registry, and git-source policy,
    with explicit reasons for the Dioxus Desktop 0.7 GTK3 advisories that cannot
    be upgraded independently.

Fixed

  • Post-review Dioxus correctness. Caller-owned DndContext::from_parts
    stores remain authoritative across direct writes and sibling wrappers.
    Individual Dioxus style-property attributes can no longer replace drag,
    overlay, settle, or FLIP invariants. Stable sortable keyboard drops preserve
    GridSwap intent and can append to populated groups, and rejected
    non-primary handle presses cannot authorize a later surface press.

  • Dioxus 0.7 renderer and reactivity contracts. Production now enables
    Dioxus's mounted capability required by geometry measurement. Overlay
    settle ownership, receiver-fed auto-scroll, board/bridge acceptance,
    labels, and provider policy follow live props without mount-time captures
    or render-time signal synchronization.

  • Reactive component identity and forwarded invariants. Explicit
    drag/zone/group ids replace keyed implementation instances when they change,
    so cleanup and registration follow Dioxus lifecycle semantics. Stable-ID
    collections require unique semantic ids and explicit Dioxus keys;
    index-based adapters accept an item_key callback. Forwarded attributes can
    no longer replace component-owned event, mounted, accessibility, state, or
    behavior-critical style declarations.

  • Borrow-safe callbacks and bounded async work. Registry queries snapshot
    records before invoking application acceptance/collision callbacks, FLIP
    and press measurements discard stale generations, and Linux X11 pointer
    roundtrips run on one bounded worker instead of the Dioxus UI executor.

  • Bounded refresh and sortable measurements. Rect-refresh completions use
    ordinary one-shot closures rather than retaining a new scope-owned Dioxus
    callback per scroll ping. List/grid DOM reads validate node identity and a
    per-index generation after every await, and grid cache shrinkage cannot
    leave an out-of-range drop target.

  • Selection modality. Keyboard drags no longer arm browser click
    suppression, and cancelled pointer drags cannot consume a later genuine
    selection click.

  • Auto-scroll hover reconciliation. Geometry refreshes re-resolve hover
    after every completed measurement batch, so targets moving beneath a
    stationary pointer stay current. Drag identity and session guards prevent a
    late batch from modifying a replacement drag, including across windows.

  • Single-pass target policy. Collision resolution evaluates each target's
    acceptance and effect negotiation once per query, and active highlighting
    uses the same live modifier-adjusted effect as final delivery. Custom
    detector output is ordered by its documented score and registration
    tie-break instead of callback vector order.

  • Activation and selection edges. Empty or manual-only activation
    disjunctions remain manual, independent delayed alternatives retain their
    own clocks and tolerances, and keyboard range movement saturates safely for
    extreme signed steps.

  • Reentrant drag replacement. A replacement drag started synchronously by
    cancellation user code is no longer overwritten when the outer start call
    resumes.

  • Selection constructor compatibility. Selection::from_signal remains a
    non-hook wrapper for existing callers; persistent range-anchor state is
    opt-in through use_selection_from_signal or from_signals.

  • Clean release publishing. The crates.io existence probe writes its
    response outside the checkout, so Cargo receives the clean tagged payload
    required by cargo publish. Tag workflows reuse the successful CI run for
    the same main commit instead of compiling the full matrix a second time.

  • Owner restoration and lifetime precision. DndScope::with now restores
    both Dioxus owner overrides before resuming an initializer panic, and
    process-owned model/world scopes remain deliberately non-dropping even if
    their creator UI thread exits. Public docs now call out synchronous
    allocation and quiescent teardown requirements.

  • Zone-registry hot paths and ordering. Acceptance-aware release
    hit-testing now scans the registry once without cloning every acceptable
    ZoneRecord, evaluates each acceptance predicate once per query, and
    consistently falls through rejecting overlaps in local, simulated,
    cross-window, and host-driven release paths. Keyboard traversal groups
    zone tops within one CSS pixel into the same row, preventing fractional
    layout jitter from producing a zig-zag in LTR or RTL.

  • Registry mutation diagnostics and structural consistency. Failed Dioxus
    signal mutations emit trace events under dioxus_dnd::registry, and
    register/unregister acquire both the zone and generation stores before
    mutating either so a runtime borrow collision cannot split their state.
    Registry handle equality now includes all four backing signal identities.

Documented

  • Overlap and reentrancy invariants. Public docs now state that overlapping
    targets resolve by registry order rather than CSS stacking/portal paint
    order, and the architecture guide records the generation revalidation
    protocol that protects a replacement drag started synchronously inside a
    receiver or source callback. Identity counters also document their relaxed,
    process-lifetime non-wrapping assumption.
  • Dioxus compatibility. The compatibility table distinguishes the
    supported Dioxus 0.7.10 line from the source-compatibility canary for
    Dioxus 0.8.0-alpha.1.