Skip to content

Drag and drop: drag sources, drop targets, OS file drops routed to nodes #33

Open

Description

@samitbasu

Reported by the reference shell's port (checked against its source). Not prioritised.

  • In-app drag: a list row (a picture in an assets panel) is dragged onto a canvas, and the drop is placed where it lands.
  • OS file drops on three zones (canvas, documents panel, pictures panel). Each shows a hint overlay while a drag hovers it, and accepts or refuses depending on the zone.

Needed in bullseye:

  • drag sources and drop targets on nodes;
  • hover feedback for a drag over a target (a paint variant such as drag_over);
  • the OS's hovered and dropped files (egui's raw.hovered_files and dropped_files) routed to the node under the pointer.

Related:

The design brief currently scopes drag and drop out of v0.1.

Activity

  1. added
    needs-decision
    on Nov 8, 2026
  2. samitbasu commented on Nov 10, 2026

    @samitbasu
    OwnerAuthor

    The spike is #71 (user, 2026-11-10: spike before M5).

  3. samitbasu commented on Nov 10, 2026

    @samitbasu
    OwnerAuthor

    Production DnD design input (user, 2026-11-10): two-level target feedback. drag_accepts(|p| ..) means a compatible drag is in progress anywhere, which is always known. drag_over(|p| ..) means it is over this target, which is known for in-app drags and, for outside drags, from winit 0.31 (#78). Nothing is shown as targeted when the position is unknown. A drop with no position goes to a declared fallback and is scrolled into view. Details are in docs/dnd.md on draft #74.

  4. samitbasu commented on Nov 10, 2026

    @samitbasu
    OwnerAuthor

    The production API sketch in docs/dnd.md (draft #74) is accepted (user, 2026-11-10: no open decisions in it).

    • drag_source / drop_target::<T> / DragEnd
    • DragImage::{Live, Chip(text), None}, with the live node as the default
    • drag_accepts / drag_over two-level feedback
    • one insertion resolver over this frame's final rects
    • pointer-following anchored in screen space at draw time

    In-app DnD can be built on it. Outside drops follow #78 (winit 0.31).

  5. samitbasu commented on Nov 11, 2026

    @samitbasu
    OwnerAuthor

    In-app drag and drop shipped in #87 (v0.1.0-m4c16): sources, targets, drag_preview, two-level feedback, cancel causes, and the resolvers. Outside file drops work as far as winit 0.30 allows: drag_accepts everywhere, and the drop position where the platform gives one (macOS at release), otherwise drop_fallback. Remaining: positioned outside drops (#78), drags across layout scopes (#85), and resize under a held panel (#86). Leaving this open until #78.

  6. added
    post-0.1
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionpost-0.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions