RealRaven2000 / quickFilters

Thunderbird Add-on: quickFilters
http://quickfilters.quickfolders.org/
Other
46 stars 11 forks source link

Create/clone filter from virtual folder #93

Open CoSoCo opened 2 years ago

CoSoCo commented 2 years ago

As "Clone Filter" makes a copy of an existing filter, I like to have the possibility to create a new filter from an existing virtual folder.

Use case: I often create virtual folders to isolate some messages from a folder. After some time, I want to create a filter with the same rules to move those messages to another place.

RealRaven2000 commented 2 years ago

ok - I think this could be a quite simple User Interface - a new menu item in the context menu of any virtual folder in the folder tree. Should it automatically delete the virtual folder after creating the filter?

RealRaven2000 commented 2 years ago

This is a related issue:

https://github.com/RealRaven2000/quickFilters/issues/32

the suggestion wanted the button to be added when creating the search and they provided a screenshot - the main problem here is that the dialog is already very overfilled with commands (and would look bad if the window was too narrow)

image

However if the search is already saved and we use "Properties..." from the context menu, this is a lot more lightweight (the preview list is missing)

image

instead there are only 3 commands:

image

the additional advantage of having it here is that the user could still edit the filter (add / remove items) before clicking "create filter from search" - presumably this should not update the original search folder but just close this dialog and open the filter editor instead.

CoSoCo commented 2 years ago

Wow, much thanks for your quick response.

Please note https://bugzilla.mozilla.org/show_bug.cgi?id=1755819 (the current workflow is very inconvenient). Maybe your addon could also provide this intermittently, as it takes long time for trunk enhancements to happen.

the suggestion wanted the button to be added when creating the search and they provided a screenshot - the main problem here is that the dialog is already very overfilled with commands (and would look bad if the window was too narrow)

image

instead there are only 3 commands:

image

the additional advantage of having it here is that the user could still edit the filter (add / remove items) before clicking "create filter from search" - presumably this should not update the original search folder but just close this dialog and open the filter editor instead.

Right, I would vote for this. And maybe you could name it "Save as Filter", it's shorter.

Another problem is – if the user has chosen "New virtual folder", which opens the almost identical dialogue – the 2 buttons "Create Filter from Search" + "Create" might appear confusing, at least for beginners. So I would only display "Create Filter from Search"/"Save as filter" in case of "Properties" for an already existing virtual folder.

But a direct link from context menu on the virtual folder would also be very smart, maybe additionally.

The existing virtual folder should not be deleted automatically, as the subsequent filter might be extended by additional items such as "age > 30 days".

And great ... I didn't know about the "Advanced Search" until your hint. So I pleased for an enhancement: https://bugzilla.mozilla.org/show_bug.cgi?id=1756327

RealRaven2000 commented 2 years ago

Wow, much thanks for your quick response.

Please note https://bugzilla.mozilla.org/show_bug.cgi?id=1755819 (the current workflow is very inconvenient). Maybe your addon could also provide this intermittently, as it takes long time for trunk enhancements to happen.

I am not a great fan of adding this to any folder as it really clutters up the interface - and it doesn't really add anything folder specific (why on any folder if you do not have any search conditions defined?). It would make sense to have it on a virtual folder because there are already search conditions here.

image the additional advantage of having it here is that the user could still edit the filter (add / remove items) before clicking "create filter from search" - presumably this should not update the original search folder but just close this dialog and open the filter editor instead.

Right, I would vote for this. And maybe you could name it "Save as Filter", it's shorter.

I don't want to just do that - I think it makes more sense to show the "edit filter" dialog and not just blindly save without being able to edit at least the filter name - also you need define at least one action, so you have to edit anyway... afterwards it could follow the flow of the filter assistant by opening the filter list so that the order of filters can be set and the filter can be tested. But this should be handled in a separate issue, let's please not piggyback multiple items in one issue.

Another problem is – if the user has chosen "New virtual folder", which opens the almost identical dialogue – the 2 buttons "Create Filter from Search" + "Create" might appear confusing, at least for beginners. So I would only display "Create Filter from Search"/"Save as filter" in case of "Properties" for an already existing virtual folder.

You mean the item File / New / Saved Search... ?

image

The Thunderbird file for this dialog is virtualFolderProperties.xhtml and the same as when editing:

image

One thing I could imagine would be to label button "Create a Filter instead..." and injecting the quickFilters icon into it to avoid confusion.

The existing virtual folder should not be deleted automatically, as the subsequent filter might be extended by additional items such as "age > 30 days".

Makes sense, I also feel the user might need to tidy up manually afterwards. The one thing to be aware of (but you may have thought of that already) that the filter could (and probably typically would) add an action to process the mail in a way that it won't show up in the search folder anymore (either by moving or tagging the message)

CoSoCo commented 2 years ago

Sorry for the confusion. In the german TB "Saved search" is named "Virtueller Ordner", which means "Virtual folder" in direct translation.

CoSoCo commented 2 years ago

I am not a great fan of adding this to any folder as it really clutters up the interface

Yes, this would be the potential backside.

and it doesn't really add anything folder specific (why on any folder if you do not have any search conditions defined?).

Why, a new virtual folder aka "Saved search" is always child of a distinct parent folder, similar to "New sub folder" which is already in the context menu. (So a 2nd approach could be to add the functionality to the "New sub folder" dialogue.)

It would make sense to have it on a virtual folder because there are already search conditions here.

But those existing conditions correspond to the existing virtual folder, which is the parent of the new to be created virtual folder, which presumably has different conditions and which at this time are not yet existing.

Right, I would vote for this. And maybe you could name it "Save as Filter", it's shorter.

I don't want to just do that - I think it makes more sense to show the "edit filter" dialog and not just blindly save without being able to edit at least the filter name - also you need define at least one action, so you have to edit anyway...

Yes correct. I hadn't in mind to save the filter immediately without editing it.

afterwards it could follow the flow of the filter assistant by opening the filter list so that the order of filters can be set and the filter can be tested. But this should be handled in a separate issue, let's please not piggyback multiple items in one issue.

Yes, this would be an additional issue. On the other hand, it would be consequential to set the order of the just created filter.

Another problem is – if the user has chosen "New virtual folder", which opens the almost identical dialogue – the 2 buttons "Create Filter from Search" + "Create" might appear confusing, at least for beginners. So I would only display "Create Filter from Search"/"Save as filter" in case of "Properties" for an already existing virtual folder.

You mean the item File / New / Saved Search... ?

Yes! And this is the inconvenient path I meant in the enhancement request above and why I want a context menu item.

The Thunderbird file for this dialog is virtualFolderProperties.xhtml and the same as when editing:

One thing I could imagine would be to label button "Create a Filter instead..." and injecting the quickFilters icon into it to avoid confusion.

Yes, this sounds also consequent in parallel to "Update", but is a much longer text than "Save as Filter".

The existing virtual folder should not be deleted automatically, as the subsequent filter might be extended by additional items such as "age > 30 days".

Makes sense, I also feel the user might need to tidy up manually afterwards. The one thing to be aware of (but you may have thought of that already) that the filter could (and probably typically would) add an action to process the mail in a way that it won't show up in the search folder anymore (either by moving or tagging the message)

Correct.

CoSoCo commented 2 years ago

The (complicated) use case I have in mind is:

My email account has some restrictions:

When I'm "on the road" and may have to use the web client on a arbitrary computer, I do not want to see all the newsletters and mailing list conversations in the normal INBOX, so I have to filter them server side, at least coarse in folders like:

The finer "filtering" than should happen in the TB client on my PC by help of virtual folders like:

(To create all these, an easy to reach context menu item would be a great help.)

After some time, when the online memory space becomes exhausted, I have to move the older messages to correspondent local folders in TB. Here our actual enhancement request comes into play. Of each virtual folder (Saved search) I have to create a new filter with same conditions + "age > X days".

Currently I have no idea, if they could be triggered automatically. As they don't operate on the INBOX, but on custom folders like "Comp_Groups", I may have to trigger them manually by help of "Execute chosen filter on ..." in the filter list dialogue. Maybe the "FilterQuilla" addon could help in some way (if states to operate on distinct folders). If you have a better idea, please let me know.

RealRaven2000 commented 2 years ago

The (complicated) use case I have in mind is:

My email account has some restrictions:

  • The overall memory space is limited to 1.5 GB.
  • User defined folders are limited to 20.
  • The server side filter capabilities are very limited.

When I'm "on the road" and may have to use the web client on a arbitrary computer, I do not want to see all the newsletters and mailing list conversations in the normal INBOX, so I have to filter them server side, at least coarse in folders like:

  • Comp_News
  • Comp_Groups
  • Political_News
  • ...

The finer "filtering" than should happen in the TB client on my PC by help of virtual folders like:

  • Comp_Groups % Java Bugs % Java development % Linux Forum % ...

I must warn you: the "On the fly" filtering of virtual folders is NOT 100% reliable. You may be missing items. If you use the "run filter" on the other hand and move the mails physically to a different folder then this will be a lot more reliable. You just have to probably decide to move it to a Local Folder (or a different mail account) if you want to avoid running into the limitations of your current server.

Personally I still use POP3 for my production mail profile (I can still access mails via a parallel IMAP account but I don't do it often - recently I deleted all history before 2020 in order to speed up operations). POP3 downloads everything into locally stored folders (I have more than 500) and this is super performant even though I have a slow Internet connection. YMMV.

RealRaven2000 commented 2 years ago

Currently I have no idea, if they could be triggered automatically. As they don't operate on the INBOX, but on custom folders like "Comp_Groups", I may have to trigger them manually by help of "Execute chosen filter on ..." in the filter list dialogue. Maybe the "FilterQuilla" addon could help in some way (if states to operate on distinct folders).

No they can't - unfortunately you can only run automatic filters on the Inbox right now. I would like Thunderbird Core to solve this issue for us. The request is on my list for FiltaQuilla:

https://github.com/RealRaven2000/FiltaQuilla/issues/88

There is a lot of related technical discussion and links to long standing bugs on Bugzilla there.

PS: on my many folders - I use my Add-on QuickFolders to manage these and what greatly improves my workflow is that I refuse to use the Folder Tree for any navigation or moving / copying folders. These tasks can be all covered much faster and easier by creating tabs in QuickFolders and it;s built in (keyboard driven) quickMove / quickJump functions.

CoSoCo commented 2 years ago

I must warn you: the "On the fly" filtering of virtual folders is NOT 100% reliable. You may be missing items.

Thanks for this hint. I'm aware of it, since I have the same experience often. It seems, that selecting different virtual filters in a round trip triggers the search and after few rounds, the result seems complete. I think, I can live with this. A heavier problem for me is: https://bugzilla.mozilla.org/show_bug.cgi?id=1705351 (which may relate to the "unreliability" of the virtual folders)

Personally I still use POP3 for my production mail profile (I can still access mails via a parallel IMAP account but I don't do it often - recently I deleted all history before 2020 in order to speed up operations). POP3 downloads everything into locally stored folders (I have more than 500) and this is super performant even though I have a slow Internet connection. YMMV.

This is the configuration and workflow that I actually use since years. The problem is the mass of mailing lists and news messages which flood the IMAP INBOX, so accessing my emails, especially private older ones, from "on the road" or during holidays is really inconvenient. Moving the mailing lists and news in special folders by server side filters would help me a lot on that, but with the culprit, I can't download and filter them via POP3 access. So I'm looking on a solution with virtual folders and moving the messages to local folders after some age. My dream is, then I could get rid of the POP3 access.