Gdevelop: Events are sometimes hard to drag

Created on 28 Mar 2020  路  5Comments  路  Source: 4ian/GDevelop

Describe the bug

When dragging a line of the events sheet, there is sometimes a position conflict that makes it impossible to know where the line will be dropped and it triggers a lag proportional to the duration of the position conflict. It seems this happens mostly when moving a line to a space higher in the list.

GDevelop 5platformer.json 2020-03-28 21-24-49.mp4.zip

To Reproduce

Steps to reproduce the behavior:

  1. Open the platformer example
  2. Grab an event somewhere down the list
  3. Move it up one slot

Other details

Win10 64 bits, GD5 b89

馃槫Non optimal UI behavior 馃檱鈥嶁檧锔廋areful thinkindesign or refactoring needed

Most helpful comment

Keyboard shortcuts would be handy too, like:
"CTRL" + "Arrow Up" = Move current event up by one position
"CTRL" + "Arrow Down" = Move current event down by one position
"CTRL" + "Arrow Right" = Move current event one level down in the subevent tree
"CTRL" + "Arrow Left" = Move current event one level up in the subevent tree

All 5 comments

Yep dragging events was never a good experience. I'd like at some point to rewrite the rendering of events and the drag'n'dropping in particular to have an approach similar to actions/conditions, with a line drawn at the position of the drop (and red if you can't drop).

Keyboard shortcuts would be handy too, like:
"CTRL" + "Arrow Up" = Move current event up by one position
"CTRL" + "Arrow Down" = Move current event down by one position
"CTRL" + "Arrow Right" = Move current event one level down in the subevent tree
"CTRL" + "Arrow Left" = Move current event one level up in the subevent tree

@4ian should we rely on some other 3rd party library for drag and drop behavior?
I looked at some of them, and I think they can provide better user experience than the current one, like keyboard shortcuts, better event handling, smooth animations, etc.

I don't think there is another 3rd party library doing that apart from react-sortable-tree.
Feel free to suggest one if you find - but I'm thinking of getting rid of react-sortable-tree and using just react-virtualized or react-window to do the virtualization.

I'll make a detailed list and let you know :)

Was this page helpful?
0 / 5 - 0 ratings