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

Major rework of photo handling #169

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

stephankn
Copy link
Contributor

  • fetch contact photo from contact API
  • reformat to contain fully validated html on all mail clients
  • Include freely usable default avatar, hard-coded to reduce
    external requests and optimize run-time of script
  • warning free with ESLint v7.0.0

* fetch contact photo from contact API
* reformat to contain fully validated html on all mail clients
* Include freely usable default avatar, hard-coded to reduce
  external requests and optimize run-time of script
* warning free with ESLint v7.0.0
@stephankn
Copy link
Contributor Author

fixes #162

@stephankn
Copy link
Contributor Author

I did re-format the html email to comply with standards. It is fully valid html and uses only elements which are supported on all clients. I referred to https://www.campaignmonitor.com/

I replaced the avatar image for contacts without photos with a free one to not violate copyrights of someone (google?). To reduce network requests I included it hard-coded in the source. Resolution is high enough even for retina-resolution clients.

Images are sized based on em to scale with different font sizes.

Tested with Thunderbird on desktop, K9 on mobile and GMX as webmailer.

GMX:
GoogleContactsEventNotifier_gmx

K9:
GoogleContactsEventNotifier_k9

Thunderbird:
GoogleContactsEventNotifier_thunderbird

@stephankn
Copy link
Contributor Author

@stephankn
Copy link
Contributor Author

I want to add: I did not fully understand what is left to merge as there are no Google+ profiles any more. In my setup all contacts having photos show up properly. Potentially the merging needs to be adjusted a bit around the default contact picture.

@GioBonvi
Copy link
Owner

Hello @stephankn: thank you for your contribution and I am really sorry for letting you wait.
Lots of people have requested a better support for profile images of the various contacts, but it looks like Google is making this quite hard...

I've rapidly tested your implementation and with my contacts it does not look like it resulted in more photos being shown than before, however while reasearching for other methods to fetch a contact profile photo I found out that the API you used will be deprecated in less than a year.

I do not think deploying this change only to take it back in less than a year would be worth it especially due to the slow update cycle of this project.

I'll consider in the next days merging the other part (regarding the restyling of the HTML code) which I must say looks quite nice.

Thank you again

@GioBonvi GioBonvi added the enhancement Improvements to existing bits of code. label Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing bits of code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants