mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-08 03:57:30 +02:00
Improve usability of email subject lines (#466)
* Update email subject * Update email templates and subject lines
This commit is contained in:
parent
586c33095f
commit
3c55142020
6 changed files with 15 additions and 8 deletions
|
@ -154,7 +154,7 @@ export const legacyPolls = createRouter()
|
||||||
await sendEmailTemplate({
|
await sendEmailTemplate({
|
||||||
templateString: newVerfiedPollTemplate,
|
templateString: newVerfiedPollTemplate,
|
||||||
to: input.user.email,
|
to: input.user.email,
|
||||||
subject: `Rallly: ${poll.title}`,
|
subject: `Your poll for ${poll.title} has been created`,
|
||||||
templateVars: {
|
templateVars: {
|
||||||
title: poll.title,
|
title: poll.title,
|
||||||
name: input.user.name,
|
name: input.user.name,
|
||||||
|
@ -172,7 +172,7 @@ export const legacyPolls = createRouter()
|
||||||
await sendEmailTemplate({
|
await sendEmailTemplate({
|
||||||
templateString: newPollTemplate,
|
templateString: newPollTemplate,
|
||||||
to: input.user.email,
|
to: input.user.email,
|
||||||
subject: `Rallly: ${poll.title} - Verify your email address`,
|
subject: `Your poll for ${poll.title} has been created`,
|
||||||
templateVars: {
|
templateVars: {
|
||||||
title: poll.title,
|
title: poll.title,
|
||||||
name: input.user.name,
|
name: input.user.name,
|
||||||
|
|
|
@ -86,7 +86,7 @@ export const verification = createRouter()
|
||||||
await sendEmailTemplate({
|
await sendEmailTemplate({
|
||||||
templateString: newPollTemplate,
|
templateString: newPollTemplate,
|
||||||
to: poll.user.email,
|
to: poll.user.email,
|
||||||
subject: `Rallly: ${poll.title} - Verify your email address`,
|
subject: "Please verify your email address",
|
||||||
templateVars: {
|
templateVars: {
|
||||||
title: poll.title,
|
title: poll.title,
|
||||||
name: poll.user.name,
|
name: poll.user.name,
|
||||||
|
|
|
@ -49,7 +49,7 @@ export const sendNotification = async (
|
||||||
await sendEmailTemplate({
|
await sendEmailTemplate({
|
||||||
templateString: newParticipantTemplate,
|
templateString: newParticipantTemplate,
|
||||||
to: poll.user.email,
|
to: poll.user.email,
|
||||||
subject: `Rallly: ${poll.title} - New Participant`,
|
subject: `${action.participantName} has shared their availability for ${poll.title}`,
|
||||||
templateVars: {
|
templateVars: {
|
||||||
title: poll.title,
|
title: poll.title,
|
||||||
name: poll.authorName,
|
name: poll.authorName,
|
||||||
|
@ -65,7 +65,7 @@ export const sendNotification = async (
|
||||||
await sendEmailTemplate({
|
await sendEmailTemplate({
|
||||||
templateString: newCommentTemplate,
|
templateString: newCommentTemplate,
|
||||||
to: poll.user.email,
|
to: poll.user.email,
|
||||||
subject: `Rallly: ${poll.title} - New Comment`,
|
subject: `${action.authorName} has commented on ${poll.title}`,
|
||||||
templateVars: {
|
templateVars: {
|
||||||
title: poll.title,
|
title: poll.title,
|
||||||
name: poll.authorName,
|
name: poll.authorName,
|
||||||
|
|
|
@ -104,6 +104,14 @@ const template = `<!DOCTYPE html>
|
||||||
</span> <!--[if mso]><i style="letter-spacing: 27px; mso-font-width: -100%;"> </i><![endif]-->
|
</span> <!--[if mso]><i style="letter-spacing: 27px; mso-font-width: -100%;"> </i><![endif]-->
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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">
|
<table style="width: 100%;" cellpadding="0" cellspacing="0" role="presentation">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-top: 32px; padding-bottom: 32px;">
|
<td style="padding-top: 32px; padding-bottom: 32px;">
|
||||||
|
|
|
@ -106,8 +106,7 @@ const template = `<!DOCTYPE html>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<p style="margin-bottom: 8px;">
|
<p style="margin-bottom: 8px;">
|
||||||
In case you lose it, here's a link to your poll for the
|
You can use the <em>admin link</em> below to manage your poll.
|
||||||
future 😉
|
|
||||||
</p>
|
</p>
|
||||||
<p style="font-weight: 500;">
|
<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;">
|
<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;">
|
||||||
|
|
|
@ -61,7 +61,7 @@ test.describe.serial(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(email.headers.subject).toBe(
|
expect(email.headers.subject).toBe(
|
||||||
"Rallly: Monthly Meetup - Verify your email address",
|
"Your poll for Monthly Meetup has been created",
|
||||||
);
|
);
|
||||||
|
|
||||||
const $ = load(email.html);
|
const $ = load(email.html);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue