Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Admin: Drag-and-drop for related entities #1

Open
jeremyjbowers opened this issue Jun 19, 2017 · 3 comments
Open

Admin: Drag-and-drop for related entities #1

jeremyjbowers opened this issue Jun 19, 2017 · 3 comments

Comments

@jeremyjbowers
Copy link
Contributor

Dragging an entity underneath another should create a related entity.

@jeremyjbowers
Copy link
Contributor Author

jeremyjbowers commented Jun 19, 2017

  • Get a draggable JS library.
  • On the client, figure out when dragging the entity name and the related entity.
  • Make an AJAX request to the server to POST entity and related entity.
  • On the server, get entity and related_entity and make the relationship.
  • Trap for so many different server-side errors.
  • Trap for many client-side UX errors / bad behaviors.

@SHewitt95
Copy link
Contributor

SHewitt95 commented Jun 23, 2017

By chance, would the following scenario be something to trap for on the server:

User drags gray entity to pink area of another entity. User realizes error: the dragged entity actually should remain gray. User drags entity back to original gray area.

I noticed this when I did a similar action. I wrote an if-statement that checks if the entity id and the canonical id are the same. These two being the same represents the user moving a block back to its original place. If the user moves an entity back to its original place, then the canonical id of the entity is reset to "None."

Is this one trap you intended on existing?

@jeremyjbowers
Copy link
Contributor Author

jeremyjbowers commented Jun 23, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants