From 6b37e9bb9ece3fec7b78b5a24bb9134855c9d365 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 2 Jun 2026 09:11:01 +0200 Subject: [PATCH] fix(email): correct member-row spacing in mentor welcome emails Member/mentor/teammate tables used width:100%, stretching the two columns apart and forcing names to wrap; wrapped names then misaligned with their email (default vertical-align: middle). Drop width:100% so tables hug content, add 16px column gap via name-cell padding, and set vertical-align: top so emails align to the first line of the name. Applied to getMentorBulkAssignmentTemplate and getTeamMentorIntroductionTemplate. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/lib/email.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/email.ts b/src/lib/email.ts index e4987f6..4520413 100644 --- a/src/lib/email.ts +++ b/src/lib/email.ts @@ -2882,8 +2882,8 @@ export function getTeamMentorIntroductionTemplate( .map( (m) => ` - ${escapeHtml(m.name ?? 'Mentor')} - ${escapeHtml(m.email)} + ${escapeHtml(m.name ?? 'Mentor')} + ${escapeHtml(m.email)} `, ) .join('') @@ -2892,12 +2892,12 @@ export function getTeamMentorIntroductionTemplate( teammates && teammates.length > 0 ? `

Your team

- ${teammates +
${teammates .map( (t) => ` - - + + `, ) .join('')}
${escapeHtml(t.name ?? 'Team member')}${escapeHtml(t.email)}${escapeHtml(t.name ?? 'Team member')}${escapeHtml(t.email)}
` @@ -2920,7 +2920,7 @@ export function getTeamMentorIntroductionTemplate( ? `The mentoring round is now open and a mentor has been assigned to your project ${escapeHtml(projectTitle)}:` : `The mentoring round is now open and ${count} mentors have been assigned to your project ${escapeHtml(projectTitle)}:`, )} - ${mentorHtmlList}
+ ${mentorHtmlList}
${teammatesHtml} ${instructionsHtml} ${ctaButton(workspaceUrl, 'Open Mentor Workspace')} @@ -3024,10 +3024,10 @@ export function getMentorBulkAssignmentTemplate( .map((p) => { const members = p.teamMembers && p.teamMembers.length > 0 - ? `${p.teamMembers + ? `
${p.teamMembers .map( (m) => - ``, + ``, ) .join('')}
${escapeHtml(m.name ?? 'Team member')}${escapeHtml(m.email)}
${escapeHtml(m.name ?? 'Team member')}${escapeHtml(m.email)}
` : ''