Context
Identified during the patterns example proposal — see livetemplate/docs/proposals/patterns.md (Future Features section) and the Sortable / Drag-and-Drop entry.
The Sortable pattern (#32 in the patterns proposal) is skipped until drag-and-drop event support lands. Without native lvt-on:drag* bindings, implementing reorder requires custom JavaScript, which violates the "no custom JavaScript" principle for examples.
Requirements
Client:
- Add
lvt-on:dragstart, lvt-on:dragover, lvt-on:drop event support (mirroring existing lvt-on:click etc.)
- Serialize drag source / target data in the outgoing action message — the controller needs to know which item moved, where from, where to
Core (livetemplate library):
- Reorder protocol for range items — extend existing range operations (
["o", ["id1", "id2", …]] already exists for reorder; the new event surface needs to flow into it without bespoke patching)
Out of scope
- Touch drag (HTML5 drag-and-drop API only for v1)
- Custom drag previews / drag images
- Drop zones across iframes
References
A complementary library issue can be filed if the protocol changes are non-trivial; the client side is the primary surface area.
Context
Identified during the patterns example proposal — see
livetemplate/docs/proposals/patterns.md(Future Features section) and the Sortable / Drag-and-Drop entry.The Sortable pattern (#32 in the patterns proposal) is skipped until drag-and-drop event support lands. Without native
lvt-on:drag*bindings, implementing reorder requires custom JavaScript, which violates the "no custom JavaScript" principle for examples.Requirements
Client:
lvt-on:dragstart,lvt-on:dragover,lvt-on:dropevent support (mirroring existinglvt-on:clicketc.)Core (livetemplate library):
["o", ["id1", "id2", …]]already exists for reorder; the new event surface needs to flow into it without bespoke patching)Out of scope
References
livetemplate/docs/proposals/patterns.mdlivetemplate/internal/diffrange ops (consumer side already supports["o", …])A complementary library issue can be filed if the protocol changes are non-trivial; the client side is the primary surface area.