eladnava/mailgen

Add text links for button actions

Guergeiro opened this issue · 8 comments

As we all know, we have a mail client friend, called Outlook, that doesn't like to follow standards or always has weird behaviours. This in turn meant that buttons and their actions may sometimes not be shown (#16 can be an example).

I would propose not only trying to keep buttons being shown on outlook clients, but also provide an escape route. Normally emails come with "Can't see/click the button? Try the full link instead: example.com".

Maybe this can be a good middle ground for this problem?

Hi @Guergeiro,
Thanks for bringing this up.

I haven't seen many modern e-mails including the escape route / fallback link text in recent years, and frankly I'm more inclined to just make the action buttons work / display properly in Outlook, but do not have the time currently to work on this myself.

Do you have time to work on this? If you don't have access to a Windows machine with Outlook, there is a service called Litmus that renders e-mails in Outlook for testing / design purposes. They have a 3-day free trial which could suffice.

If you do want to work on this, please let me know and feel free to submit a PR to resolve the Outlook issues in the various theme(s) when you're ready. If not, I'm open to anyone else who can help work on this.

I haven't seen many modern e-mails including the escape route / fallback link text in recent years, and frankly I'm more inclined to just make the action buttons work / display properly in Outlook, but do not have the time currently to work on this myself.

I find this hard to believe... Loads of places still use it. Just tested with GH in a new account.
image

Now, I'm not saying this feature to be always there, but I would probably suggest this to exist behind a flag that is optional and opt-in if people want it. Something along of lines of {actionFallback: true} (default is false).

Hi @Guergeiro,
That's a great idea!

Sounds good. If you have the time to work on this, please go ahead and submit a PR. Also, if you could attempt to fix the Outlook rendering issues of action buttons in the built-in themes, that would also be greatly appreciated.

Hey @eladnava sorry for late reply. I already have a working solution, but don't know what you prefer. Keep in mind that since we can have multiple actions, this will just spit them out in order. After your confirmation I will open a PR for it 😄

Screenshot_2022-06-20_15-28-29

Screenshot_2022-06-20_15-24-31

Hi @Guergeiro,
This is great! I would opt for Option 1 if possible (including the link in the footer after the signature).

Cheers!

The only issue you got to remember is that if people opt-in into this behaviour and they have multiple actions, there will be multiple links and the only thing that can track them to the button is the text (that matches the button). Although I'd guess this is a really rare scenario.

Hi @Guergeiro,
That's absolutely fine - it's an opt-in behavior and multiple actions are very uncommon, while I do feel that the way you handle this scenario is totally legit. 👍

Closed in #68