Skip to content

Commit 5305a7b

Browse files
authored
chore(studio): auth email template copywriting improvements (supabase#40163)
* misc typo * improve copywriting
1 parent 4d31c85 commit 5305a7b

File tree

2 files changed

+63
-70
lines changed

2 files changed

+63
-70
lines changed

apps/studio/components/interfaces/Auth/AuthTemplatesValidation.tsx

Lines changed: 62 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { object, string } from 'yup'
21
import type { FormSchema } from 'types'
2+
import { object, string } from 'yup'
33

44
const JSON_SCHEMA_VERSION = 'http://json-schema.org/draft-07/schema#'
55

@@ -8,14 +8,14 @@ const CONFIRMATION: FormSchema = {
88
id: 'CONFIRMATION',
99
type: 'object',
1010
title: 'Confirm sign up',
11-
purpose: 'Email verification for new user registrations',
11+
purpose: 'Ask users to confirm their email address after signing up',
1212
properties: {
1313
MAILER_SUBJECTS_CONFIRMATION: {
14-
title: 'Subject heading',
14+
title: 'Subject',
1515
type: 'string',
1616
},
1717
MAILER_TEMPLATES_CONFIRMATION_CONTENT: {
18-
title: 'Message body',
18+
title: 'Body',
1919
descriptionOptional: 'HTML body of your email',
2020
type: 'code',
2121
description: `
@@ -30,7 +30,7 @@ const CONFIRMATION: FormSchema = {
3030
},
3131
},
3232
validationSchema: object().shape({
33-
MAILER_SUBJECTS_CONFIRMATION: string().required('Subject heading is required.'),
33+
MAILER_SUBJECTS_CONFIRMATION: string().required('Subject is required.'),
3434
}),
3535
misc: {
3636
emailTemplateType: 'authentication',
@@ -42,14 +42,14 @@ const INVITE: FormSchema = {
4242
id: 'INVITE',
4343
type: 'object',
4444
title: 'Invite user',
45-
purpose: "Allows administrators to invite users who don't have accounts yet",
45+
purpose: "Invite users who don't yet have an account to sign up",
4646
properties: {
4747
MAILER_SUBJECTS_INVITE: {
48-
title: 'Subject heading',
48+
title: 'Subject',
4949
type: 'string',
5050
},
5151
MAILER_TEMPLATES_INVITE_CONTENT: {
52-
title: 'Message body',
52+
title: 'Body',
5353
descriptionOptional: 'HTML body of your email',
5454
type: 'code',
5555
description: `
@@ -64,7 +64,7 @@ const INVITE: FormSchema = {
6464
},
6565
},
6666
validationSchema: object().shape({
67-
MAILER_SUBJECTS_INVITE: string().required('Subject heading is required.'),
67+
MAILER_SUBJECTS_INVITE: string().required('Subject is required.'),
6868
}),
6969
misc: {
7070
emailTemplateType: 'authentication',
@@ -76,14 +76,14 @@ const MAGIC_LINK: FormSchema = {
7676
id: 'MAGIC_LINK',
7777
type: 'object',
7878
title: 'Magic link',
79-
purpose: 'Passwordless login using email links',
79+
purpose: 'Allow users to sign in via a one-time link sent to their email',
8080
properties: {
8181
MAILER_SUBJECTS_MAGIC_LINK: {
82-
title: 'Subject heading',
82+
title: 'Subject',
8383
type: 'string',
8484
},
8585
MAILER_TEMPLATES_MAGIC_LINK_CONTENT: {
86-
title: 'Message body',
86+
title: 'Body',
8787
descriptionOptional: 'HTML body of your email',
8888
type: 'code',
8989
description: `
@@ -98,7 +98,7 @@ const MAGIC_LINK: FormSchema = {
9898
},
9999
},
100100
validationSchema: object().shape({
101-
MAILER_SUBJECTS_MAGIC_LINK: string().required('Subject heading is required.'),
101+
MAILER_SUBJECTS_MAGIC_LINK: string().required('Subject is required.'),
102102
}),
103103
misc: {
104104
emailTemplateType: 'authentication',
@@ -110,14 +110,14 @@ const EMAIL_CHANGE: FormSchema = {
110110
id: 'EMAIL_CHANGE',
111111
type: 'object',
112112
title: 'Change email address',
113-
purpose: 'Verification for email address changes',
113+
purpose: 'Ask users to verify their new email address after changing it',
114114
properties: {
115115
MAILER_SUBJECTS_EMAIL_CHANGE: {
116-
title: 'Subject heading',
116+
title: 'Subject',
117117
type: 'string',
118118
},
119119
MAILER_TEMPLATES_EMAIL_CHANGE_CONTENT: {
120-
title: 'Message body',
120+
title: 'Body',
121121
descriptionOptional: 'HTML body of your email',
122122
type: 'code',
123123
description: `
@@ -133,7 +133,7 @@ const EMAIL_CHANGE: FormSchema = {
133133
},
134134
},
135135
validationSchema: object().shape({
136-
MAILER_SUBJECTS_EMAIL_CHANGE: string().required('Subject heading is required.'),
136+
MAILER_SUBJECTS_EMAIL_CHANGE: string().required('Subject is required.'),
137137
}),
138138
misc: {
139139
emailTemplateType: 'authentication',
@@ -145,14 +145,14 @@ const RECOVERY: FormSchema = {
145145
id: 'RECOVERY',
146146
type: 'object',
147147
title: 'Reset password',
148-
purpose: 'Password recovery flow for users who forgot their password',
148+
purpose: 'Allow users to reset their password if they forget it',
149149
properties: {
150150
MAILER_SUBJECTS_RECOVERY: {
151-
title: 'Subject heading',
151+
title: 'Subject',
152152
type: 'string',
153153
},
154154
MAILER_TEMPLATES_RECOVERY_CONTENT: {
155-
title: 'Message body',
155+
title: 'Body',
156156
descriptionOptional: 'HTML body of your email',
157157
type: 'code',
158158
description: `
@@ -167,7 +167,7 @@ const RECOVERY: FormSchema = {
167167
},
168168
},
169169
validationSchema: object().shape({
170-
MAILER_SUBJECTS_RECOVERY: string().required('Subject heading is required.'),
170+
MAILER_SUBJECTS_RECOVERY: string().required('Subject is required.'),
171171
}),
172172
misc: {
173173
emailTemplateType: 'authentication',
@@ -178,15 +178,14 @@ const REAUTHENTICATION: FormSchema = {
178178
id: 'REAUTHENTICATION',
179179
type: 'object',
180180
title: 'Reauthentication',
181-
purpose:
182-
'Additional verification for sensitive actions (like changing password, deleting account)',
181+
purpose: 'Ask users to re-authenticate before performing a sensitive action',
183182
properties: {
184183
MAILER_SUBJECTS_REAUTHENTICATION: {
185-
title: 'Subject heading',
184+
title: 'Subject',
186185
type: 'string',
187186
},
188187
MAILER_TEMPLATES_REAUTHENTICATION_CONTENT: {
189-
title: 'Message body',
188+
title: 'Body',
190189
descriptionOptional: 'HTML body of your email',
191190
type: 'code',
192191
description: `
@@ -198,7 +197,7 @@ const REAUTHENTICATION: FormSchema = {
198197
},
199198
},
200199
validationSchema: object().shape({
201-
MAILER_SUBJECTS_REAUTHENTICATION: string().required('Subject heading is required.'),
200+
MAILER_SUBJECTS_REAUTHENTICATION: string().required('Subject is required.'),
202201
}),
203202
misc: {
204203
emailTemplateType: 'authentication',
@@ -210,15 +209,15 @@ const PASSWORD_CHANGED_NOTIFICATION: FormSchema = {
210209
$schema: JSON_SCHEMA_VERSION,
211210
id: 'PASSWORD_CHANGED_NOTIFICATION',
212211
type: 'object',
213-
title: 'Password changed notification',
214-
purpose: 'Notify a user when their password has been changed',
212+
title: 'Password changed',
213+
purpose: 'Notify users when their password has changed',
215214
properties: {
216215
MAILER_SUBJECTS_PASSWORD_CHANGED_NOTIFICATION: {
217-
title: 'Subject heading',
216+
title: 'Subject',
218217
type: 'string',
219218
},
220219
MAILER_TEMPLATES_PASSWORD_CHANGED_NOTIFICATION_CONTENT: {
221-
title: 'Message body',
220+
title: 'Body',
222221
descriptionOptional: 'HTML body of your email',
223222
type: 'code',
224223
description: `
@@ -228,9 +227,7 @@ const PASSWORD_CHANGED_NOTIFICATION: FormSchema = {
228227
},
229228
},
230229
validationSchema: object().shape({
231-
MAILER_SUBJECTS_PASSWORD_CHANGED_NOTIFICATION: string().required(
232-
'Subject heading is required.'
233-
),
230+
MAILER_SUBJECTS_PASSWORD_CHANGED_NOTIFICATION: string().required('Subject is required.'),
234231
}),
235232
misc: {
236233
emailTemplateType: 'security',
@@ -241,15 +238,15 @@ const EMAIL_CHANGED_NOTIFICATION: FormSchema = {
241238
$schema: JSON_SCHEMA_VERSION,
242239
id: 'EMAIL_CHANGED_NOTIFICATION',
243240
type: 'object',
244-
title: 'Email changed notification',
245-
purpose: 'Notify a user when their email address has been changed',
241+
title: 'Email address changed',
242+
purpose: 'Notify users when their email address has changed',
246243
properties: {
247244
MAILER_SUBJECTS_EMAIL_CHANGED_NOTIFICATION: {
248-
title: 'Subject heading',
245+
title: 'Subject',
249246
type: 'string',
250247
},
251248
MAILER_TEMPLATES_EMAIL_CHANGED_NOTIFICATION_CONTENT: {
252-
title: 'Message body',
249+
title: 'Body',
253250
descriptionOptional: 'HTML body of your email',
254251
type: 'code',
255252
description: `
@@ -260,7 +257,7 @@ const EMAIL_CHANGED_NOTIFICATION: FormSchema = {
260257
},
261258
},
262259
validationSchema: object().shape({
263-
MAILER_SUBJECTS_EMAIL_CHANGED_NOTIFICATION: string().required('Subject heading is required.'),
260+
MAILER_SUBJECTS_EMAIL_CHANGED_NOTIFICATION: string().required('Subject is required.'),
264261
}),
265262
misc: {
266263
emailTemplateType: 'security',
@@ -271,15 +268,15 @@ const PHONE_CHANGED_NOTIFICATION: FormSchema = {
271268
$schema: JSON_SCHEMA_VERSION,
272269
id: 'PHONE_CHANGED_NOTIFICATION',
273270
type: 'object',
274-
title: 'Phone changed notification',
275-
purpose: 'Notify a user when the phone number has been changed',
271+
title: 'Phone number changed',
272+
purpose: 'Notify users when their phone number has changed',
276273
properties: {
277274
MAILER_SUBJECTS_PHONE_CHANGED_NOTIFICATION: {
278-
title: 'Subject heading',
275+
title: 'Subject',
279276
type: 'string',
280277
},
281278
MAILER_TEMPLATES_PHONE_CHANGED_NOTIFICATION_CONTENT: {
282-
title: 'Message body',
279+
title: 'Body',
283280
descriptionOptional: 'HTML body of your email',
284281
type: 'code',
285282
description: `
@@ -291,7 +288,7 @@ const PHONE_CHANGED_NOTIFICATION: FormSchema = {
291288
},
292289
},
293290
validationSchema: object().shape({
294-
MAILER_SUBJECTS_PHONE_CHANGED_NOTIFICATION: string().required('Subject heading is required.'),
291+
MAILER_SUBJECTS_PHONE_CHANGED_NOTIFICATION: string().required('Subject is required.'),
295292
}),
296293
misc: {
297294
emailTemplateType: 'security',
@@ -302,15 +299,15 @@ const IDENTITY_LINKED_NOTIFICATION: FormSchema = {
302299
$schema: JSON_SCHEMA_VERSION,
303300
id: 'IDENTITY_LINKED_NOTIFICATION',
304301
type: 'object',
305-
title: 'Identity linked notification',
306-
purpose: 'Notify a user when a new identity has been linked to their account',
302+
title: 'Identity linked',
303+
purpose: 'Notify users when a new identity has been linked to their account',
307304
properties: {
308305
MAILER_SUBJECTS_IDENTITY_LINKED_NOTIFICATION: {
309-
title: 'Subject heading',
306+
title: 'Subject',
310307
type: 'string',
311308
},
312309
MAILER_TEMPLATES_IDENTITY_LINKED_NOTIFICATION_CONTENT: {
313-
title: 'Message body',
310+
title: 'Body',
314311
descriptionOptional: 'HTML body of your email',
315312
type: 'code',
316313
description: `
@@ -321,7 +318,7 @@ const IDENTITY_LINKED_NOTIFICATION: FormSchema = {
321318
},
322319
},
323320
validationSchema: object().shape({
324-
MAILER_SUBJECTS_IDENTITY_LINKED_NOTIFICATION: string().required('Subject heading is required.'),
321+
MAILER_SUBJECTS_IDENTITY_LINKED_NOTIFICATION: string().required('Subject is required.'),
325322
}),
326323
misc: {
327324
emailTemplateType: 'security',
@@ -332,15 +329,15 @@ const IDENTITY_UNLINKED_NOTIFICATION: FormSchema = {
332329
$schema: JSON_SCHEMA_VERSION,
333330
id: 'IDENTITY_UNLINKED_NOTIFICATION',
334331
type: 'object',
335-
title: 'Identity unlinked notification',
336-
purpose: 'Notify a user when an identity has been unlinked from their account',
332+
title: 'Identity unlinked',
333+
purpose: 'Notify users when an identity has been unlinked from their account',
337334
properties: {
338335
MAILER_SUBJECTS_IDENTITY_UNLINKED_NOTIFICATION: {
339-
title: 'Subject heading',
336+
title: 'Subject',
340337
type: 'string',
341338
},
342339
MAILER_TEMPLATES_IDENTITY_UNLINKED_NOTIFICATION_CONTENT: {
343-
title: 'Message body',
340+
title: 'Body',
344341
descriptionOptional: 'HTML body of your email',
345342
type: 'code',
346343
description: `
@@ -351,9 +348,7 @@ const IDENTITY_UNLINKED_NOTIFICATION: FormSchema = {
351348
},
352349
},
353350
validationSchema: object().shape({
354-
MAILER_SUBJECTS_IDENTITY_UNLINKED_NOTIFICATION: string().required(
355-
'Subject heading is required.'
356-
),
351+
MAILER_SUBJECTS_IDENTITY_UNLINKED_NOTIFICATION: string().required('Subject is required.'),
357352
}),
358353
misc: {
359354
emailTemplateType: 'security',
@@ -364,15 +359,16 @@ const MFA_FACTOR_ENROLLED_NOTIFICATION: FormSchema = {
364359
$schema: JSON_SCHEMA_VERSION,
365360
id: 'MFA_FACTOR_ENROLLED_NOTIFICATION',
366361
type: 'object',
367-
title: 'MFA factor enrolled notification',
368-
purpose: 'Notify a user when a new MFA factor has been enrolled for their account',
362+
title: 'Multi-factor authentication method added',
363+
purpose:
364+
'Notify users when a new multi-factor authentication method has been added to their account',
369365
properties: {
370366
MAILER_SUBJECTS_MFA_FACTOR_ENROLLED_NOTIFICATION: {
371-
title: 'Subject heading',
367+
title: 'Subject',
372368
type: 'string',
373369
},
374370
MAILER_TEMPLATES_MFA_FACTOR_ENROLLED_NOTIFICATION_CONTENT: {
375-
title: 'Message body',
371+
title: 'Body',
376372
descriptionOptional: 'HTML body of your email',
377373
type: 'code',
378374
description: `
@@ -383,9 +379,7 @@ const MFA_FACTOR_ENROLLED_NOTIFICATION: FormSchema = {
383379
},
384380
},
385381
validationSchema: object().shape({
386-
MAILER_SUBJECTS_MFA_FACTOR_ENROLLED_NOTIFICATION: string().required(
387-
'Subject heading is required.'
388-
),
382+
MAILER_SUBJECTS_MFA_FACTOR_ENROLLED_NOTIFICATION: string().required('Subject is required.'),
389383
}),
390384
misc: {
391385
emailTemplateType: 'security',
@@ -396,15 +390,16 @@ const MFA_FACTOR_UNENROLLED_NOTIFICATION: FormSchema = {
396390
$schema: JSON_SCHEMA_VERSION,
397391
id: 'MFA_FACTOR_UNENROLLED_NOTIFICATION',
398392
type: 'object',
399-
title: 'MFA factor unenrolled notification',
400-
purpose: 'Notify a user when an MFA factor has been unenrolled from their account',
393+
title: 'Multi-factor authentication method removed',
394+
purpose:
395+
'Notify users when a multi-factor authentication method has been removed from their account',
401396
properties: {
402397
MAILER_SUBJECTS_MFA_FACTOR_UNENROLLED_NOTIFICATION: {
403-
title: 'Subject heading',
398+
title: 'Subject',
404399
type: 'string',
405400
},
406401
MAILER_TEMPLATES_MFA_FACTOR_UNENROLLED_NOTIFICATION_CONTENT: {
407-
title: 'Message body',
402+
title: 'Body',
408403
descriptionOptional: 'HTML body of your email',
409404
type: 'code',
410405
description: `
@@ -415,9 +410,7 @@ const MFA_FACTOR_UNENROLLED_NOTIFICATION: FormSchema = {
415410
},
416411
},
417412
validationSchema: object().shape({
418-
MAILER_SUBJECTS_MFA_FACTOR_UNENROLLED_NOTIFICATION: string().required(
419-
'Subject heading is required.'
420-
),
413+
MAILER_SUBJECTS_MFA_FACTOR_UNENROLLED_NOTIFICATION: string().required('Subject is required.'),
421414
}),
422415
misc: {
423416
emailTemplateType: 'security',

apps/studio/pages/authorize.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ const APIAuthorizationPage: NextPageWithLayout = () => {
285285
label="Organization to grant API access to"
286286
description={
287287
organization_slug
288-
? `'This organization has been pre-selected by ${requester?.name}.`
288+
? `This organization has been pre-selected by ${requester?.name}.`
289289
: undefined
290290
}
291291
isReactForm

0 commit comments

Comments
 (0)