Skip to content

Commit 8329ce9

Browse files
eliotlimkevin9foongscottheng96KenLSMdependabot[bot]
authored
build: release v6.274.0 (#8923)
* Merge pull request #8921 from opengovsg/feat/noindex-on-router feat(robots): add noindex on page router to avoid reliance on thirdparty * fix(deps): bump node-forge from 1.3.1 to 1.3.2 (#8922) Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.2. - [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md) - [Commits](digitalbazaar/forge@v1.3.1...v1.3.2) --- updated-dependencies: - dependency-name: node-forge dependency-version: 1.3.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: hidden signature field blocks submission (#8919) unregister signature field when unomunting to prevent submission block when field is hidden * chore: bump version to v6.274.0 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Kevin Foong <[email protected]> Co-authored-by: scottheng96 <[email protected]> Co-authored-by: scottheng96 <[email protected]> Co-authored-by: Ken Lee Shu Ming <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 parents 5e1eab9 + 550976c commit 8329ce9

File tree

7 files changed

+37
-13
lines changed

7 files changed

+37
-13
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@ 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.274.0](https://github.com/opengovsg/FormSG/compare/v6.273.0...v6.274.0)
8+
9+
- fix: hidden signature field blocks submission [`#8919`](https://github.com/opengovsg/FormSG/pull/8919)
10+
- fix(deps): bump node-forge from 1.3.1 to 1.3.2 [`#8922`](https://github.com/opengovsg/FormSG/pull/8922)
11+
- feat(robots): add noindex on page router to avoid reliance on thirdparty [`#8921`](https://github.com/opengovsg/FormSG/pull/8921)
12+
- build: merge v6.273.0 back to develop [`#8920`](https://github.com/opengovsg/FormSG/pull/8920)
13+
- build: release v6.273.0 [`#8917`](https://github.com/opengovsg/FormSG/pull/8917)
14+
715
#### [v6.273.0](https://github.com/opengovsg/FormSG/compare/v6.272.0...v6.273.0)
816

17+
> 25 November 2025
18+
919
- fix: myinfo children missing prefix [`#8916`](https://github.com/opengovsg/FormSG/pull/8916)
1020
- chore: modify respondent copy helper text v1 [`#8915`](https://github.com/opengovsg/FormSG/pull/8915)
1121
- fix(deps): bump libphonenumber-js from 1.12.26 to 1.12.29 in /shared [`#8913`](https://github.com/opengovsg/FormSG/pull/8913)
@@ -14,6 +24,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1424
- build(deps): bump glob in /react-email-preview [`#8906`](https://github.com/opengovsg/FormSG/pull/8906)
1525
- build: merge release-al2 v6.272.0 back to develop [`#8911`](https://github.com/opengovsg/FormSG/pull/8911)
1626
- build: release v6.272.0 [`#8909`](https://github.com/opengovsg/FormSG/pull/8909)
27+
- chore: bump version to v6.273.0 [`3e70091`](https://github.com/opengovsg/FormSG/commit/3e70091e51a9a9d079e4f1c37c3f3dce2527e355)
1728

1829
#### [v6.272.0](https://github.com/opengovsg/FormSG/compare/v6.271.0...v6.272.0)
1930

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.273.0",
3+
"version": "6.274.0",
44
"homepage": ".",
55
"type": "module",
66
"private": true,

frontend/src/app/AppRouter.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Suspense, useEffect } from 'react'
2+
import { Helmet } from 'react-helmet-async'
23
import { Route, Routes } from 'react-router-dom'
34
import { Box } from '@chakra-ui/react'
45
import { useGrowthBook } from '@growthbook/growthbook-react'
@@ -165,9 +166,14 @@ export const AppRouter = (): JSX.Element => {
165166
<Route
166167
path={EDIT_SUBMISSION_PAGE_SUBROUTE}
167168
element={
168-
<ParamIdValidator
169-
element={<PublicElement element={<PublicFormPage />} />}
170-
/>
169+
<>
170+
<Helmet>
171+
<meta name="robots" content="noindex,nofollow" />
172+
</Helmet>
173+
<ParamIdValidator
174+
element={<PublicElement element={<PublicFormPage />} />}
175+
/>
176+
</>
171177
}
172178
/>
173179
<Route

frontend/src/templates/Field/Signature/SignatureField.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const SignatureField = ({
3232
isHighContrast,
3333
}: SignatureFieldProps): JSX.Element => {
3434
const formContext = useFormContext<SignatureFieldInput>()
35-
const { getValues, setValue } = formContext
35+
const { register, unregister, setValue } = formContext
3636
const { isSubmitting, isValid, errors } = useFormState<SignatureFieldInput>()
3737
const [showSignaturePlaceholder, setShowSignaturePlaceholder] = useState(true)
3838

@@ -55,8 +55,13 @@ export const SignatureField = ({
5555
)
5656

5757
useEffect(() => {
58-
formContext.register(schema._id, signatureValidationRules)
59-
}, [formContext, schema._id, signatureValidationRules])
58+
register(schema._id, signatureValidationRules)
59+
60+
// when unmounting, unregister the field so that submission will not be blocked by signature validation errors
61+
return () => {
62+
unregister(schema._id)
63+
}
64+
}, [register, schema._id, signatureValidationRules, unregister])
6065

6166
// perfect freehand variables
6267
const pfCanvasRef = useRef<HTMLCanvasElement>(null)

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "FormSG",
33
"description": "Form Manager for Government",
4-
"version": "6.273.0",
4+
"version": "6.274.0",
55
"homepage": "https://form.gov.sg",
66
"authors": [
77
"FormSG <[email protected]>"

0 commit comments

Comments
 (0)