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

Update Email Templates to new White Label Style #20390

Merged
merged 10 commits into from
Nov 16, 2023

Conversation

AlexGaillard
Copy link
Member

Scope

What's changed:

  • The existing email templates in ./api/src/services/mail/templates have been replaced with new html and css to update them to the same look used on Directus Cloud.
  • The default projectColor passed to the liquid parser has been changed from #546e7a to #171717 to match the Cloud email branding
  • The only content that has been changed is the footer conditional in base.liquid that renders the link Manage Your Account which has been changed to instead render a link to the projectUrl prop rather than the 'url' prop.

Potential Risks / Drawbacks

  • I've tested the template across Gmail, Thunderbird, Outlook, and Apple Mail and it looks good throughout, with the exception of Gmail on mobile in dark mode where we get the following issue with the png logo being reversed out in color. This issue does not exist with the Cloud email template as the entire square is a png, whereas here just the rabbit is a png and the square is a styled img. The reason it has to be this way is so that the logo can be easily replaced inside that same shape and the color behind the rabbit/logo changed based on the projectColor.

image

Review Notes / Questions

  • NA

Fixes #20389

Copy link

changeset-bot bot commented Nov 10, 2023

🦋 Changeset detected

Latest commit: 320e8c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@directus/api Minor
directus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@AlexGaillard
Copy link
Member Author

For reference here is an image of the email template

image

Copy link
Member

@paescuj paescuj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ❤️

  • I've tested the template across Gmail, Thunderbird, Outlook, and Apple Mail and it looks good throughout, with the exception of Gmail on mobile in dark mode where we get the following issue with the png logo being reversed out in color. This issue does not exist with the Cloud email template as the entire square is a png, whereas here just the rabbit is a png and the square is a styled img. The reason it has to be this way is so that the logo can be easily replaced inside that same shape and the color behind the rabbit/logo changed based on the projectColor.

I think this is an acceptable trade-off, the logo is still visible to some extend. Others seem to struggle with this problem too 1 and I'm not really sure if there's a good solution so far.

Footnotes

  1. https://github.com/hteumeuleu/email-bugs/issues/68

@paescuj
Copy link
Member

paescuj commented Nov 16, 2023

Thank you @AlexGaillard ❣️❣️❣️

@paescuj paescuj enabled auto-merge (squash) November 16, 2023 14:56
@paescuj paescuj merged commit 3b8d852 into directus:main Nov 16, 2023
4 checks passed
@github-actions github-actions bot added this to the Next Release milestone Nov 16, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update Email Templates
2 participants