diff --git a/CHANGELOG.md b/CHANGELOG.md index db8fbfc754..b6d0a5d791 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,33 @@ 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.170.0](https://github.com/opengovsg/FormSG/compare/v6.169.1...v6.170.0) + +- fix(sgid): add guard clause to ensure field is present before formatting [`#7997`](https://github.com/opengovsg/FormSG/pull/7997) +- fix(deps): bump aws-sdk from 2.1691.0 to 2.1692.0 [`#7951`](https://github.com/opengovsg/FormSG/pull/7951) +- fix(deps): bump libphonenumber-js from 1.11.15 to 1.11.16 in /shared [`#7974`](https://github.com/opengovsg/FormSG/pull/7974) +- chore(deps-dev): bump eslint-plugin-playwright from 1.6.1 to 2.1.0 [`#7953`](https://github.com/opengovsg/FormSG/pull/7953) +- feat(i18n): extract general,notifs,webhooks settings [`#7955`](https://github.com/opengovsg/FormSG/pull/7955) +- build: merge release 6.169.0 to develop [`#7987`](https://github.com/opengovsg/FormSG/pull/7987) +- fix(i18n): replace title,desc missed earlier [`#7940`](https://github.com/opengovsg/FormSG/pull/7940) +- feat(i18n): replace hardcoded text in FeedbackBlock for i18n [`#7941`](https://github.com/opengovsg/FormSG/pull/7941) + +#### [v6.169.1](https://github.com/opengovsg/FormSG/compare/v6.169.0...v6.169.1) + +> 13 December 2024 + +- feat: add formurl to otp email [`#7993`](https://github.com/opengovsg/FormSG/pull/7993) +- build: release v6.169.0 [`#7986`](https://github.com/opengovsg/FormSG/pull/7986) + #### [v6.169.0](https://github.com/opengovsg/FormSG/compare/v6.168.0...v6.169.0) +> 11 December 2024 + - feat: move to react email, update copy [`#7985`](https://github.com/opengovsg/FormSG/pull/7985) - feat: add logs for uploads to s3 [`#7975`](https://github.com/opengovsg/FormSG/pull/7975) - build: merge release v6.168.0 to develop [`#7973`](https://github.com/opengovsg/FormSG/pull/7973) - build: release v6.168.0 [`#7971`](https://github.com/opengovsg/FormSG/pull/7971) +- chore: bump version to v6.169.0 [`ae74833`](https://github.com/opengovsg/FormSG/commit/ae74833bf1ac3910cbc14ec9cdca5197d15e3ae7) #### [v6.168.0](https://github.com/opengovsg/FormSG/compare/v6.167.0...v6.168.0) @@ -31,16 +52,15 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - feat: update form create modal response options [`#7957`](https://github.com/opengovsg/FormSG/pull/7957) - chore: include latest features in whats new page [`#7956`](https://github.com/opengovsg/FormSG/pull/7956) - build: release v6.166.1 [`#7950`](https://github.com/opengovsg/FormSG/pull/7950) -- fix: trim previous text responses [`#7949`](https://github.com/opengovsg/FormSG/pull/7949) - chore: bump version to v6.167.0 [`9f97c52`](https://github.com/opengovsg/FormSG/commit/9f97c52fa05aa990beb143139ef36b027e0b3874) -- chore: bump version to v6.166.1 [`844ee29`](https://github.com/opengovsg/FormSG/commit/844ee2912b45fd0d7dc3fedaab7b53adfa1375d8) #### [v6.166.1](https://github.com/opengovsg/FormSG/compare/v6.166.0...v6.166.1) > 27 November 2024 +- fix: trim previous text responses [`#7949`](https://github.com/opengovsg/FormSG/pull/7949) - build: release v6.166.0 [`#7945`](https://github.com/opengovsg/FormSG/pull/7945) -- chore: bump version to v6.166.1 [`18d9c74`](https://github.com/opengovsg/FormSG/commit/18d9c74cde8739bc96a0833f3764cb518e4e34aa) +- chore: bump version to v6.166.1 [`844ee29`](https://github.com/opengovsg/FormSG/commit/844ee2912b45fd0d7dc3fedaab7b53adfa1375d8) #### [v6.166.0](https://github.com/opengovsg/FormSG/compare/v6.165.0...v6.166.0) diff --git a/__tests__/e2e/helpers/createForm.ts b/__tests__/e2e/helpers/createForm.ts index e0b8b4f7ee..7372e630ef 100644 --- a/__tests__/e2e/helpers/createForm.ts +++ b/__tests__/e2e/helpers/createForm.ts @@ -181,9 +181,7 @@ const addSettings = async ( await page.getByRole('tab', { name: 'General' }).dispatchEvent('click') // Ensure that we are on the general settings page - await expect( - page.getByRole('heading', { name: 'General settings' }), - ).toBeVisible() + await expect(page.getByRole('heading', { name: 'General' })).toBeVisible() // Toggle form to be open await page @@ -226,9 +224,7 @@ const addGeneralSettings = async ( await page.getByRole('tab', { name: 'General' }).click() // Ensure that we are on the general settings page - await expect( - page.getByRole('heading', { name: 'General settings' }), - ).toBeVisible() + await expect(page.getByRole('heading', { name: 'General' })).toBeVisible() await expectToast(page, /your form is closed to new responses/i) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index a7bc748271..b7cfd8cfd6 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "form-frontend", - "version": "6.169.0", + "version": "6.170.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "form-frontend", - "version": "6.169.0", + "version": "6.170.0", "hasInstallScript": true, "dependencies": { "@chakra-ui/react": "^2.8.2", diff --git a/frontend/package.json b/frontend/package.json index 2b8d79ac69..a021f4f9f1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "form-frontend", - "version": "6.169.0", + "version": "6.170.0", "homepage": ".", "type": "module", "private": true, diff --git a/frontend/src/components/Spinner/Spinner.tsx b/frontend/src/components/Spinner/Spinner.tsx index 4995bbc0fa..f1cc44a1a3 100644 --- a/frontend/src/components/Spinner/Spinner.tsx +++ b/frontend/src/components/Spinner/Spinner.tsx @@ -1,4 +1,5 @@ import { useMemo } from 'react' +import { useTranslation } from 'react-i18next' import { BiLoader } from 'react-icons/bi' import { Flex, @@ -47,10 +48,11 @@ const spin = keyframes({ export const Spinner = ({ speed = '2.5s', color = 'inherit', - label = 'Loading...', + label: userSpecifiedLabel, fontSize = '1rem', ...flexProps }: SpinnerProps): JSX.Element => { + const { t } = useTranslation() const prefersReducedMotion = usePrefersReducedMotion() const animation = useMemo( @@ -59,6 +61,8 @@ export const Spinner = ({ [prefersReducedMotion, speed], ) + const label = userSpecifiedLabel ?? t('features.common.loadingWithEllipsis') + return ( {label && {label}} diff --git a/frontend/src/features/admin-form/common/components/AdminFormNavbar/AdminFormNavbarBreadcrumbs.tsx b/frontend/src/features/admin-form/common/components/AdminFormNavbar/AdminFormNavbarBreadcrumbs.tsx index 9aa99cbb25..62a10ef9d0 100644 --- a/frontend/src/features/admin-form/common/components/AdminFormNavbar/AdminFormNavbarBreadcrumbs.tsx +++ b/frontend/src/features/admin-form/common/components/AdminFormNavbar/AdminFormNavbarBreadcrumbs.tsx @@ -1,3 +1,4 @@ +import { useTranslation } from 'react-i18next' import { BiHomeAlt } from 'react-icons/bi' import { Link as ReactLink } from 'react-router-dom' import { Icon, Skeleton, Stack, Text } from '@chakra-ui/react' @@ -13,6 +14,7 @@ type AdminFormNavbarDetailsProps = Pick export const AdminFormNavbarBreadcrumbs = ({ formInfo, }: AdminFormNavbarDetailsProps): JSX.Element => { + const { t } = useTranslation() const isMobile = useIsMobile() return ( @@ -44,7 +46,7 @@ export const AdminFormNavbarBreadcrumbs = ({ overflow="hidden" color="secondary.500" > - {formInfo ? formInfo.title : 'Loading...'} + {formInfo ? formInfo.title : t('features.common.loadingWithEllipsis')} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditAttachment/EditAttachment.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditAttachment/EditAttachment.tsx index cdedaa7311..ffeef00879 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditAttachment/EditAttachment.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditAttachment/EditAttachment.tsx @@ -136,7 +136,7 @@ export const EditAttachment = ({ field }: EditAttachmentProps): JSX.Element => { ) }, }), - [maxTotalSizeMb, otherAttachmentsSize], + [maxTotalSizeMb, otherAttachmentsSize, t], ) const validateAttachmentSize = useCallback(() => { @@ -154,12 +154,18 @@ export const EditAttachment = ({ field }: EditAttachmentProps): JSX.Element => { return ( - Field Name + + {t('features.adminForm.sidebar.fields.commonFieldComponents.title')} + {errors?.title?.message} - Description + + {t( + 'features.adminForm.sidebar.fields.commonFieldComponents.description', + )} +