RealRaven2000 / quickFilters

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

Avoid accidentally running filters through Shortcut, add confirmation dialog #132

Closed RealRaven2000 closed 1 year ago

RealRaven2000 commented 1 year ago

The premium features to run filters on all or selected mails can be triggered accidentally when doing a search and typing (if the focus accidentally has been removed from the search box).

image

I believe this is not a problem when we are in the Inbox, (as filters are ran there automatically anyway) but it should be avoided to trigger this action from any other folder - I just accidentally moved 5000+ messages from one folder to another and thankfully found the location through a list into the filter log.

Therefore a message box "Do you want to run the filters on selected mails / all mails now?" should be inserted before the action is carried out. We will also add a checkbox to remove this question if needed.

RealRaven2000 commented 1 year ago

Test version below. Confirmation option is switched on as new default, but can be disabled:

image

Once a shortcut is used the following confirmation dialogs are shown:

image

image

Test version: quickFilters-wx-5.6.1pre10.zip

note: you have to restart Thunderbird after installation because unfortunately it doesn't remove the original keyboard event handler!

RealRaven2000 commented 1 year ago

As an additional problem that just came to light: the shortcut is also triggered when we edit a search (both the quick filter and the global search field on the main toolbar). So we will have to do additional methods to avoid triggering the function when a textbox on the main UI has the focus.

Amoeba00 commented 1 year ago

Just wanted to comment that I appreciate you posting your own tickets and workflow. I wish Thunderbird were a bit better with IMAP, but at least your program makes it work better. Thanks.

RealRaven2000 commented 1 year ago

Just wanted to comment that I appreciate you posting your own tickets and workflow. I wish Thunderbird were a bit better with IMAP, but at least your program makes it work better. Thanks.

Thanks for the feedback @Amoeba00 - I think working on changes in my (100% open source) Add-ons is good practice as it keeps me motivated and adds at least a minimum of "documentation" as I go, always nice to see somebody is watching. I was grappling with the keyboard listener not being removed when quickFilters updated so I added a fix for that:

quickFilters-wx-5.6.1pre18.zip

This version (and all versions going forward) will tidy up after itself and remove the listener when quickFilters is removed / updated to avoid double triggering. [it can't tidy up any older version of itself as removing event listeners need to point to the exact function that was added] I probably need to add a more detailed description why this change is important when you work with "staggered filters" - that is a row of filters that operate after one another and target emails selectively. With the shortcuts enabled (and without the alert box) it was very easy to accidentally move lots of mails from one folder when trying to do a quicksearch and unintendedly using the Shift Key to enter search terms. I am now also guarding against triggering key shortcuts when in those search boxes - something I had apparently already done in QuickFolders.

RealRaven2000 commented 1 year ago

Latest version:

quickFilters-wx-5.7pre43.zip

Installation: download the zip file then drag into Add-ons Manager without unpacking.

RealRaven2000 commented 1 year ago

Implemented in 5.7 - Published 22/Dec/2022