Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

Improve drag and drop to work better inside incremental dom components #3

Open
@mairatma

Description

This drag and drop module works really well on its own, but it's hard to configure it to work well inside incremental dom components. That's because it was created before we decided to use incremental dom in the first place, and so its architecture wasn't ready for it. Some examples of current problems:

  • It changes dragged dom elements directly. This can cause many problems with incremental dom components, since when they're updated via incremental dom they may lose the changes done by metal-drag-drop, since those are coming via a different way.
  • Drag and drop holds element references, but component dom elements can change a lot during updates. This causes components to have to keep updating the drag and drop instance with new references.
  • Drag and drop needs to receive both drag sources and drop targets in the same place, but they may be rendered by different components.

I believe that we should rewrite a good part of metal-drag-drop, having it be a component so that it can do its changes on the right elements via incremental dom as well. A good example of an api that achieves that is react-dnd.

This will probably need to be a major version, since the api would change a lot.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions