utopia
utopia copied to clipboard
Draw-to-insert is cursed
Problem Draw-to-insert suffers from a number of problems:
- It's hard to see clearly where the inserted element will end up, especially in the context of siblings
- We insert properties that make sense in an absolute-positioned world, but either are ignored or mislead in a non-absolute world (eg
left
andtop
) - We use opinionated choices when you draw that don't make sense in some contexts (eg setting
width
in a flexRow, whereflex-base
would be better - We let you 'draw', but don't actually insert the element where you draw it. This feels clunky
- 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
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
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!