QuickFolders icon indicating copy to clipboard operation
QuickFolders copied to clipboard

Make QuickFolders compatible with Thunderbird 115 (ESR 2023/24)

Open RealRaven2000 opened this issue 1 year ago • 48 comments

I have created a new branch ESR115 for all changes related to the next version of Thunderbird (UI SuperNova). We can already test the new UI in the latest betas of Thunderbird 112. AS the folder tree and 3pane window have been rewritten in HTML currently neither the toolbar buttons, the QuickFolders toolbar and any folder tree injections (including custom icons) are functioning right now.

Since I have created a completely new branch this and all future development will be incompatible with the current Thunderbird 102 and all previous versions as it is too difficult to do full compatibility with ESR115 and ESR102 in the same version. I am considering also raising QuickFolders major version to 6 to distinguish its builds. Early test versions for beta users will be made available below - please leave a comment or emoji to be notified automatically.

Elements to fix:

  • QuickFolders toolbar is not displayed (SuperNova removes custom toolbars and crams everything into a "unified toolbar" at the top of the Thunderbird window). I am still evaluating alternative options, but might just end
  • the mail extension APIs do not allow creating our own menus (as menus are deprecated elements) but only adding elements to the built in context menu, so the menus will likely still be experimental code. I hope I will be able to retain all functionality. Some or all drag+drop code may have to be reimplemented
  • folder tree has been rewritten, so all icons need to be reimplemented
  • all event listeners in the folder tree (drag and drop) need to be reimplemented / based on the new tree
  • main toolbar buttons missing (this needs to be rewritten as API compliant action button)
  • current folder bar needs to be reimplemented

I am currently doing experimental code on my Add-on quickFilters here and will reuse the gained experience for QuickFolders.

RealRaven2000 avatar Apr 04 '23 11:04 RealRaven2000

Here is a first (very broken) version of QuickFolders that can be installed in Thunderbird 113 beta:

QuickFolders-mx-6.0pre17.zip

image

what works:

  • custom colors seems to be displayed
  • subfolder menus seem to be displayed
  • context menu (QuickFolders Commands / Mail Commands) are displayed. Obviously they need to be tested
  • search function (quickJump) can search the folder tree (but you can't jump to the folder yet)

next steps:

  • categories are broken (as they were stored in the session). If you select __ALL from the dropdown on the left you can make all folders visible. Session storage may have to be rewritten altogether.
  • styling needs to be fixed to show icons beside label
  • QuickFolders label (on the left) has wrong alignment and is clipped
  • clicking a tab doesn't navigate to the folder yet (uses gFolderTreeView, so needs to be rewritten)
  • make sure all folder tree related code runs in the current tab (only, and when it makes sense)

QuickFix version with folder navigation

QuickFolders-mx-6.0pre18.zip

  • this version uses displayFolder(folderUri) to open a folder. Still need to find full replacement code for everything related to gFolderTreeView
  • to do: rewrite function QuickFolders_MySelectFolder()

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Apr 17 '23 19:04 RealRaven2000

New version 6.0 prerelease27 for testing, see below.

what works here:

  • folder can now be selected by clicking the folder
  • if the folder is open in another tab, the tab will be activated
  • tab of current folder is shown with an underline

what doesn't work:

  • scrolling the selected folder into view.
  • selecting the category is still broken on startup (still only recent folders and inbox are shown, no idea why)
  • styling of buttons with icons - the label is too low:
  • any icon modifications in folder free (need to completely rewrite quickfolders-folderTree.js module)

image

  • vertical positioning problems
  • QuickFolders label is cut off

Entities Changed

  • tabmode "3pane" is now replaced with "mail3PaneTab"
  • eliminated gFolderTreeView from the navigation code (more to be done in quickfolders-interface.js)
  • tabContainer.selectedIndex became tabContainer.tabbox.selectedIndex
  • rewrote Interface.rebuildSummary()
  • used MailServices.messageServiceFromURI() instead of messenger.messageServiceFromURI()
  • get CurrentFolder() now uses gTabmail.currentTabInfo (deprecated gFolderDisplay)
  • rewritten: quickFilters.Util.getSelectedMessages() - it also retrieves URIs into the passed array, removed gFolderDisplay
  • Added function Util.logTb115( ) to log missing features to console.
  • Moved folder tree event injection to a dedicated function patchFolderTree()
  • Rewrote QuickFolders_MySelectFolder() [WIP]

To do:

  • check how to retrieve the string from srchMenu for createMailCmdMenuItem().
  • continue work on QuickFolders_MySelectFolder - find a way to scroll, expand / collapse? folders.
  • remove event calling QuickFolders.FolderTreeSelect() when Add-on is shut down!

QuickFolders-mx-6.0pre27.zip

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Apr 18 '23 16:04 RealRaven2000

  • Fixed layout issue with QuickFolderf label button (toolbar is now injected into vbox #titlebar

  • Merged in changes from 5.16.

  • Fixed tab select listener (to highlight the selected folder's tab)

  • to do next: fix category selection on startup.

QuickFolders-mx-6.0pre32.zip

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Apr 19 '23 10:04 RealRaven2000

Latest version below, this one has mainly visual fixes.

Fixed:

  • removed a lot visual problems in toolbar by switching to flex layout
  • default to show all buttons on startup instead only a few (we still need to fix categories saving / loading across sessions)

To do:

  • restore currentActiveCategories when starting up, save active categories
  • persist currently selected category in tab!
  • fix dialog to "change order of tabs"

QuickFolders-mx-6.0pre36.zip

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Apr 19 '23 16:04 RealRaven2000

Thunderbird 113 beta3 broke drag + drop

It seems there were some fundamental changes with dragging messages / folders. Mainly caused by including multiple red herring datatypes.

QuickFolders-mx-6.0pre52.zip

fixed at least drop handlers for messages & tabs for getting back the most basic functionality.

Next Steps:

  • repair category selection per open Thunderbird Tab
  • restore categories when QuickFolders loads (Tab session storage)
  • look at icon modification for folder tree (I don't know whether / how this is possible. We may have to store the information elsewhere than the current folder properties)
  • test "open in new tab"
  • recreate Current Folder toolbar - maybe rebranded as Navigation bar.
  • look at the possibility of integrating the quickMove button into the toolbar on top of the folder tree

RealRaven2000 avatar Apr 21 '23 15:04 RealRaven2000

Current problem in Tb114.0b3 - it doesn't load fully because or a problem during tab session prep: QuickFolders.prepareSessionStore()

TypeError: mailTabType.modes.folder is undefined - [quickfolders.js:1938:20] (chrome://quickfolders/content/quickfolders.js)

Temporary quick fix (catching the exception, but not fixing the session store function , which will be in charge of storing QF category): QuickFolders-mx-6.0pre57.zip

RealRaven2000 avatar May 20 '23 23:05 RealRaven2000

Just tested in Thunderbird 115.0b2 - recent folders menu not working, here is a fix:

QuickFolders-mx-6.0pre66.zip

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

Next Steps:

  • implement current folder toolbar (Navigation bar)
  • store session info for current category (or at least current category of first folder tab)

RealRaven2000 avatar Jun 18 '23 17:06 RealRaven2000

Fixed most commands in the Mail Folder Commands popup. A lot of these were caused by Thunderbird removing globalTreeController.

image

QuickFolders-mx-6.0pre68.zip

To do:

  • fix the "Search Messages" command (bc MsgSearchMessages is not defined)
  • implement current folder toolbar (Navigation bar)
  • Store session info for current category (or at least current category of first folder tab) - we may use the new interface by @jobisoft see this phabricator patch.

RealRaven2000 avatar Jun 19 '23 21:06 RealRaven2000

This is unrelated to the most recent problems, but I can't think of anybody better suited to answer... and how it relates to QuickFolders.

This is a question about the future. This is NOT a complaint and it is NOT a request to fix something. I have learned to deal with it as it is, but I want to know about the future if/when I upgrade.

As you may recall:

  1. I have a large number -- many thousands -- of mailfolders on an IMAP server (located locally on the same network as our workstations).

  2. Since TB and QF are mission critical applications for us, I have been worried about potential problems resulting from upgrading to the latest TB and thus to the latest QF. We are still using TB 78.7.1 and QF Pro version 5.9.pre33. [When I clicked on QF I just discovered that my license expired four days ago and did not alert me; I have to extend as soon as I finish writing this!]

  3. My IMAP organization of folders is largely in by letters of the alphabet. The a-f folder contains the a,b,c,d,e,f folders. The a folder contains all clients whose name begins with "a", etc. The s-range is divided into four folders because of the large number of "s" people. Also virtually all mail folder names include the clients number (now over 20,000 clients -- though not all have mail folders) .... thus the digit "1" is extremely common in folder names.

3a) With this arrangement, if I want to file into or go to certain folders [the letters of the alphabet that start more of peoples' names], the response time increases from fractions of a second TO MULTIPLE SECONDS. I can probably count to 7 in the time it takes for the system to come back with a response to filing into or going to an a mail folder in the s range.

3b) If I try to file into to go to a folder for client 1233 or 12345 AND IF I USE THE NUMBER -- starting with the digit "1" -- INSTEAD OF THE NAME .... THUNDERBIRD LOCKS UP for MANY MINUTES (or at least is non-responsive, and puts out a not responding wait/continue dialog) -- I don't know if it ever actually responds.

So...

Do you know if TB's seemingly significant changes (since 78.7.1) to how it does things in this realm...

a) Do you know if the TB's changes touch on the type of problem or general area of function (delay if large number of first-character potential targets or locking up if very large number of first-character potential targets ) I have described?

b) Do you know if TB's changes may make the problem better or worse?

c) Do you know if TB's changes will allow you to address this type of problem on your QF side of things? [For example, delaying using the user-input until there are X number of characters typed.]

jaysmithgit avatar Jun 19 '23 22:06 jaysmithgit

@jaysmithgit thanks for the comments, but let's take this off this particular topic, I have lots of ground to cover for 115 compatibility and don't have space here to do general discussion on things like Thunderbird performance. Tb Core was aware of performance problems with folders, I think a lot of these were fixed in the later half of the Thunderbird 102.* cycle. I would suggest backing up the complete profile then updating to Tb91, and waiting for reindexing. then updating to 102 and do the same; afterwards you will be able to tell. Do note that the search routine has to iterate all folders exerytime, and it may sort them according to the algorithm. If you want more activity at issue #239 do a follow up there. However I cannot test with Thuinderbird 78, I have been using 102 for almost a year and 91 beforehand. It's very hard to backport bugfixes to really old versions. IN fact for Tb115 I totally scrapped backwards compatibility because the platforms are so different. If you want faster, simpler code, you should definitely try to stay on the ESR (current version) route - the current version is 102.12.0.

RealRaven2000 avatar Jun 20 '23 21:06 RealRaven2000

A user reported an error message that is caused by having no bookmarks (reading list) defined:

image

This was caused by the different behavior of the replacement routine IOUtils.readJSON(). In this patched version I am handling the problem more gracefully:

Below is a fixed version

QuickFolders-mx-6.0pre81.zip

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Jun 20 '23 21:06 RealRaven2000

I added the current folder toolbar (still work in progess) - this had to be injected into a separate (3pane) document, so there are still some open ends regards the code. Here is a first version to test:

QuickFolders-mx-6.0pre100.zip

Also fixed:

  • opening the search panel from the context menu

To do next:

  • fix style modifications for the current folder tab (there are still some problems on startup and with the font color)
  • fix the buttons go next / previous
  • fix the recent folders panel
  • maybe find a way to lift up the navigation bar to the top in vertical view. I could not inject it into the message pane as it broke a lot of Thunderbird functions. Ideally we would rewrite the grid-template rules for body.layout-classic and body.layout-vertical of about3pane.css. But I want to avoid modifying such a fundamental file in Thunderbird, because it is very high risk.
  • sessions storage for categories

RealRaven2000 avatar Jun 29 '23 15:06 RealRaven2000

Still trying to make Navigation bar more reliable (and to make it work with additional folders "open in new Tab")

QuickFolders-mx-6.0pre115.zip

Fixed buttons

  • go to next (unread) folder button
  • go to previous (unread) folder button
  • go to next thread button

To Do:

  • single message tab support
  • single message window support
  • some layout problems with text alignment / flex
  • reliability issues on startup
  • styling of colored tabs / themed look
  • drag + drop for mail icon
  • recent folders popup menu
  • show Current folder bar in additional 3pane tabs (displayed when opening a folder in new tab)

RealRaven2000 avatar Jun 30 '23 14:06 RealRaven2000

I made some changes to support more (folder) tabs with the current folder toolbar. This is still somewhat unfinished because 3pane has now multiple instances and needs to be addressed on a per tab basis. I implemented the recent folder item and fixed the navigation buttons.

QuickFolders-mx-6.0pre125.zip

Regressions:

  • quickFilters buttons are not shown on init

To Do:

  • right-click menu on tab that shows the subfolders and tool submenus (mail commands and QuickFolders commands)
  • single message tab support
  • single message window support
  • some layout problems with text alignment / flex
  • styling of colored tabs / themed look
  • drag + drop for mail icon
  • show Current folder bar in additional 3pane tabs (displayed when opening a folder in new tab)

RealRaven2000 avatar Jul 03 '23 15:07 RealRaven2000

Improved current folder toolbar (navigation bar) in this version. There will also be a new version of quickFilters that integrates better with the multiple instances of the folder toolbar (when more than 1 folder tab is open)

  • implemented recent folders menu
  • implemented mail commands (purge junk only works in current folder)
  • fixed added quickFilters command button (requires quickFilters 6.1 pre 12 or newer)
  • quickFilters command buttons will also be stashed away for later and loaded again when QuickFolders is updated / restarted
  • preparation work for single message compatibility see liftNavigationbar()
  • initialize custom buttons when opening new tabs / restarting Add-on
  • Fixed logic for displayNavigationToolbar(), so that it can be closed / shown in individual folder tabs
  • renamed initToolbarHiding() to initToolbarTabListener() and moved caller to qf-3pane.js and qf-messageWindow.js scripts
  • fixed displaying subfolders

image

QuickFolders-mx-6.0pre149.zip

To do:

  • single message tab support
  • single message window support
  • drag + drop for mail icon
  • drag + drop to re-order the tabs is broken in Main Toolbar!
  • implement selected category session storage
  • implement custom icons for folder tree
  • icon backup function for TB 102 !

RealRaven2000 avatar Jul 04 '23 22:07 RealRaven2000

  • Fixed a regression that falsely displayed the message "could not find folder!" after a successful quickJump. this also prevented the folder name being stored for reuse the next time
  • Fixed drag + drop for changing position of tabs within the Toolbar
  • added support for single message tab

QuickFolders-mx-6.0pre157.zip

There is still an issue in column view, in which case it may be better to load the toolbar into the messagepanebox (to be on top of the preview) rather than into threadPane - where it ends up at the bottom of the screen...

But the problem of injecting into messagepanebox is that the toolbar will be hidden when no message is selected! This would defeat it's main purpose of navigating to the next unread folders.

To do:

  • full test in single message tab mode
  • drag + drop for mail icon
  • implement selected category session storage
  • single message window support
  • implement custom icons for folder tree
  • icon backup function for TB 102 !
  • when restarting Thunderbird, style sheets for colored tabs in Current Folder bar are often not loaded.

RealRaven2000 avatar Jul 05 '23 20:07 RealRaven2000

Added an (experimental) action button that can be used to toggle visibility of the main QuickFolders toolbar. At the moment action buttons to not support toggling buttons for add-ons natively so I hacked the existing button and added some classes attributes so work similarly to the "Filter messages" button:

image

QuickFolders-mx-6.0pre179.zip

This will replace the toolbarbutton that could be used in Thunderbird 102 to hide the QuickFolders toolbar temporarily:

image

I will also consider a replacement for the "skip unread folder" and "create new subfolder" buttons, but that will not be in the unified toolbar because of the limit (1 button per Add-on)

RealRaven2000 avatar Jul 06 '23 17:07 RealRaven2000

Some stability fixes for the current folder toolbar, including better dark theme support in Betterbird:

QuickFolders-mx-6.0pre187.zip

Planned next:

  • Category session storage
  • Custom folder tree icons

To test the version above, download the zip file, and then drag it into Thunderbird Add-ons Manager, do not extract contents or it won't install.

RealRaven2000 avatar Jul 10 '23 20:07 RealRaven2000

I have created a new branch ESR115 for all changes related to the next version of Thunderbird (UI SuperNova). We can already test the new UI in the latest betas of Thunderbird 112. AS the folder tree and 3pane window have been rewritten in HTML currently neither the toolbar buttons, the QuickFolders toolbar and any folder tree injections (including custom icons) are functioning right now...

will take a look thanks leon

wa4zlw avatar Jul 13 '23 16:07 wa4zlw

I was working on more navigation toolbar . single message window compatibility today. Problems: there is no global tabMail element which made a lot of code non-functional.

  • folder navigation buttons: probably doesn't make sense to show them in this context, so I am going to hide the buttons parent folder, next sibling folder and previous sibling folder. May also (have to) hide (some of) the Mail Folder Commands.

  • The "Recent Folders" button might be valuable in the future as a means to more the currently viewed mail to one of the locations in the dropdown.

  • The "drag mail" icon doesn't work. I probably would like to hide any filter related actions for now.

  • Jump to next unread folder: should this work here? I feel that would be a good thing, at least for the single message tab.

QuickFolders-mx-6.0pre201.zip

Note: usually when I get near 200 builds, I am pretty close to releasing. Here I am not sure yet, there are a lot of stability issues with the current folder toolbar, depending on what kind of tabs are open when the Add-on is activated / installed. In the single message window there is still some rogues content underneath the Navigation bar:

image

To test the version above, download the zip file, and then drag it into Thunderbird Add-ons Manager, do not extract contents or it won't install.

RealRaven2000 avatar Jul 13 '23 20:07 RealRaven2000

New version available below!

  • implemented more fixes for Navigation Bar. This should now hide the unnecessary folder navigation buttons when in a single message tab or window.
  • repaired theme support for background of navigation bar
  • added category storage for current folder category. This was an absolute must have before officially releasing on ATN. I am using the new tab session API, which requires Thunderbird 115 as minimum. This also got rid of some monkey patched code that wouldn't have worked in the new platform anymore.
  • Initially there seem to be some problems with the session API in Betterbird 115.0-bb6, it is possible that these APIs haven't been implemented there yet, or maybe creating XULStore takes a while...

QuickFolders-mx-6.0pre213.zip

You can now select a category for each folder tab to filter the visible tabs, and this will be remembered when Thunderbird restarts. With QF Pro, one can also select multiple categories by using the SHIFT key:

image

I will probably release the current feature set as first beta version, 6.0b1, and deliver folder tree icon support in a later version.

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Jul 14 '23 23:07 RealRaven2000

There was a problem with the tab session being deleted if the ADd-on is manually updated or temporarily disabled during the session. Which means the Categories are reset to "show all" every time I install a new test version. I implemented a workaround and also raised a request on Bugzilla to change this behavior, see: bug 1843704

If Thunderbird wants to delete this session data, it should do it on shutdown and never during the session, as the Add-on may only be disabled temporarily. If the Add-on is disabled when Thunderbird shuts down, it is fine to delete this session data.

QuickFolders-mx-6.0pre224.zip

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Jul 15 '23 13:07 RealRaven2000

In this next version I repaired the broken drag+drop that's caused by having the Navigation (Current folder) toolbar in a different document/ window than the main window.

  • repaired dragging the "envelope" icon (this represents the currently selected messages) to the usual target elements (such as a QuickFolders tab, the recent folder elements, the folder tree or even the desktop)
  • repaired the drop handler of the recent folders icon on Navigation bar, so we can also yet again drag any emails or even the envelope icon to a recent folder again: image

QuickFolders-mx-6.0pre231.zip

This means QuickFolders is back to being much more useful. And very close to a beta release, after more testing!

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Jul 15 '23 16:07 RealRaven2000

Fixed #368 (Line feeds not displayed). Requires Thunderbird restart - because style sheets are cached. Also it seems some of the style sheets are loaded multiple times, maybe that can be fixed in a future version too.

QuickFolders-mx-6.0pre239.zip

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Jul 16 '23 11:07 RealRaven2000

In maillist the map showing under. When i uncheck all boxes in 'Werkbalk' the map is stil there screenshot

theovanoostenbrugge avatar Jul 19 '23 06:07 theovanoostenbrugge

In maillist the map showing under. When i uncheck all boxes in 'Werkbalk' the map is stil there

@theovanoostenbrugge - should be fixed now. Difficult to do because there are so many different incarnations. It should also update live when you toggle the settings, both in single message tabs and single message windows:

QuickFolders-mx-6.0pre261.zip

I implemented a new notification listener in all internal single message windows (about:message) rather than going through the global one. This version also fixes the writing of json data (affects backup and reading list)

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Jul 19 '23 14:07 RealRaven2000

Added back the [F9] shortcut to toggle the folder pane. This is now using the messenger.commands API. Thus, the shortcut can be reconfigured / disabled through Add-ons Manager » Tools Icon » Manage Extension shortcuts. Now that I know how this works I might add more of my shortcuts using this interface.

image

QuickFolders-mx-6.0pre264.zip

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Jul 22 '23 11:07 RealRaven2000

Added translations for [F9] toggle folder tree shortcut. Took a while to test because the debugger is really misbehaving in 115.0.1 at the moment

QuickFolders-mx-6.0pre275.zip

To test the version above, download the zip file, drag into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 avatar Jul 22 '23 12:07 RealRaven2000

Made a bunch of layout improvements in the options window, added the icons back and redesigned "Pro" license icons as svgs.

QuickFolders-mx-6.0pre303.zip

To do next:

  • make sure the "recent folders" popup auto-hides after use.
  • release a version on ATN!

To test the version above, download the zip file, drag the file into Thunderbird Add-ons Manager, do not extract contents or if won't install. You can rename it to quickfolders_6.0.xpi if it makes you feel better. It's the same thing, but github doesn't allow attaching that file format.

RealRaven2000 avatar Jul 23 '23 22:07 RealRaven2000

Hi @RealRaven2000
I just want to test the add inn but I don't know where to put the content of the zip file.

Edited: two minutes of thinking, problem resolved 🤦‍♂️

hpbruns avatar Jul 25 '23 07:07 hpbruns