runbox7 icon indicating copy to clipboard operation
runbox7 copied to clipboard

When creating new root folder and sub-folder they appear in the wrong place

Open runboxdave opened this issue 4 years ago • 2 comments

While Inbox was highlighted I created a new root folder called Test Folder (taking note it said this it would create a root folder). I then highlighted the new root folder and clicked to add a sub-folder called Test Folder 2 (taking not it said this would be a sub-folder) and it was created as a sub-folder but appears in the wrong place on screen as it appears in the middle of a set of sub-folders.

Root 1 -Sub1-1 -Sub1-2 Test Folder -Test Folder 2 -Sub1-3 -Sub1-4 --Sub1-4-1

As you can see the Test Folder and its sub-folder appear in the middle of Root1 and it's sub-folders 1-4.

Refreshing the page doesn't help.

The correct arrangement is shown in Runbox 6 and is as below.

Root 1 -Sub1-1 -Sub1-2 -Sub1-3 -Sub1-4 --Sub1-4-1 Test Folder -Test Folder 2

I won't supply screenshots here for privacy reasons but will share them with the team separately.

runboxdave avatar Mar 31 '20 16:03 runboxdave

I've failed to reproduce the exact issue, but I did get onto something. Generally, everything was working perfectly smoothly (I started off of a fresh account with no folders) until I started reordering folders: that didn't break anything yet, but opened up a way for future breakage...

So at some point I had this:

2020-04-14-142721_313x529_scrot

Note that Test Root is the second root folder, and currently selected. Let's add a new subfolder to it...

2020-04-14-142739_311x579_scrot

Now not only is Test Root the first root folder, the new "subfolder 3" is the first subfolder in it, rather than the last.

The wild thing happens when you reorder the second and third folder though (I don't remember which one I moved):

2020-04-14-142754_310x577_scrot

The swap worked fine, but now the subfolders of Test Root also got reordered into their (initially) expected position.

I don't see anything in particular being broken – but it is definitely broken in general :) I'm not sure how to get anywhere from this though.

I think one of the problems we have is with the priorities of newly created (sub)folders. I'll experiment a bit more, but I feel like perhaps the newly created folders don't get any priority assigned to them, which may result in them getting a lower priority than their parents have: which makes them "float" to the top of the list, more or less successfully.

tadzik avatar Apr 14 '20 12:04 tadzik

From what I can tell - the default in the system (backend and frontend) is not to set a "priority" value (its just 0 for everything) - main folders are by default (always??) sorted by name, and subfolders are sorted by the "priority". The only time a "priority" other than 0 is set, is when folders are moved around (then everything suddenly gets one).

"Special" folders (Inbox etc) are then pulled out of this sort and shoved at the beginning.

I can see how creating some folders, moving them about, then adding some more, would cause interesting layouts.

What do we want the behaviour to be?

  • Everything gets a priority value by default (if so what, sorted into name order in its level, at the top, or at the bottom?)
  • Only add priorities for new folders if any existing ones have them? (would make things look sane if any moving about had happened), and otherwise sort by name?
  • Something else?

RMM6 doesn't seem to set the "priority" value at all (nor sort by it).

castaway avatar Jul 23 '20 10:07 castaway