Skip to content

Make quickFilters compatible with Thunderbird 115 (SuperNova UI) #181

Closed

Description

@RealRaven2000

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

Activity

  1. RealRaven2000 commented on Apr 14, 2023

    @RealRaven2000
    OwnerAuthor

    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.

  2. RealRaven2000 commented on Apr 14, 2023

    @RealRaven2000
    OwnerAuthor

    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.

  3. RealRaven2000 commented on Apr 14, 2023

    @RealRaven2000
    OwnerAuthor

    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)

  4. RealRaven2000 commented on Apr 15, 2023

    @RealRaven2000
    OwnerAuthor
    • 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)

  5. RealRaven2000 commented on Apr 16, 2023

    @RealRaven2000
    OwnerAuthor

    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)

  6. RealRaven2000 commented on Apr 16, 2023

    @RealRaven2000
    OwnerAuthor

    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).

  7. added a commit that references this issue on Apr 16, 2023
  8. RealRaven2000 commented on Apr 21, 2023

    @RealRaven2000
    OwnerAuthor

    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[extension=quickFilters@axelg.com] 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)

  9. RealRaven2000 commented on May 18, 2023

    @RealRaven2000
    OwnerAuthor

    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.

  10. RealRaven2000 commented on May 18, 2023

    @RealRaven2000
    OwnerAuthor

    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)

  11. changed the title [-]Create quickFilters version compatible with Thunderbird 115 (SuperNova UI)[/-] [+]Make quickFilters compatible with Thunderbird 115 (SuperNova UI)[/+] on May 29, 2023
  12. RealRaven2000 commented on Jul 1, 2023

    @RealRaven2000
    OwnerAuthor

    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).

  13. 8 remaining items

  14. pgnd commented on Jul 13, 2023

    @pgnd

    @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
    quickFilters@axelg.com
    ...

  15. RealRaven2000 commented on Jul 13, 2023

    @RealRaven2000
    OwnerAuthor

    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/qfm-classic-1.103.0@betterbird.eu.xpi

    @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?

  16. Betterbird commented on Jul 13, 2023

    @Betterbird

    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.

  17. RealRaven2000 commented on Jul 13, 2023

    @RealRaven2000
    OwnerAuthor

    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)

  18. pgnd commented on Jul 13, 2023

    @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.

  19. RealRaven2000 commented on Jul 13, 2023

    @RealRaven2000
    OwnerAuthor

    @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.

  20. RealRaven2000 commented on Jul 13, 2023

    @RealRaven2000
    OwnerAuthor

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

  21. wa4zlw commented on Jul 14, 2023

    @wa4zlw

    ... 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

  22. PotatoCarl commented on Jul 28, 2023

    @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?
    Thanks.

  23. RealRaven2000 commented on Jul 28, 2023

    @RealRaven2000
    OwnerAuthor

    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:

    RealRaven2000/QuickFolders#351 (comment)

    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.

  24. RealRaven2000 commented on Aug 5, 2023

    @RealRaven2000
    OwnerAuthor

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

  25. RealRaven2000 commented on Aug 6, 2023

    @RealRaven2000
    OwnerAuthor

    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

  26. RealRaven2000 commented on Aug 13, 2023

    @RealRaven2000
    OwnerAuthor

    Just released a new version 6.2 with lots of bug fixes. Awaiting review on ATN right now.

  27. unpinned this issue on Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions