Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
Improve usability of email subject lines (#466)
Luke Vella3c55142020ea
diff --git a/src/server/routers/polls.ts b/src/server/routers/polls.tsindex 338ebe58a..0908481bc 100644--- a/src/server/routers/polls.ts+++ b/src/server/routers/polls.ts@@ -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,diff --git a/src/server/routers/polls/verification.ts b/src/server/routers/polls/verification.tsindex a39bbd376..636eebeb8 100644--- a/src/server/routers/polls/verification.ts+++ b/src/server/routers/polls/verification.ts@@ -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,diff --git a/src/utils/api-utils.ts b/src/utils/api-utils.tsindex 16802b315..632b691fd 100644--- a/src/utils/api-utils.ts+++ b/src/utils/api-utils.ts@@ -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,diff --git a/templates/new-poll-verified.ts b/templates/new-poll-verified.tsindex 6279da797..459459045 100644--- a/templates/new-poll-verified.ts+++ b/templates/new-poll-verified.ts@@ -104,6 +104,14 @@ const template = `<!DOCTYPE html></span> <!--[if mso]><i style="letter-spacing: 27px; mso-font-width: -100%;"> </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;">diff --git a/templates/new-poll.ts b/templates/new-poll.tsindex cc5bec809..07d609ad7 100644--- a/templates/new-poll.ts+++ b/templates/new-poll.ts@@ -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;">diff --git a/tests/create-delete-poll.spec.ts b/tests/create-delete-poll.spec.tsindex aeab2b6c4..e82b40ffa 100644--- a/tests/create-delete-poll.spec.ts+++ b/tests/create-delete-poll.spec.ts@@ -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);