utopia icon indicating copy to clipboard operation
utopia copied to clipboard

Draw-to-insert is cursed

Open maltenuhn opened this issue 3 years ago • 2 comments

Problem Draw-to-insert suffers from a number of problems:

  1. It's hard to see clearly where the inserted element will end up, especially in the context of siblings
  2. We insert properties that make sense in an absolute-positioned world, but either are ignored or mislead in a non-absolute world (eg left and top)
  3. We use opinionated choices when you draw that don't make sense in some contexts (eg setting width in a flexRow, where flex-base would be better
  4. We let you 'draw', but don't actually insert the element where you draw it. This feels clunky
  5. Conversely, we don't let you drag & drop to insert at all, despite evidence some people have tried it (and more evidence that at times we've wanted it)

Solution ideas

  • [ ] Add support for click-to-insert
  • [ ] add some kind of 'target indicator' that would show you where you can insert (and maybe only let you start 'drawing' inside it; possibly extend it to siblings

maltenuhn avatar Jul 19 '21 12:07 maltenuhn

how about support for "drag and drop to insert"? that would need a good target indicator (probably vertical / horizontal line where the item will be inserted into for most layout systems) and it can turn into a rabbit hole (live preview with the insertion result as you drag along the canvas) but I think this interaction would be worth exploring

balazsbajorics avatar Jul 19 '21 13:07 balazsbajorics

I think the targeting interaction could actually be quite similar (identical?) for that; this ticket probably is 80% prerequisite and 20% making the gesture to insert nice. Happy to add "drag & drop to insert" to this ticket!

maltenuhn avatar Jul 19 '21 13:07 maltenuhn