Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unofficial working solution for TB 102 #46

Open
AlexUkr73 opened this issue Jul 6, 2022 · 37 comments
Open

Unofficial working solution for TB 102 #46

AlexUkr73 opened this issue Jul 6, 2022 · 37 comments

Comments

@AlexUkr73
Copy link

Fixed to work in TB 102.

@defacto64
Copy link

This one works, although it's looking a bit different than it used to.
It has the limitations you said above, but it's much better than nothing :)
Good work, thank you!
👍

@AlexUkr73
Copy link
Author

@defacto64
Thunderbird developers are re-designed structure of Message Header.
I figured out that the best way is to place frame with photos at the bottom of Message Header.
In initial and other places it looks ugly.

@Exatice72
Copy link

@AlexUkr73
It works...sometimes for me.
In my local address book of Thunderbird 102, my contacts have a picture (sometimes the same one).
However, some photos are displayed well but others...not at all !
And I don't understand why...
Any idea ?

@AlexUkr73
Copy link
Author

AlexUkr73 commented Oct 5, 2022

@Exatice72

Try to re-check settings manually like shown in post below

#44 (comment)

Also try to play with setting "extensions.ldapinfoshow.service_priority":

  • you can put first "addressbook" value and then other values, like
    addressbook>local_dir>ldap>....

@Exatice72
Copy link

@AlexUkr73
I have checked these settings.
In fact, I think it comes from the management of the address book (and photos) of Thunderbird 102: the old contacts with a photo are well displayed but not the new ones !
For example, if I modify an old contact by deleting its photo and replacing it by a new one, it will be displayed in the address book but it will not be displayed in the extension !

@AlexUkr73
Copy link
Author

@Exatice72
You are right!
Photos for old (not modified) contacts still can be displayed because they are present in cache.
After modification or new contact creation - cache is not updated by addon.

Solution is not found on this moment.
Moreover, from version 106 developers will introduce another mechanism for obtaining contact photo from card.

@AlexUkr73
Copy link
Author

@Exatice72

Unfortunately there is no any solution (after switching to vCard format in addressbook).

https://bugzilla.mozilla.org/show_bug.cgi?id=1617490#c4

Reading photos from AddressBook will be implemented in version 106 and I'll try to adjust addon accordingly.

@Exatice72
Copy link

@AlexUkr73

Thanks for your answer.

You said that photos for not modified contacts are still present in cache.

What is the location of this cache and would it be possible to modify it ?

Or it's not even worth thinking about it !

@AlexUkr73
Copy link
Author

I don't know, really ;o)

I see from the code, that when modifying contact it's photo is removed from cache and updated again if photo exist (this is broken).

I've already played around with beta 106 version - new function seems not available yet.

@Exatice72
Copy link

@AlexUkr73

Hi AlexUkr73,

Any news about your addon ? Will it be compatible with Thunderbird supernova ? I hope so !

In Thunderbird 114 it is now possible to display sender's profile picture, but this picture is much smaller than in the addressbook...

@AlexUkr73
Copy link
Author

@Exatice72
Hi,
good news - i've managed to make photos from addressbook to display, but only in test addon SCF (ShowContactFoto).
SCF_0_1.zip

I developed it from scratch based on MailExtensions development guides from Mozilla developers to check - is it possible to pull any photos from AddressBook at all.

When I realised that photos can be pulled - I reviewed LdapInfoShow code again to find the solution, but failed:

  • photos somehow cached inside addon and this cache isn't updated on AddressBook items change.

The biggest minus of SCF - delay on displaying photo icons - maybe the reason is monkey code (I'm just advanced PC user) + additional layer between addon and Thunderbird (ugly by design)

But.... it runs on TB versions 91, 102.
In 115-beta it also works, but does not display AddressBook photos ;o(

Plans:

  • develop Options page for new SCF addon (to provide ability to control photo icons size, spacing, popup size/font. define path selection outside TB profile directory;
  • develop photos displaying in compose window for SCF.
  • review from time to time LdapInfoShow code in hope to resolve it's issue too.

I can not give any ETA for plans above, as this is tons of googling and thousands of wrong steps/attempts for amateur java coder.

@Exatice72
Copy link

@AlexUkr73
Hi,
Thanks for the job !

As you said, it works on TB 102 even if I see the message "To protect your privacy, TB has blocked remote content in this message". So I allow remote content frome file://name-profile-thunderbird and all is ok.

However, I noticed a surprising behavior with another user (Linux) on the same computer with TB 102 (with another profile) and SCF does not display AddressBook photos...

Good luck with the rest of job

@AlexUkr73
Copy link
Author

@Exatice72

I use Debian-based Linux for developing and testing with different Thunderbird versions:
("MX Linux" and the only one user defined in system)

  • v 91 is installed from official repository and locked from updates (and use profile by default);
  • v102, v108, v115 run as "portable" and have profiles in custom places (created using --ProfileManager option on start, e.g.
    /home/alex/Mail_releases/thunderbird_102/./thunderbird --ProfileManager )

Thunderbird releases are taken from https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/

Different TB versions run with option to load defined profile, e.g.
/home/alex/Mail_releases/thunderbird_102/./thunderbird --profile '/home/alex/.thunderbird_102/luvwn0gm.Default User'

All profiles contain directory "Photos" with images (created by AddressBook to store photos from contacts setup)
Screenshot_2023-07-08_07-37-44

Path to profile can be found in TB from "Account Setting" -> "Local Folders"
Screenshot_2023-07-08_08-06-17

Hope this information will be useful.

@AlexUkr73
Copy link
Author

AlexUkr73 commented Jul 18, 2023

@Exatice72
Seems issue with AddressBook photos is fixed.
Please try.
InfoShow_102_AB_fix.zip

@Exatice72
Copy link

@AlexUkr73
Hi,

All is ok now with AddressBook with TB 102.4 !

Next step with TB 115 Supernova ??

Thanks for the job.

@AlexUkr73
Copy link
Author

AlexUkr73 commented Jul 20, 2023

@Exatice72

Perfect.
Regarding TB 115 Supernova - no plans, until I will be forced to use it ;o)

@AlexUkr73
Copy link
Author

AlexUkr73 commented Jul 31, 2023

I've stopped developing of my own addon SCF (ShowContactFoto).
LdapInfoShow has better performance, especially on messages with tens of addresses in To, Cc, Bcc.

Any approaches to improve performance did not work (due to Mozilla's security limitations with access to local filesystem) ;o(

Addon is fully operable.
Storing settings and Options page are added.
Functionality in messageCompose window is not implemented.

SCF_0_4.zip

@AlexUkr73
Copy link
Author

AlexUkr73 commented Aug 4, 2023

@Exatice72

Fix with AddressBook photos for SCF (for TB versions >106)
SCF_0_5_AB.zip

According to information from developers:
We just released Thunderbird 115, which is now the current version and it will be shipped to all users in a couple of weeks. Thunderbird 102 will be end-of-life in a few weeks.

So, ShowContactFotos will be the only working solution as LdapInforShow does not work in TB 115

@Exatice72
Copy link

@AlexUkr73
disp

Fine !
Everything looks good.
Thanks again for your job.

@defacto64
Copy link

It works for me too, @AlexUkr73, thank you!

Have you thought of publishing your add-on to Github?

@AlexUkr73
Copy link
Author

AlexUkr73 commented Aug 5, 2023

@defacto64
Good.

I've already submitted addon to be added to official Thunderbird addons page.
They proposed some enhancements in code which I'm trying now to implement.

https://addons.thunderbird.net/en-GB/thunderbird/addon/showcontactfoto/

please note:
there is the older version 0.4 without AB fix.
SCF 0.5 above is most recent.

@Exatice72
Copy link

@AlexUkr73
Hi,

Would it be possible to have an option for displaying contacts only present in the address book or in local photos directory path ?
And so, no display of contacts without photos !

Regards

@AlexUkr73
Copy link
Author

@Exatice72

I think it is possible to add an opportunity for user in addon's options page to define whether to skip contacts without photo or to display selected "noname" image for them.

Screenshot_2023-10-09_20-40-06111

@Exatice72
Copy link

@AlexUkr73

So I'm going to wait for this next version !

Regards

@AlexUkr73
Copy link
Author

@Exatice72

Hi, could you check version below with option to skip contacts without photo, please?
SCF8_skip_nophoto.zip

If it is OK, i'll submit it to official addons repository.

@Exatice72
Copy link

@AlexUkr73

All seems ok !

Thanks for your job.
Regards

@AlexUkr73
Copy link
Author

AlexUkr73 commented Oct 24, 2023

Please note - version 0.8 is already approved and added to official addon repository, but has the bug:

  • photos grid does not display on new email composing

Fixed in version 0.9

SCF9_skip_bugfixes.zip

@Exatice72
Copy link

Exatice72 commented Oct 24, 2023

@AlexUkr73

Sorry, but in version 0.9, photo does not display correctly on new email composing...

compose

It is correct on sent messages.
sent

@AlexUkr73
Copy link
Author

AlexUkr73 commented Oct 25, 2023

@Exatice72

I can not reproduce your issue in version 115.1.1 on my Linux desktop.
Have you removed previous version and tried to install new from file?
What is addon's behaviour on clicking "reply" / "reply all" on any existing message ? - Are photos shown?
Could you share addon's settings page?

@Exatice72
Copy link

@AlexUkr73
Hi,

With Thunderbird 115.4.1 on my Linux desktop
Have you removed previous version and tried to install new from file? Yes
What is addon's behaviour on clicking "reply" / "reply all" on any existing message ?
Addon's behaviour on clicking "reply" /Reply or Reply all is normal and photos are shown
Could you share addon's settings page?
options

New email composing part 1
compose1

New email composing part 2
compose2

@AlexUkr73
Copy link
Author

AlexUkr73 commented Oct 25, 2023

@Exatice72

Please remove or disable SCF addon, restart TB and try to add SCF 0.10 as temporary addon (access Developer Tools -> Debug Add-ons ->Load Temporary Addon), check new email composing (also try some different from one on your screenshot contacts in "Pour" field ;o)
Screenshot_2023-10-25_20-59-52

Screenshot_2023-10-25_21-02-53

If works as expected - remove this temporary addon (or just restart TB), add it permanently (install from file) and check again.

SCF10_skip_bugfixes.zip

@Exatice72
Copy link

@AlexUkr73

Sorry, but same issue in version 0.10...

@Exatice72
Copy link

@AlexUkr73
In fact, the photo is only displayed IF a fairly long text is entered in the body of the message...

composetxt

Apologies for the inconvenience.

@AlexUkr73
Copy link
Author

@Exatice72

Thank you for response.
I tried to reproduce in different versions and settings for compose (html-only, plain text, combinations) without any success.
Several people are also tried.

Do you have any additional addon-s which can interfere in compose window (e.g. any templates, etc.)

I wonder why your issue does not reproduce for others even with blank message body?

Do you use any kind of signature for composing (which can be defined in Account settings)?

Screenshot_2023-11-07_19-31-57

I have test accounts with/without it - but issue does not reproduce..

@Exatice72
Copy link

Exatice72 commented Nov 9, 2023

@AlexUkr73
Do you have any additional addon-s which can interfere in compose window ? No
Do you use any kind of signature for composing ? No

I'll try to describe how the issue appears and... disappears.
I write a new email ; photo does not display correctly on new email composing...
I send email and I copy body text from sent folder
sent

I write a second email, photo does not display but IF
(2) I past body text from first mail and (3) enter address then photo appears !
composepast
Maybe a frustrating hidden composition parameter from Thunderbird !..

@AlexUkr73
Copy link
Author

@Exatice72

Thank you for more detailed scenario.
I will check flags related to composition in console too, may be one of them can affect.

@Exatice72
Copy link

@AlexUkr73
In fact, it's even simpler: if I copy a short text (even a single letter) from any text editor in Thunderbird compose window before entering text manually, no issue : I enter address and photo appears properly !
Amazing, isnt'it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants