Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support moving folders through the quickMove panel #75

Closed
RealRaven2000 opened this issue Nov 22, 2020 · 10 comments
Closed

Support moving folders through the quickMove panel #75

RealRaven2000 opened this issue Nov 22, 2020 · 10 comments
Assignees

Comments

@RealRaven2000
Copy link
Owner

RealRaven2000 commented Nov 22, 2020

At the moment QuickFolders supports moving folders via QuickFolders tabs, by holding the SHIFT key. If would be very helpful if folders could also be dragged onto the quickMove button so that they can be moved to any desired target location:

image

@RealRaven2000 RealRaven2000 self-assigned this Nov 22, 2020
@RealRaven2000 RealRaven2000 pinned this issue Dec 13, 2020
@RealRaven2000
Copy link
Owner Author

I had a request of providing a (dedicated?) keyboard shortcut for moving folders, but I reckon - since free shortcut keys are very hard to find - we could keep using the same (Shift+M) shortcut provided the mouse / key focus is on the folder tree.

In that case, quickMove should give a warning message box, as all current users could assume it was there to move highlighted mail only. If we displayed this message (only if action was triggered by the shortcut, not on mouse drag):

This will move the selected folders - are you sure? 
[Ok] [Cancel]

you could just hit Enter and we would prevent some bad accidents happening for those.

@ThomasKjaergaard
Copy link

Reusing the SHIFT+M shortcut will be fine for me.

The moving by dragging a folder to the move icon does not work for me.
I did hold SHIFT down while trying it.

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Jan 8, 2021

Reusing the SHIFT+M shortcut will be fine for me.

The moving by dragging a folder to the move icon does not work for me.

That's expected, as this issue #75 is about implementing it. :)

At the moment this is handled by the same code that handles dropping a folder to a QuickFolders tab, so you should be seeing this warning:
image

I need to add a bunch of special code for having the quickMove button as drop target.

However - if you hold down SHIFT and drop to a QuickFolders tab, moving folders already works!

@ThomasKjaergaard
Copy link

However - if you hold down SHIFT and drop to a QuickFolders tab, moving folders already works!

That works. As I move most folders to the same folder, that is a big improvement to the situation before.
that was dragging a folder in the folder tree, and waiting for the scrolling to come to the right location. Which can take long tie with many folders.

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Jan 8, 2021

However - if you hold down SHIFT and drop to a QuickFolders tab, moving folders already works!

That works. As I move most folders to the same folder, that is a big improvement to the situation before.
that was dragging a folder in the folder tree, and waiting for the scrolling to come to the right location. Which can take long tie with many folders.

It also supports moving multiple selected folders in a single operation - that's something that you don't get in the tree (and it's kind of dangerous). The less you use the tree, the least painful your life will become. Mind got a whole lot better after deciding not to use the tree for 2 things:

  • folder navigation
  • moving mail

This can all be done with QuickFolder Tabs and the quickMove / quickJump functions + navigation buttons shown on the current folder bar / shortcuts.

@RealRaven2000
Copy link
Owner Author

RealRaven2000 commented Jan 10, 2021

Here is a initial test version:

QuickFolders-wx-5.2pre16.zip

it's not well tested for if you drag folders and then mails before selecting a target, I guess it should be able to do both in one operation (a mix of folders and mails), that might just lead to some incomplete moving at the moment. At first I had a confirmation message on the drop event but since there is already on when you select the target folder, I thought this was overkill. So you will see exactly one message when selecting the target:
image

I think there may be a problem with moving a folder when it is currently active, so I might need to add some code there to jump to a parent folder if necessary.

@RealRaven2000
Copy link
Owner Author

In my tests moving multiple folders on an Imap account proves somewhat unreliable. This may be due to the fact that I break up the moving into multiple calls to nsIMsgCopyService.CopyFolders(..) partly because some folders can only be copied and this is something I find out per folder before that call. Thinking of moving them together into one call and hope for the best?

@RealRaven2000
Copy link
Owner Author

Here is an improved version, which supports moving multiple folders via quickMove - there were complications of you highlight child folders which may lead to an incomplete moving of a selection like this:

image

In the example, QuickFolders would attempt to move "test3" (A childfolder of "atn") after its parent was moved and so lead to an error - potentially then also not moving the following folders "filtaquilla" and "quickfilters". This version will remove all "child folders" from the array of moved folders and so run much more stable:

QuickFolders-wx-5.2pre23.zip

There is also a back-ported version for Thunderbird 68 users:
QuickFolders-wx-4.19pre10.zip

Note: when you move the four folders as of the example the confirmation message will ask about the 3 "legal" folders but it will move everything as expected.

@RealRaven2000
Copy link
Owner Author

Implemented in Releases 5.2 and 4.19.1 (published on 22/01/2021)

@RealRaven2000 RealRaven2000 unpinned this issue Jan 23, 2021
@ThomasKjaergaard
Copy link

I can confirm it works in version 5.2.
Both dragging and with SHIFT+m.

Thank you.
You made my mail sorting easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants