Skip to content

Commit 2806fb1

Browse files
authored
Merge pull request #8905 from opengovsg/release_v6.271.0
build: release v6.271.0
2 parents f0242fb + 43fb858 commit 2806fb1

File tree

16 files changed

+172
-96
lines changed

16 files changed

+172
-96
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
#### [v6.271.0](https://github.com/opengovsg/FormSG/compare/v6.270.0...v6.271.0)
8+
9+
- feat: respondent copy v3 (phase 1) [`#8854`](https://github.com/opengovsg/FormSG/pull/8854)
10+
- fix: remove noisy chromatic diffs due to dynamic dates and form link [`#8903`](https://github.com/opengovsg/FormSG/pull/8903)
11+
- build: release al2 6.270.0 back to develop [`#8904`](https://github.com/opengovsg/FormSG/pull/8904)
12+
- build: release v6.270.0 [`#8902`](https://github.com/opengovsg/FormSG/pull/8902)
13+
714
#### [v6.270.0](https://github.com/opengovsg/FormSG/compare/v6.269.0...v6.270.0)
815

16+
> 14 November 2025
17+
918
- feat: remove un-neeeded dd tracing and browser installation in the setup [`#8901`](https://github.com/opengovsg/FormSG/pull/8901)
1019
- feat: remove signature beta label [`#8898`](https://github.com/opengovsg/FormSG/pull/8898)
1120
- feat: enable save draft instrumentation basic again [`#8899`](https://github.com/opengovsg/FormSG/pull/8899)
1221
- fix(copy): fixed copy for toast message on form open [`#8900`](https://github.com/opengovsg/FormSG/pull/8900)
1322
- build: merge v6.269.0 back to develop [`#8897`](https://github.com/opengovsg/FormSG/pull/8897)
1423
- build: release v6.269.0 [`#8896`](https://github.com/opengovsg/FormSG/pull/8896)
24+
- chore: bump version to v6.270.0 [`f2df60b`](https://github.com/opengovsg/FormSG/commit/f2df60b99a67cc54c8abaeb8c824a339a85934aa)
1525

1626
#### [v6.269.0](https://github.com/opengovsg/FormSG/compare/v6.268.1...v6.269.0)
1727

frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "form-frontend",
3-
"version": "6.270.0",
3+
"version": "6.271.0",
44
"homepage": ".",
55
"type": "module",
66
"private": true,

frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditEmail/EditEmail.tsx

Lines changed: 70 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
145145
form?.responseMode === FormResponseMode.Email || isPaymentDisabledForm
146146

147147
const pdfResponseToggleDescription = isPdfResponseEnabled
148-
? undefined
148+
? t(
149+
'features.adminForm.sidebar.fields.email.emailConfirmation.includeResponseDescription',
150+
)
149151
: t(
150152
'features.adminForm.sidebar.fields.email.emailConfirmation.includePdfResponseWarning',
151153
)
@@ -185,52 +187,6 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
185187
)}
186188
/>
187189
</FormControl>
188-
<FormControl isReadOnly={isLoading}>
189-
<Toggle
190-
{...register('isVerifiable')}
191-
label={t(
192-
'features.adminForm.sidebar.fields.email.otpVerification.title',
193-
)}
194-
description={t(
195-
'features.adminForm.sidebar.fields.email.otpVerification.description',
196-
)}
197-
/>
198-
</FormControl>
199-
<Box>
200-
<FormControl isReadOnly={isLoading}>
201-
<Toggle
202-
{...allowedEmailDomainsRegister}
203-
ref={mergedAllowedEmailDomainsRef}
204-
label={t(
205-
'features.adminForm.sidebar.fields.email.restrictEmailDomains.title',
206-
)}
207-
/>
208-
</FormControl>
209-
{watchedHasAllowedEmailDomains && (
210-
<FormControl
211-
isReadOnly={isLoading}
212-
isRequired
213-
isInvalid={!!errors.allowedEmailDomains}
214-
mt="1.5rem"
215-
>
216-
<FormLabel>
217-
{t(
218-
'features.adminForm.sidebar.fields.email.restrictEmailDomains.inputLabel',
219-
)}
220-
</FormLabel>
221-
<Textarea
222-
autoFocus
223-
{...register('allowedEmailDomains', emailDomainsValidation)}
224-
placeholder={t(
225-
'features.adminForm.sidebar.fields.email.restrictEmailDomains.placeholder',
226-
)}
227-
/>
228-
<FormErrorMessage>
229-
{errors?.allowedEmailDomains?.message}
230-
</FormErrorMessage>
231-
</FormControl>
232-
)}
233-
</Box>
234190
<Box>
235191
<FormControl
236192
isReadOnly={isLoading}
@@ -248,13 +204,25 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
248204
</FormControl>
249205
{watchedHasAutoReply && (
250206
<>
207+
<FormControl isReadOnly={isLoading} mt="1.5rem">
208+
<Toggle
209+
{...register('autoReplyOptions.includeFormSummary')}
210+
label={t(
211+
'features.adminForm.sidebar.fields.email.emailConfirmation.includeResponse',
212+
)}
213+
description={pdfResponseToggleDescription}
214+
isDisabled={!isPdfResponseEnabled}
215+
/>
216+
</FormControl>
251217
<FormControl isRequired isReadOnly={isLoading} mt="1.5rem">
252218
<FormLabel>Subject</FormLabel>
253219
<Input
254220
autoFocus
255221
placeholder={t(
256222
'features.adminForm.sidebar.fields.email.emailConfirmation.subject.placeholder',
223+
{ formTitle: form?.title },
257224
)}
225+
_placeholder={{ color: 'secondary.700' }}
258226
{...register('autoReplyOptions.autoReplySubject')}
259227
/>
260228
</FormControl>
@@ -265,9 +233,8 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
265233
)}
266234
</FormLabel>
267235
<Input
268-
placeholder={t(
269-
'features.adminForm.sidebar.fields.email.emailConfirmation.senderName.placeholder',
270-
)}
236+
placeholder={form?.admin.agency.fullName}
237+
_placeholder={{ color: 'secondary.700' }}
271238
{...register('autoReplyOptions.autoReplySender')}
272239
/>
273240
</FormControl>
@@ -280,23 +247,66 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
280247
<Textarea
281248
placeholder={t(
282249
'features.adminForm.sidebar.fields.email.emailConfirmation.content.placeholder',
250+
{ agencyName: form?.admin.agency.fullName },
283251
)}
252+
sx={{
253+
'::placeholder': {
254+
color: 'secondary.700',
255+
opacity: 1,
256+
},
257+
}}
284258
{...register('autoReplyOptions.autoReplyMessage')}
285259
/>
286260
</FormControl>
287-
<FormControl isReadOnly={isLoading} mt="1.5rem">
288-
<Toggle
289-
{...register('autoReplyOptions.includeFormSummary')}
290-
label={t(
291-
'features.adminForm.sidebar.fields.email.emailConfirmation.includePdfResponse',
292-
)}
293-
description={pdfResponseToggleDescription}
294-
isDisabled={!isPdfResponseEnabled}
295-
/>
296-
</FormControl>
297261
</>
298262
)}
299263
</Box>
264+
<FormControl isReadOnly={isLoading}>
265+
<Toggle
266+
{...register('isVerifiable')}
267+
label={t(
268+
'features.adminForm.sidebar.fields.email.otpVerification.title',
269+
)}
270+
description={t(
271+
'features.adminForm.sidebar.fields.email.otpVerification.description',
272+
)}
273+
/>
274+
</FormControl>
275+
<Box>
276+
<FormControl isReadOnly={isLoading}>
277+
<Toggle
278+
{...allowedEmailDomainsRegister}
279+
ref={mergedAllowedEmailDomainsRef}
280+
label={t(
281+
'features.adminForm.sidebar.fields.email.restrictEmailDomains.title',
282+
)}
283+
/>
284+
</FormControl>
285+
{watchedHasAllowedEmailDomains && (
286+
<FormControl
287+
isReadOnly={isLoading}
288+
isRequired
289+
isInvalid={!!errors.allowedEmailDomains}
290+
mt="1.5rem"
291+
>
292+
<FormLabel>
293+
{t(
294+
'features.adminForm.sidebar.fields.email.restrictEmailDomains.inputLabel',
295+
)}
296+
</FormLabel>
297+
<Textarea
298+
autoFocus
299+
{...register('allowedEmailDomains', emailDomainsValidation)}
300+
placeholder={t(
301+
'features.adminForm.sidebar.fields.email.restrictEmailDomains.placeholder',
302+
)}
303+
/>
304+
<FormErrorMessage>
305+
{errors?.allowedEmailDomains?.message}
306+
</FormErrorMessage>
307+
</FormControl>
308+
)}
309+
</Box>
300310
<FormFieldDrawerActions
301311
isLoading={isLoading}
302312
buttonText={buttonText}

frontend/src/features/admin-form/responses/IndividualResponsePage/PrintableResponse.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ const PrintableResponseRows = ({
181181
)
182182
}
183183

184+
const isTest = import.meta.env.STORYBOOK_NODE_ENV === 'test'
185+
const MOCK_CONSTANT_FORM_LINK = 'https://form.gov.sg/64e2f7ae841cbe0012e785e7'
186+
184187
export const PrintableResponse = ({
185188
formTitle,
186189
formId,
@@ -210,9 +213,11 @@ export const PrintableResponse = ({
210213
color="white"
211214
textDecor="underline"
212215
textDecorationColor="white"
213-
data-chromatic="ignore"
214216
>
215-
{window.location.origin}/{formId}
217+
{/* RATIONALE: Prevent noisy diffs from being detected during storybook snapshot comparisons due to dynamic form link. */}
218+
{isTest
219+
? MOCK_CONSTANT_FORM_LINK
220+
: `${window.location.origin}/${formId}`}
216221
</Text>
217222
</Box>
218223
<Box mx="5%" my="30px">

frontend/src/features/public-form/PublicFormProvider.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ interface PublicFormProviderProps {
106106
isPublicFormPage?: boolean
107107
}
108108

109+
const DATE_TIME_FORMAT_STRING = 'do MMM yyyy, h:mm:ss a'
110+
const MOCK_CONSTANT_LAST_SAVED_DATETIME = '2025-11-14T12:00:00.000Z'
111+
109112
export function useCommonFormProvider(formId: string) {
110113
// For mobile section sidebar
111114
const {
@@ -1388,6 +1391,16 @@ export const PublicFormProvider = ({
13881391
return <NotFoundErrorPage />
13891392
}
13901393

1394+
// RATIONALE: Prevent noisy diffs from being detected during storybook snapshot comparisons due to dynamic date time.
1395+
const draftLastSavedDateTime =
1396+
draftSubmission?.lastUpdated && isTest
1397+
? MOCK_CONSTANT_LAST_SAVED_DATETIME
1398+
: draftSubmission?.lastUpdated
1399+
1400+
const draftLastSavedDateTimeString = draftLastSavedDateTime
1401+
? format(new Date(draftLastSavedDateTime), DATE_TIME_FORMAT_STRING)
1402+
: undefined
1403+
13911404
return (
13921405
<PublicFormContext.Provider
13931406
value={{
@@ -1412,12 +1425,7 @@ export const PublicFormProvider = ({
14121425
previousAttachments,
14131426
setPreviousSubmission,
14141427
isSaveDraftEnabled,
1415-
draftLastSavedDateTimeString: draftSubmission?.lastUpdated
1416-
? format(
1417-
new Date(draftSubmission.lastUpdated),
1418-
'do MMM yyyy, h:mm:ss a',
1419-
)
1420-
: undefined,
1428+
draftLastSavedDateTimeString,
14211429
onSaveDraft,
14221430
defaultFormValues,
14231431
augmentedFormFields,

frontend/src/i18n/locales/features/admin-form/sidebar/fields/en-sg.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,22 @@ export const enSG: Fields = {
7878
description: 'Customise an email acknowledgement to respondents',
7979
subject: {
8080
title: 'Subject',
81-
placeholder: 'Default email subject',
81+
placeholder: 'Thank you for submitting {formTitle}',
8282
},
8383
senderName: {
8484
title: 'Sender name',
8585
placeholder: 'Default sender name is your agency name',
8686
},
8787
content: {
8888
title: 'Content',
89-
placeholder: 'Default email body',
89+
placeholder:
90+
'To whom it may concern,\n\nThank you for submitting this form.\n\nRegards,\n{agencyName}',
9091
},
91-
includePdfResponse: 'Include PDF response',
92+
includeResponse: 'Include a copy of their responses',
9293
includePdfResponseWarning:
9394
'PDF responses are not available for payment forms.',
95+
includeResponseDescription:
96+
'Responses are included in the email and as a PDF attachment',
9497
},
9598
},
9699
mobileNo: {

frontend/src/i18n/locales/features/admin-form/sidebar/fields/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ export interface Fields {
8787
title: string
8888
placeholder: string
8989
}
90-
includePdfResponse: string
90+
includeResponse: string
9191
includePdfResponseWarning: string
92+
includeResponseDescription: string
9293
}
9394
}
9495
mobileNo: {

frontend/src/i18n/locales/features/public-form/fields/en-sg.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export const enSG: Fields = {
3939
domainDisallowed:
4040
'The entered email does not belong to an allowed email domain',
4141
},
42+
respondentCopyHelperText:
43+
'A copy of your responses will be sent to this email address',
4244
},
4345
verification: {
4446
button: {

frontend/src/i18n/locales/features/public-form/fields/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface Fields {
1414
validation: {
1515
domainDisallowed: string
1616
}
17+
respondentCopyHelperText: string
1718
}
1819
attachment: {
1920
disabled: string

0 commit comments

Comments
 (0)