quickFilters icon indicating copy to clipboard operation
quickFilters copied to clipboard

Make quickFilters compatible with Thunderbird 115 (SuperNova UI)

Open RealRaven2000 opened this issue 1 year ago • 31 comments

Various things break in Thunderbird beta 112 and higher, so they need to be reimplemented:

  • main toolbar / dropdown is missing (this needs to be rewritten as API compliant action button)
  • when dragging an email, the assistant is not triggered (folder tree has been rewritten as HTML, we need to find and attach new event listeners)
  • when moving an email usiung the context menu, the assistant is not triggered
  • the context menu command "Create filter from message..." is currently missing

What parts are currently working

  • preferences dialog seems to be displayed (from Add-ons Manager)
  • Toolbar in message filter list is working
  • the assisted mode can be enabled via the tools menu (tools / start filter assistant...) however it isn't triggered

Below is a bumped version which only works partially in the current beta: quickFilters-wx-6.0pre1.zip

to install in Thunderbird beta, download the zip file and drag into Add-ons Manager (do not extract contents).

I made a new code branch for development (the code will be fundamentally different and thus needs to be forked from here on forward): https://github.com/RealRaven2000/quickFilters/tree/ESR115

RealRaven2000 avatar Apr 13 '23 11:04 RealRaven2000

We made some strides testing the menu integration yesterday - defining the button through the manifest with a html popup will give it the chevron style that we desire for the dropdown. However I still need to figure out a way to trigger an event for showing the popup. In the meantime I managed to wrap the move and copy message functions (from the context menu) so that we can soon start using the assistant this way. Once the menu is functional we will be able to trigger the assistant once again.

Caveats: the event handlers in this version only deal with existing Thunderbird tabs, when a new tab is opened the wrapped code doesn't propagate there - I still need to figure out how to do this. Styling was fixed by injecting the old id into the button. The button is added automatically (to the right of the new mail toolbar area) and needs to be moved to the desired location by the user - again this is a standard in web extensions that cannot be changed at the moment.

Screenshot (Thunderbird 113.0b1) :

image

The "hasNews" flag (which makes the toolbar button a purple color) will later be able to be removed by triggering the menu and looking at the splash screen (WIP). For the moment, one can edit it in about:config if necessary: extensions.quickfilters.hasNews = false

Experimental version: quickFilters-wx-6.0pre10.zip

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

note: tree listeners stuff doesn't work yet (so drag+drop of mails is currently not detected), and there are some kinks with removing the popup.

RealRaven2000 avatar Apr 14 '23 10:04 RealRaven2000

Next experimental version. I had to eliminate quite a few global variables that do not exist anymore on account of each mail tab having it's own tree and dbView.

quickFilters-wx-6.0pre20.zip

I have tested as far as this:

  • enable filter assistant
  • move a message using the Message / move To menu
  • this triggers the assistant. So that's a good start for end to end test before I look at the folder tree and reimplemnting the drag event handler

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

note: tree listeners stuff doesn't work yet (so drag+drop of mails is currently not detected), and there are some kinks with removing the popup, which is lower priority right now. Let's get the assistant working first.

RealRaven2000 avatar Apr 14 '23 15:04 RealRaven2000

Next version - this one prepares filter based on archiving - but this will only work once FiltaQuilla has been ported to Thunderbird 115, which may take a little while. I also made sure the filter assistant is switched off when the Add-on is shutdown to avoid unpredictable behavior when updating quickFilters. Slowly removing all deprecated global objects that give access to the old folder tree and selected messages.

quickFilters-wx-6.0pre27.zip

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

RealRaven2000 avatar Apr 14 '23 17:04 RealRaven2000

  • Fixed the popup issue (the menu reappears after executing the menu command)
  • Fired the "Run filters" command

quickFilters-wx-6.0pre28.zip

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

RealRaven2000 avatar Apr 15 '23 22:04 RealRaven2000

I pulled a half-nighter yesterday and managed to implement the folder Tree drop handlers:

quickFilters-wx-6.0pre31.zip

  • this will make the assistant work when dropping mail into an existing folder tab. However I still have to write code to make this work in any new folder tabs opened (as each tab now has its own individual folder Tree and events)

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

RealRaven2000 avatar Apr 16 '23 09:04 RealRaven2000

New version:

  • added coded that deals with new tabs (folder) created in Thunderbird - these are now also monkey patched and can react to dragged emails and other events relevant to triggering the assistant
  • fixed code for the command "Create filter from message..."
  • all commands on the new dropdown menu appear to be working!

tested in Thunderbird 113.0b1

quickFilters-wx-6.0pre33.zip

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents).

RealRaven2000 avatar Apr 16 '23 14:04 RealRaven2000

Thunderbird 103.0b3 broke a lot of UI / toolbar button stuff

  • in Buttons, <label> elements become <span class=button-label> so all CSS rules (and any dependent code that manipulates such elements must be adjusted - is this likely to happen to menuitem as well?
  • to restyle background-image for buttons we need to access the parent element
    at them moment I need the has() selector, for this we need to set layout.css.has-selector.enabled in about:config.
  • when installing a new version of quickFilters and the function updatequickFiltersLabel() is called, the element #quickfilters-toolbar-button cannot be found, I guess it hasn't been created at this stage yet (injection of id into button[[email protected]] failed)
  • button image is now replaced with <img class="button-icon"> , modify selectors accordingly.
  • button.label = "text" doesn't work anymore, we need to select into the child element instead: btn.querySelector(".button-label").textContent = text
  • Here is a version that fixes most of these. Problem: if you update an existing instance of quickFilters the changes are not shown (button is not available when pathcing), this may be a problem of the WindowLoader (to investigate) - restart Thunderbird to see the changes.

    quickFilters-wx-6.0pre45.zip

    Previews: image image image

    Regressions:

    • updating license key fails! it is restored by the event "onBackgroundUpdates - dispatching licenseInfo" and the old license restored from about:config
    • main button not updated / patched when installing an update
    • pasting license from clipboard throws Uncaught NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITransferable.getTransferData] - seems to be cause by Tb switching to text/plain from text/unicode. check whether this may also affect drag+drop transferables!

    To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

RealRaven2000 avatar Apr 21 '23 12:04 RealRaven2000

New regression in Thunderbird 114 beta - the menu is not added to the button when the Add-on is updated / installed from the Add-on Manager tab. This is because the button does not exist in the document at this stage and so cannot be customized with the file menu. We likely need to move the UI modification code (and possibly any code that patches folder tree) into a tab listener.

RealRaven2000 avatar May 18 '23 14:05 RealRaven2000

New regression in Thunderbird 114 beta - the menu is not added to the button when the Add-on is updated / installed from the Add-on Manager tab. This is because the button does not exist in the document at this stage and so cannot be customized with the file menu. We likely need to move the UI modification code (and possibly any code that patches folder tree) into a tab listener.

Here is a new fixed version - this time I had to modify the action button by patching in the menu again whenever a mail tab is activated. I then enabled displaying the button both in mail and settings tab (mainly for testing).

I also had to re-initialize the label in order to keep messages such as "license expires in 5 days" - because Thunderbird just simply overwrites the label (with the Add-on name) if a tab from a different space is activated..

quickFilters-wx-6.0pre67.zip

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

RealRaven2000 avatar May 18 '23 17:05 RealRaven2000

The first compatible version quickFilters 6.0 was reviewed on addons.thunderbird.net and is now available for compatible versions of Thunderbird (115). I am going to continue compatibility work on this issue as there are still some open items (see below).

RealRaven2000 avatar Jul 01 '23 19:07 RealRaven2000

Fixed the integration of mini-toolbar buttons into the QuickFolders Navigation bar (Current Folder toolbar):

image

this has to be loaded into a different window / document to be visible in the 3pane are of Thunderbird 115

quickFilters-wx-6.1pre9.zip

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

RealRaven2000 avatar Jul 01 '23 19:07 RealRaven2000

improved support for QuickFolders Current folder bar - in the new version of thunderbird, this is now in a different document (3pane) and there is one instance in every Thunderbird Tab that shows a folder.

image

quickFilters-wx-6.1pre13.zip

There are still some issues on the QuickFolders side (such as loading order) which should be resolved until QuickFolders 6.0 is released. For a compatible version to test, check this comment on the QF github.

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

RealRaven2000 avatar Jul 05 '23 17:07 RealRaven2000

Using v6.1pre13.zip

image

Changed the manifest.json max version to 116 and it installed.

Amoeba00 avatar Jul 12 '23 18:07 Amoeba00

Using v6.1pre13.zip

image

Please instead use the official version 6.0 that's already released on ATN:

https://addons.thunderbird.net/en-US/thunderbird/addon/quickfilters/versions/

I am not quite sure why it still doesn't show on the front page, it may be related to the strict_max_version of 115.0 (which is still current for the next 4 weeks)

RealRaven2000 avatar Jul 12 '23 19:07 RealRaven2000

Setting up from scratch Betterbird 115.0-bb6. Quickfilters 6.0 fails to install. Error message is 'quickFilters could not be installed because it is not compatible with Betterbird 115.0' I realize both Betterbird and Quickfilters are under current revision, so this is a report offered in case you can find a solution in Quickfilters

Lab-doc avatar Jul 12 '23 20:07 Lab-doc

As already noted, editing manifest.json max version from 115 to 116 "fixes" the failure to install. It seems to work OK (very limited test)

Lab-doc avatar Jul 12 '23 23:07 Lab-doc

Setting up from scratch Betterbird 115.0-bb6. Quickfilters 6.0 fails to install. Error message is 'quickFilters could not be installed because it is not compatible with Betterbird 115.0' I realize both Betterbird and Quickfilters are under current revision, so this is a report offered in case you can find a solution in Quickfilters

I need to do some in depth testing, maybe there is a problem with Betterbird's versioning schema. When I release a version on ATN I can only use compatible version numbers of existing versions as strict_max_version, so I only have the choice between 115.0 or 115.*. My guess is that Betterbird's version (115.0-bb6) doesn't properly compare the version number (115.0 should be larger than any beta / derivative version)

the version hierarchy should work something like this: 115.* > 115.1 > 115.0.1 > 115.0 > 115.0b1 > 115.0a1

RealRaven2000 avatar Jul 13 '23 09:07 RealRaven2000

Betterbird 115.0 uses (surprise) 115.0 as version: console.log(AppConstants.MOZ_APP_VERSION). Add-ons compatible with that version will work, try: https://www.betterbird.eu/downloads/Addons/[email protected]

Betterbird avatar Jul 13 '23 10:07 Betterbird

@RealRaven2000

I need to do some in depth testing, maybe there is a problem with Betterbird's versioning schema. When I release a version on ATN I can only use compatible version numbers of existing versions as strict_max_version, so I only have the choice between 115.0 or 115.*. My guess is that Betterbird's version (115.0-bb6) doesn't properly compare the version number (115.0 should be larger than any beta / derivative version)

the version hierarchy should work something like this: 115.* > 115.1 > 115.0.1 > 115.0 > 115.0b1 > 115.0a1

fyi

not just Betterbird ... here, same issue -- incompatible version, can't install -- with release channel TB 115 on linux + QF from ATN, Application Basics

Name: Thunderbird
Version: 115.0
Build ID: 20230711125218
Distribution ID:

Update Channel: release
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0 Thunderbird/115.0
OS: Linux 6.3.12-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul  6 04:05:18 UTC 2023

... Add-ons ... quickFilters extension 6.0 false [email protected] ...

pgnd avatar Jul 13 '23 11:07 pgnd

Betterbird 115.0 uses (surprise) 115.0 as version: console.log(AppConstants.MOZ_APP_VERSION). Add-ons compatible with that version will work, try: https://www.betterbird.eu/downloads/Addons/[email protected]

@Betterbird: that installer has strict_max_version = 115.* (not 115.0). but patching it down it still stats compatible. strangely this one isn't:

quickFilters-wx-6.0.zip

If it's not strict_max_version, what else prevents it from being compatible?

RealRaven2000 avatar Jul 13 '23 11:07 RealRaven2000

https://addons.thunderbird.net/thunderbird/downloads/file/1022147/quickfilters-6.0-tb.xpi?src=version-history has this:

      "strict_min_version" : "112.0",
      "strict_max_version" : "115.0"

It still says: image

Looks like a bug in ATN! Sorry, can't help, two comments up a TB user reported the same.

Betterbird avatar Jul 13 '23 11:07 Betterbird

For those users who encounter the compatibility bug I here is a patched version with that sets strict_max_ver = 115.*

quickFilters-wx-6.1pre21.zip

To install, download the zip file and drag into Thunderbird Add-ons Manager (without extracting contents)

RealRaven2000 avatar Jul 13 '23 11:07 RealRaven2000

@RealRaven2000

For those users who encounter the compatibility bug I here is a patched version with that sets

thanks, that does the trick for QuickFilters.

SmartTemplates is already 'happy'; QuickFolder is not, yet ... I'll jump over there.

pgnd avatar Jul 13 '23 11:07 pgnd

@RealRaven2000

For those users who encounter the compatibility bug I here is a patched version with that sets

thanks, that does the trick for QuickFilters.

SmartTemplates is already 'happy'; QuickFolder is not, yet ... I'll jump over there.

yeah there is no active prerelease on ATN anyway, I am going to bump to 115.* before I release beta1.

RealRaven2000 avatar Jul 13 '23 12:07 RealRaven2000

I just released 6.0.1 to ATN today, should be reviewed by EOB.

RealRaven2000 avatar Jul 13 '23 12:07 RealRaven2000

... tree listeners stuff doesn't work yet (so drag+drop of mails is currently not detected), and there are some kinks with removing the popup.

will check this out too thanks

leon

wa4zlw avatar Jul 14 '23 22:07 wa4zlw

Hi, I just received Thunderbird 115.0.1 an immediately started to hate it. I saw that the toolbar and folder tab display is missing in Quickfilters, as well as any icon or "jump to" the folders. Is there any chance to get this back? Thanks.

PotatoCarl avatar Jul 28 '23 04:07 PotatoCarl

Hi, I just received Thunderbird 115.0.1 an immediately started to hate it. I saw that the toolbar and folder tab display is missing in Quickfilters, as well as any icon or "jump to" the folders. Is there any chance to get this back?

jump to, a.k.a. quickJump and the Navigation Bar (which can integrate commands of quickFilters in the center of the screen) are features of QuickFolders, which will be released for Thunderbird soon.

You can install the latest prerelease from here:

https://github.com/RealRaven2000/QuickFolders/issues/351#issuecomment-1646973067

the latest version there is 6.0 pre 303. the Navigation toolbar still needs some improvements as it is not in the correct position when in vertical view. Leave a comment there to discuss please.

RealRaven2000 avatar Jul 28 '23 05:07 RealRaven2000

There is new version over at #203 which adds some of the missing menu items of the old versions.

RealRaven2000 avatar Aug 05 '23 18:08 RealRaven2000

To do: the button "Custom Variables" in the custom templates editor has to be styled again. Probably add a focus color to attract attention.

image

RealRaven2000 avatar Aug 06 '23 08:08 RealRaven2000