Skip to content

Commit

Permalink
build: merge release v6.151.2 to develop (#7770)
Browse files Browse the repository at this point in the history
* chore: bump version to v6.151.0

* fix(mrf): prevent infinite loop on r2 (#7761)

fix: separate toast from useeffect

* chore: bump version to 6.151.1

* fix(DateRangePicker): react migration date range gap (#7763)

fix: width not respected on chakra v2 input

* chore: bump version to 6.151.2
  • Loading branch information
KenLSM authored Oct 14, 2024
1 parent ab06e27 commit c2001c8
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 21 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,40 @@ All notable changes to this project will be documented in this file. Dates are d

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

#### [v6.151.2](https://github.com/opengovsg/FormSG/compare/v6.151.1...v6.151.2)

- fix(DateRangePicker): react migration date range gap [`#7763`](https://github.com/opengovsg/FormSG/pull/7763)
- build: release v6.151.1 [`#7762`](https://github.com/opengovsg/FormSG/pull/7762)

#### [v6.151.1](https://github.com/opengovsg/FormSG/compare/v6.151.0...v6.151.1)

> 9 October 2024

- fix(mrf): prevent infinite loop on r2 [`#7761`](https://github.com/opengovsg/FormSG/pull/7761)
- build: release v6.151.0 [`#7750`](https://github.com/opengovsg/FormSG/pull/7750)
- chore: bump version to 6.151.1 [`de31127`](https://github.com/opengovsg/FormSG/commit/de31127c4c94d1e9b7e8ac16d74e7d254fef3464)

#### [v6.151.0](https://github.com/opengovsg/FormSG/compare/v6.150.1...v6.151.0)

> 8 October 2024

- fix: regression on dropdown input, workflow save action step component [`#7754`](https://github.com/opengovsg/FormSG/pull/7754)
- build: merge release v6.150.1 to develop [`#7753`](https://github.com/opengovsg/FormSG/pull/7753)
- chore: bump version to v6.150.1 [`#7752`](https://github.com/opengovsg/FormSG/pull/7752)
- build: merge release v6.150.0 to develop [`#7748`](https://github.com/opengovsg/FormSG/pull/7748)
- feat: migrate from CRA4 to Vite, Storybook to v8, jest to Vitest [`#7285`](https://github.com/opengovsg/FormSG/pull/7285)
- chore(deps-dev): bump @types/lodash from 4.17.9 to 4.17.10 in /shared [`#7744`](https://github.com/opengovsg/FormSG/pull/7744)
- fix(deps): bump libphonenumber-js from 1.11.10 to 1.11.11 in /shared [`#7746`](https://github.com/opengovsg/FormSG/pull/7746)
- fix(deps): bump libphonenumber-js from 1.11.9 to 1.11.10 in /shared [`#7743`](https://github.com/opengovsg/FormSG/pull/7743)
- chore: bump version to v6.151.0 [`8b5bdc6`](https://github.com/opengovsg/FormSG/commit/8b5bdc618845fce5eb9e25b674b5ec161a6ceaf9)

#### [v6.150.1](https://github.com/opengovsg/FormSG/compare/v6.150.0...v6.150.1)

> 7 October 2024

- fix: radio button saving others despite not selected [`#7751`](https://github.com/opengovsg/FormSG/pull/7751)
- build: release v6.150.0 [`#7741`](https://github.com/opengovsg/FormSG/pull/7741)
- chore: bump version to 6.150.1 [`f52a92e`](https://github.com/opengovsg/FormSG/commit/f52a92e39513f6d8477af7595d42ba8a069a8a7c)

#### [v6.150.0](https://github.com/opengovsg/FormSG/compare/v6.149.3...v6.150.0)

Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-frontend",
"version": "6.150.1",
"version": "6.151.2",
"homepage": ".",
"type": "module",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ export const DateRangePickerInput = forwardRef<{}, 'input'>((_props, ref) => {
aria-label="Start date of range"
inputMode="numeric" // Nudge Android mobile keyboard to be numeric
pattern="\d*" // Nudge numeric keyboard on iOS Safari.
sx={styles.field}
width="6rem"
sx={{ ...styles.field, width: '6rem' }}
as={ReactInputMask}
mask="99/99/9999"
value={startInputDisplay}
Expand All @@ -87,8 +86,7 @@ export const DateRangePickerInput = forwardRef<{}, 'input'>((_props, ref) => {
aria-label="Start date of range"
inputMode="numeric" // Nudge Android mobile keyboard to be numeric
pattern="\d*" // Nudge numeric keyboard on iOS Safari.
sx={styles.field}
width="6rem"
sx={{ ...styles.field, width: '6rem' }}
as={ReactInputMask}
mask="99/99/9999"
value={endInputDisplay}
Expand Down
25 changes: 14 additions & 11 deletions frontend/src/features/public-form/PublicFormProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ export const PublicFormProvider = ({
setHasSingleSubmissionValidationError(false)
}, [])

const [
hasPreviousSubmissionDecryptionError,
setHasPreviousSubmissionDecryptionError,
] = useState(false)

useEffect(() => {
if (
data?.errorCodes?.find(
Expand Down Expand Up @@ -240,10 +245,7 @@ export const PublicFormProvider = ({
)
} catch (e) {
console.error(e, 'failed to decrypt attachment', id)
toast({
status: 'danger',
description: 'Failed to decrypt attachment',
})
setHasPreviousSubmissionDecryptionError(true)
}
if (!decryptedContent) return

Expand Down Expand Up @@ -274,12 +276,7 @@ export const PublicFormProvider = ({
setPreviousAttachments(previousAttachments)
}
}
}, [
encryptedPreviousSubmission,
previousSubmission,
submissionSecretKey,
toast,
])
}, [encryptedPreviousSubmission, previousSubmission, submissionSecretKey])

if (
previousSubmissionId &&
Expand Down Expand Up @@ -394,7 +391,13 @@ export const PublicFormProvider = ({
description: t('features.publicForm.errors.myinfo'),
})
}
}, [hasMyInfoError, toast, t])
if (hasPreviousSubmissionDecryptionError) {
toast({
status: 'danger',
description: 'Failed to decrypt attachment',
})
}
}, [hasMyInfoError, hasPreviousSubmissionDecryptionError, toast, t])

const showErrorToast = useCallback(
(error: unknown, form: PublicFormDto) => {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FormSG",
"description": "Form Manager for Government",
"version": "6.150.1",
"version": "6.151.2",
"homepage": "https://form.gov.sg",
"authors": [
"FormSG <formsg@data.gov.sg>"
Expand Down

0 comments on commit c2001c8

Please sign in to comment.