Skip to content

[BUG] Manually sorting profiles in the GUI lands them in the wrong index number #453

Description

@EhudKirsh

Describe the bug
Dragging and dropping profiles in the My Servers page still lands them in the wrong index number on several occasions.

Steps To Reproduce

  1. Grid view: dragging a profile to its left, up or to the very start or end works fine. But dragging it to the right or down results in an index number one smaller/higher than what it should be. When dragging a profile and dropping it on another, the dragged and dropped profile should inherit the exact index number as the profile it was dropped on, just like with aero profiles --tui> #.

  2. Table view: sometimes holding on the ⋮⋮ of a profile doesn’t even manage to drag it.
    When it does, it always drops the profile 1 index smaller/higher than was indicated by the horizontal blue line.

Expected behavior
Dragged and dropped profiles should inherit the exact index number of where they’re dropped in the GUI, just like how
aero profiles --tui> # works well.

Environment:

  • OS: Windows 10
  • AeroFTP Version: v4.1.5, but it’s been this way for months, maybe the entire time.

Additional context
If it’s easier to script, or if you think it might look better or be more comfortable, you can adopt the way GitHub drags and drops repos in the profile page of users. Feel free to try it by dragging and dropping your repos in your GitHub profile https://github.com/axpnet to get a feel for it. You can see the ⋮⋮ at the top-right of each repo, which you can use to drag them. The nice thing is, since the GitHub website is in HTML, the same as the frontend of AeroFTP, it should be easy to check what it does using DevTools to learn from it. This isn't like trying to translate the behaviour of GTK or Qt or whatever else to HTML. You can do it even better than GitHub by not making the dragged rectangle so transparent and hard to read like GitHub does, and keeping Esc for cancelling the drag and drop instead of confirming it.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions