Open Bug 1486221 Opened 2 years ago Updated 1 month ago

Integrate "Minimize to Tray" into Thunderbird - add-on solution, see comment #38

Categories

(Thunderbird :: OS Integration, enhancement)

enhancement
Not set

Tracking

(Not tracked)

People

(Reporter: tsroman.mail, Unassigned, NeedInfo)

References

Details

(Whiteboard: [postbox-bounty])

User Story

Since 68 has invalidated all the add-ons that used to do this. I think I should mention the current Windows options available. Those being;
https://github.com/benbuck/rbtray
https://github.com/sagamusix/TBTray
and the non TB specific
https://sourceforge.net/projects/rbtray

rbtray does not appear to have an issue with mail.tabs.drawInTitlebar set to true that TBTray has.

Linux KDE has its own option as Aceman stated in Bug 208923 
https://bugzilla.mozilla.org/show_bug.cgi?id=208923#c133

Bug 208923 also suggests the following in the user story.
For GNU/Linux users, desktop environments are rich and easily support customizations. You will find the AllTray utility, compatible with Gnome, KDE, and Xfce (see this excellent tutorial).  This software can minimize any application in the systray by replacing for example, their shortcuts like this:
/usr/bin/alltray/usr/bin/thunderbird -s

For windows, it points to https://github.com/gyunaev/birdtray  which appears to have no binaries,  so not a good option for the general user.
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180807170231

Steps to reproduce:

I post it as a bug because do not find feature request site for Thunderbird.
Recently I updated to 60 and noticed that my favorite extension "MinimizeToTray" no longer supported... And it's unknown if will be.
So I ask here, can you please support this simple feature natively.
For me this is critical, I'm gonna revert to 52 because of this.
I do not know why it is still not implemented for years... Such a simple but very useful feature.
There seems to be a successor: https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-revived/
Perhaps you can contact the author to make his add-on fit for TB 60.
Severity: normal → enhancement
Component: Untriaged → OS Integration
Somewhere saw author response related to this - no plans in the near future.

I can't believe that such advanced and great application like Thunderbird (in my opinion the best) cant minimize to tray.
And once more that was no problem for me when at least we have add-on. Sometimes buggy, but better than nothing :)
Anyway, this is obliviously needed a feature that must be integrated.
Please consider it!
Postbox would be willing to sponsor the development of this feature if anyone would like to work on this. 

Requirements:

* Cannot be structured as an add-on (as those are no longer supported in Postbox)
* Cannot rely on changes or APIs made after 52.8 (as Postbox is currently based on this version)
* Must work on Windows 7, 8, and 10

If interested, let me know and we'll work out the details.
I can't believe this feature request is only 18 years old...it is such a basic feature which I am surprised it is not present by default but that took years (unless this is a dup) to be reported. 
A new author has forked minimizetotray-revived here: https://github.com/ysard/mintrayr/tree/dev_thunderbird_60+ 

and is waiting AMO approval: https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-reanimated/# however I haven't tested it, so no idea if it works.

Afaik until TB 63 we would be safe with this kind of legacy addons but after?

Furthermore, on the addon page the author of the fork commented:
 
"the code is poorly documented and difficult to maintain for people who are not the authors.
The addon uses technology from the early days of the Thunderbird project, which hinders its progress, and that's why Mozilla is currently rewriting many things from scratch in Firefox. Thunderbird will follow Firefox one day or another in this process.
Thus, legacy extensions use APIs that are very/too powerful and dangerous for the security of users. The MinimizeToTray Reanimated update does not present a priori any loss of functionality compared to past versions, but it is impossible to guarantee this in the medium term. When the new APIs will arrive in Thunderbird, it will be time to think about new applications more in line with current technologies".

So wouldn't be better having it integrated in TB?
MinimizeToTray Reanimated is working. But extensions like this are only short term solution.

All "tray" extensions are hack depending on legacy and deprected APIs. These APIs will be eventually removed. I will agree that legacy APIs needs to be removed. They are not secure. Future is WebExtensions. WebExtensions are not be able to do things like this and never will be.

This is why we need support in Thunderbird directly. Sooner or later there will not be any other way to do this.
I would also like to point out that, despite not being sure it is the only culprit, minimizetotray (several versions) seem to also cause in some occasions the opening of multiple TB instances which then are a paint to get closed and often require to disable/unistal/reinstall said addon. 

The bug was reported with Bug 220196 and it is like 15 years old (last modified 11 years old and closed as worksforme despite still happening n 2018) if you do a quick google search ("minimize to tray thunderbird multiple instances") almost the totality of users who reported such problem also have a minimizetotray addon installed.
I've never had this bug in 10 years of using this type of addon, but let's admit, there may be a correlation.

Currently, the fact is that WebExtensions specific to Thunderbird are not yet implemented, and we are waiting to see what we can do with it.
We have to take a look at: https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_63
and https://github.com/thundernest/tb-web-ext-experiments/

Today users are unhappy, but the beta versions between TB52 and TB60 have been available to developers for a long time and updates of their addons could have been made in anticipation.

The real migration will be done in some time. This one essentially affects modifications of the JavaScript language.
It will be necessary to look at the side of the native messaging to implement the minimization functionality.

The problem is that by asking users to download an application on a third-party site in addition to the addon, we lose a large part of the audience and security that WE are supposed to bring us...
I've also experienced the bug of multiple TBs opening, but it's quick to fix.

MinimizeToTray Reanimated, at least as an add-on for a short term fix, looks great.  But I am waiting for it to be reviewed by Mozilla before installing - I hope this happens soon ("This add-on has not been reviewed by Mozilla.").  Does anyone have any sense of timeframes?  I have a feeling that this is one of the more used add-ons for Thunderbird, because who wants to have to either only keep the program open in the task bar or close it?

In fact, like others, I am surprised this has not been integrated into TB.  This is a standard feature on all, or almost all, email clients.  Not having it is a major inconvenience - in fact, it's more than inconvenience, it significantly reduces the program's functionality.

Anyways, here's to hoping Mozilla's approval of the MinimizeToTray Reanimated add-on goes quickly.
Maybe this page contains an explanation:
https://foudil.fr/blog/209/the-web-is-not-the-platform/ (https with a security exception)

In addition, Firefox and Thunderbird rely on several backend platforms (GTK on Linux, Cocoa on MacOS) and minimization issues are very platform-dependent. Moreover the mechanisms related to minimization have varied a lot during last years after 10 years of stability.

Only the Qt backend made (as usual) a compatibility effort for the old and new desktop environments (Plasma 5).
See: http://blog.martin-graesslin.com/blog/2014/03/system-tray-in-plasma-next/
After I upgraded to version 60 of Thunderbird, no tray minimizing plugins still work,
I am on Fedora/Linux with XFCE.
Whiteboard: [postbox-bounty]
I really need the ability to minimize mail for work.
Until then, there is not a single add-on to minimize to tray, not to mention the built-in features of Thunderbird.
I am on Debian\Linux with LXDE.
(In reply to Jalal Ahmed from comment #10)
(In reply to info from comment #11)

Hi, can you test this one on GitHub and open an issue if there is a problem?
https://github.com/ysard/mintrayr/releases

The validation time of the addons on addons.thunderbird are extremely long, 
so I can only publish on GitHub for the moment.
(In reply to ysard from comment #12)
> (In reply to Jalal Ahmed from comment #10)
> (In reply to info from comment #11)
> 
> Hi, can you test this one on GitHub and open an issue if there is a problem?
> https://github.com/ysard/mintrayr/releases
> 
> The validation time of the addons on addons.thunderbird are extremely long, 
> so I can only publish on GitHub for the moment.

Thunderbird lets you install it and offers a restart. But after restarting the extension does not appear
(In reply to info from comment #13)

> Thunderbird lets you install it and offers a restart. But after restarting
> the extension does not appear

This sounds like the same issue I have with this extension: https://github.com/ysard/mintrayr/issues/7
Ok, thank you for the review. For the moment i still can't reproduce this problem on my computers :/
(In reply to ysard from comment #15)
> Ok, thank you for the review. For the moment i still can't reproduce this
> problem on my computers :/

Checked After installation, the extension appears in the extensions folder, but does not appear in the list of extensions in Tunberbird itself. And while it works. When minimized to minimize
https://github.com/ysard/mintrayr/releases/download/1.4.6/mintrayr-1.4.6.xpi works for me, I haven't tried 1.4.4 at
https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-reanimated/
If you need a quick ATN review, ping me. BTW, how does it work (in broad terms)?
(In reply to Jorg K (GMT+2) from comment #17)
> If you need a quick ATN review, ping me. BTW, how does it work (in broad
> terms)?

Thank you very much for your proposal!

First of all it is an updated copy of the extension developed by Nils Maier: https://addons.thunderbird.net/en/thunderbird/addon/minimizetotray-revived/.

The addon uses a pre-compiled library for each platform. This library contains specific code intended to: 
- receive the minimization events and then hide the main window of Thunderbird 
- display an icon in the systray area.

This library also listens to a number of features of the software (new messages, address book) to display them in an optional menu, viewable on request by right clicking on the icon of the systray.


The extension code is no longer maintained, so I made all the API changes listed on https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_57#Removed_and_changed_in_mozilla60.

In addition, Thunderbird no longer allows addons to be unpacked, so we had 2 choices:
- Offer users to download an independent program to install on the system.
It will be the case when the WebExtensions will be there, but in the meantime it is a method which increases the
complexity of the installation process, and may lose a lot of users.

- Manually unpack the contents of the xpi during the installation, into the standard folder of the addon.
Luckily, even on new versions of Thunderbiord, when deleting the addon, the ".thunderbird/xxxx.default/extensions/mintray-reanimated@ysard/" folder is deleted. The process is therefore clean.

This was the second solution we implemented, it seems to work on Windows but still has a bug
having a rare occurrence on Linux, which I still have not solve (see https://github.com/ysard/mintrayr/issues/7).

To finish we had trouble with the context menu on Windows, so we returned to an old hack that the developer had improved in its latest versions. This revert is accessible in this commit:
https://github.com/ysard/mintrayr/commit/cad5ce35b6cbc698f9c1bb13831ff527ab1bcc0e

Here are the main changes made; some translation fixes have been made but it is essentially a quick and necessary update of the code, since this feature is really used; the author could have achieved this if he continued to maintain the project.

Note: The binaries written in C are probably the most sensitive in terms of security.
We have not touched them: they are the same binaries as those present in the versions of the old addon.
Very interesting, thank you. So it is still possible to have binary components in an add-on.
(In reply to Jorg K (GMT+2) from comment #19)
> Very interesting, thank you. So it is still possible to have binary
> components in an add-on.

For the moment, js-ctypes are not removed, and to my knowledge, not planned for deletion in Thunderbird.
This is already the case for Firefox so the future is still very uncertain.
(In reply to ysard from comment #12)
> (In reply to Jalal Ahmed from comment #10)
> (In reply to info from comment #11)
> 
> Hi, can you test this one on GitHub and open an issue if there is a problem?
> https://github.com/ysard/mintrayr/releases
> 
> The validation time of the addons on addons.thunderbird are extremely long, 
> so I can only publish on GitHub for the moment.

yes, I have tried it out, and for me as others, after adding it, then restart, the icon appears, but after restart TB again, it's asking me to install it again.
I agree with all others people, please integrate it Thunderbird. It app that must run all time in background, like said before - new secure extensions have no way to do this. If Thunderbird drop this future request in near future people even haven't chance to workaround this issue.
We really need this feature baked into Thunderbird core. I've been using Thunderbird for 10ish years on Gnome, and the Firetray addon for just about as long.

My muscle memory is to close the TB window with alt + f4 when I'm done with a message, expecting it to hide in the tray and notify me of new mail.

With TB 60+ I'm constantly accidentally closing the TB window due to my muscle memory. I'm an old dog and I can't learn new tricks at this point!

MinTrayR works to an extent, as a temporary solution. It does not change the icon when there is unread mail, which would be nice. Also its future appears to be in doubt.

***I would personally pledge up to $200 of my own money*** for a bug bounty on the following option to be added to TB core for Gnome/Linux:

- Closing the main TB window (either via window decorations or via keyboard shortcut like alt + f4) instead minimizes TB to tray
- Tray icon matches system tray icon theme in sizing and appearance (i.e. in Gnome, monochrome 16x16)
- Tray icon changes to indicate if there are unread messages in any account. (For example, dark grey envelope if everything read, brighter envelope if unread mail exists.) A count of unread messages is not necessary but could also be a configurable option if desired.

Is there a bug bounty program I can contribute cash to? I would literally pay cash for this!

If this feature is desired by the core developers, I could even give a shot at working on it. Is something like this even on the roadmap?
I second that a Minimize-to-tray-feature is a must for thunderbird.
Please, integrate it!
Minimize to tray is a basic feature, Thunderbird must have it.
Common Thunderbird team, what's going on with you? I love Thunderbird but why on earth is this not already a core functionality in Thunderbird for years??? How do you even use Thunderbird for yourself without it? It's like a car without weels. This really needs absolut top 1 priority! I pledge 100 USD in BCH if you implement it, seriously.
Thunderbird is mostly volunteer driven. So step forward and submit a patch which will implement this on *all* platforms, that is Windows, Mac and Linux (various distros). Telling us what our priorities should be is usually not well received at all. $100 are nice, but frankly, if you look at the job at hand, it's more line a 1-2 week undertaking, so you can multiply the hours by some hourly rate and see for yourself where $100 will get you, nowhere in fact.
Minimize to tray is an essential feature. Please integrate it into Thunderbird.
First, I understand that Thunderbird is not a commercial giant. Second, I believe that Thunderbird is the best mail client available in the vast expanse of the internet. Third, I've been supporting Thunderbird financially serveral times for precisely these reasons. And fourth: I agree very much with my fellows here. Please integrate the minimize to tray functionality! We would really appreciate this a lot.

The "minimize2tray revived" plugin is in the TOP 10 most popular plugin list, despite the fact that it causes headaches every once in a while after a major TB update.
I also vote for Minimize to tray integration into Thunderbird core. It is a "must have" feature for me and everyone in my neighborhood...
I suggest that, Mozilla Thunderbird developers' team announce a voting whether should try icon be inbuilt with TB or not, and if the result is 'yes', then announce another raise funding to it.
What do you think guys?
It should be a built-in functionality by the way..
I would like to add my vote for the functionality of MinimizeToTray to be integrated into the Thunderbird core.
It might not be obvious, but voting is accomplished by opening the "Details" section at the top of the bug and clicking the "Vote" button.
This function is a must have! How else can TB look for new emails, if not running?! Minimize to toolbar is no solution for me. I'll look to an alternative, if this funktion not be included soon.
Guys, I know I don't have a right to say anything, because I really never did anything for free open source community [I did, just not on a "mattering" scale]. It's just, this support/bug report website is so bad. So innately bad. Navigation is terrible, voting is super hard to achieve, there's no "back to the topic" link, after I vote, I need to use the back button + need to do some saving of the vote procedure [really?]. I mean come one. These trends might be top notch among the hipster low carb diet coder people, but not among commoners [like me]. If You want the Mozilla community to survive the next decade, You need to hit it with some Ui/UX friendly effort. And yes, that includes implementing the minimize to tray of TB to the core of the program. I mean I'm literally minutes away from switching to alternative product after 14 years with TB.
Please, consider this basic feature, I've never used Thunderbird without a tray extension, so now I'm closing Thunderbird as the typical way to minimize it to tray and leave the mail icon, but from TB 60 it's gone. Consider this: I'm a senior programmer and I only registered bugzilla for this feature request. Best regards.
(In reply to Jorg K (GMT+1) from comment #38)
> What's wrong with
> https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-
> reanimated/
> Looks like it still hasn't been reviewed yet :-(
> 
> Or you can get it from here:
> https://github.com/ysard/mintrayr/releases
> https://github.com/ysard/mintrayr/releases/download/1.4.7/mintrayr-1.4.7.xpi

Hello there. This looks interesting. Didn't know about it's existence. Will try it tonight at home. Thank You for the tip!
(In reply to Jorg K (GMT+1) from comment #38)
> What's wrong with
> https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-
> reanimated/
> Looks like it still hasn't been reviewed yet :-(

This extension still does not work, at least with TB 60.2.1 Dec 12 2018 (updated X-Ubuntu 16.04)
(In reply to mr.xkr from comment #40)
> (In reply to Jorg K (GMT+1) from comment #38)
> > What's wrong with
> > https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-
> > reanimated/
> > Looks like it still hasn't been reviewed yet :-(
> 
> This extension still does not work, at least with TB 60.2.1 Dec 12 2018
> (updated X-Ubuntu 16.04)

Hi, please open an issue on the repository if you have any problem with it.

This extension has an installation issue (addon not displayed on the list of addons)
which is fixed with this version: https://github.com/ysard/mintrayr/releases/tag/1.4.7dev
I only recommend this one as a last resort since the installation is made on a non standard directory, 
but it seems that the problem can not be fixed otherwise.
Please add "minimize to tray" functionality to Thunderbird. I know we've been asking for it for a decade and a half ... TB update from the other day has broken all addons. Thanks!
(In reply to ysard from comment #41)
> (In reply to mr.xkr from comment #40)
> > (In reply to Jorg K (GMT+1) from comment #38)
> > > What's wrong with
> > > https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-
> > > reanimated/
> > > Looks like it still hasn't been reviewed yet :-(
> > 
> > This extension still does not work, at least with TB 60.2.1 Dec 12 2018
> > (updated X-Ubuntu 16.04)
> 
> Hi, please open an issue on the repository if you have any problem with it.
> 
> This extension has an installation issue (addon not displayed on the list of
> addons)
> which is fixed with this version:
> https://github.com/ysard/mintrayr/releases/tag/1.4.7dev
> I only recommend this one as a last resort since the installation is made on
> a non standard directory, 
> but it seems that the problem can not be fixed otherwise.

I've just installed this extension and I can confirm it works perfect on x-ubuntu 16.04. Thanks @ysard!
Thanks for all the comments, we've got the message. I'm closing the bug for further comments now.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Restrict Comments: true
Summary: Minimize to Tray → Integrate "Minimize to Tray" into Thunderbird - add-on solution, see comment #38
Duplicate of this bug: 1539450
Duplicate of this bug: 1558853
Duplicate of this bug: 1587549
Duplicate of this bug: 1601224
Duplicate of this bug: 1607725
See Also: → 208923

Has a decision been made to consider this enhancement after duping every request for the past 17 years to Bug 208923, or is this just another Dup waiting to happen? I hope not, but I would like to see this as a part of greater integration with the windows notification system.

User Story: (updated)

ysard, any plans to make MinimizeToTray Reanimated https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-reanimated/ work for TB 68? I believe I tested it once on TB 60 and it was working there.

Flags: needinfo?(ysard_git)
You need to log in before you can comment on or make changes to this bug.