Improve usability of email subject lines (#466)

* Update email subject

* Update email templates and subject lines
This commit is contained in:
Luke Vella 2023-02-01 18:19:12 +00:00 committed by GitHub
parent 586c33095f
commit 3c55142020
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 8 deletions

View file

@ -154,7 +154,7 @@ export const legacyPolls = createRouter()
await sendEmailTemplate({
templateString: newVerfiedPollTemplate,
to: input.user.email,
subject: `Rallly: ${poll.title}`,
subject: `Your poll for ${poll.title} has been created`,
templateVars: {
title: poll.title,
name: input.user.name,
@ -172,7 +172,7 @@ export const legacyPolls = createRouter()
await sendEmailTemplate({
templateString: newPollTemplate,
to: input.user.email,
subject: `Rallly: ${poll.title} - Verify your email address`,
subject: `Your poll for ${poll.title} has been created`,
templateVars: {
title: poll.title,
name: input.user.name,

View file

@ -86,7 +86,7 @@ export const verification = createRouter()
await sendEmailTemplate({
templateString: newPollTemplate,
to: poll.user.email,
subject: `Rallly: ${poll.title} - Verify your email address`,
subject: "Please verify your email address",
templateVars: {
title: poll.title,
name: poll.user.name,

View file

@ -49,7 +49,7 @@ export const sendNotification = async (
await sendEmailTemplate({
templateString: newParticipantTemplate,
to: poll.user.email,
subject: `Rallly: ${poll.title} - New Participant`,
subject: `${action.participantName} has shared their availability for ${poll.title}`,
templateVars: {
title: poll.title,
name: poll.authorName,
@ -65,7 +65,7 @@ export const sendNotification = async (
await sendEmailTemplate({
templateString: newCommentTemplate,
to: poll.user.email,
subject: `Rallly: ${poll.title} - New Comment`,
subject: `${action.authorName} has commented on ${poll.title}`,
templateVars: {
title: poll.title,
name: poll.authorName,

View file

@ -104,6 +104,14 @@ const template = `<!DOCTYPE html>
</span> <!--[if mso]><i style="letter-spacing: 27px; mso-font-width: -100%;">&nbsp;</i><![endif]-->
</a>
</div>
<p style="margin-bottom: 8px;">
You can use the <em>admin link</em> below to manage your poll.
</p>
<p style="font-weight: 500;">
<a id="pollUrl" href="<%= it.pollUrl %>" style="display: inline-block; background-color: #eef2ff; padding: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; color: #6366f1; text-decoration: none;">
<%= it.pollUrl %>
</a>
</p>
<table style="width: 100%;" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td style="padding-top: 32px; padding-bottom: 32px;">

View file

@ -106,8 +106,7 @@ const template = `<!DOCTYPE html>
</a>
</div>
<p style="margin-bottom: 8px;">
In case you lose it, here's a link to your poll for the
future 😉
You can use the <em>admin link</em> below to manage your poll.
</p>
<p style="font-weight: 500;">
<a id="pollUrl" href="<%= it.pollUrl %>" style="display: inline-block; background-color: #eef2ff; padding: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; color: #6366f1; text-decoration: none;">

View file

@ -61,7 +61,7 @@ test.describe.serial(() => {
});
expect(email.headers.subject).toBe(
"Rallly: Monthly Meetup - Verify your email address",
"Your poll for Monthly Meetup has been created",
);
const $ = load(email.html);