tommyme / vscode-bookmark-x

Drag-and-drop, grouping, sorting bookmarklet plugin
GNU General Public License v3.0
18 stars 3 forks source link

[bmx] [feat] when using manual sort, support drag and drop to arrange the order #25

Closed tommyme closed 1 week ago

tommyme commented 1 month ago

As you have more and more nodes, It's cumbersome and slow to move nodes through mouse buttons. So I come up with a solution for it.

When a node is selected for sorting, dropping it on a node means place it after that node.

In this way, bmx can handle original drag and drop logic for node movement and logic for node manual sort at the same time.

tommyme commented 1 month ago

@Latria-Kure I've probably figured out how to do it. Do you have any ideas and suggestions?

Latria-Kure commented 1 month ago

@Latria-Kure I've probably figured out how to do it. Do you have any ideas and suggestions?

I think this is a great solution. In fact, I used to support sorting by drop and drag, but I only try to support a simple situation: node -> node in the same group. Because it is very easy to confuse performing these two operations by dragging a node: sorting and changing the group. So I choose a more robust way: sort by clicking buttons.

But the problem can be solved now. Selecting a node for sorting, which prevent changing the group temporarily, will never be confused. Of course users will be happy about this, and it’s always good to have one more choice.