Skip to content

Commit

Permalink
Merge pull request #7998 from opengovsg/release_v6.170.0
Browse files Browse the repository at this point in the history
build: release v6.170.0
  • Loading branch information
KenLSM authored Dec 16, 2024
2 parents e300ebf + 91bdef3 commit b939444
Show file tree
Hide file tree
Showing 58 changed files with 659 additions and 1,500 deletions.
26 changes: 23 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down
8 changes: 2 additions & 6 deletions __tests__/e2e/helpers/createForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

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.169.0",
"version": "6.170.0",
"homepage": ".",
"type": "module",
"private": true,
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { BiLoader } from 'react-icons/bi'
import {
Flex,
Expand Down Expand Up @@ -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(
Expand All @@ -59,6 +61,8 @@ export const Spinner = ({
[prefersReducedMotion, speed],
)

const label = userSpecifiedLabel ?? t('features.common.loadingWithEllipsis')

return (
<Flex color={color} align="center" {...flexProps}>
{label && <VisuallyHidden>{label}</VisuallyHidden>}
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -13,6 +14,7 @@ type AdminFormNavbarDetailsProps = Pick<AdminFormNavbarProps, 'formInfo'>
export const AdminFormNavbarBreadcrumbs = ({
formInfo,
}: AdminFormNavbarDetailsProps): JSX.Element => {
const { t } = useTranslation()
const isMobile = useIsMobile()

return (
Expand Down Expand Up @@ -44,7 +46,7 @@ export const AdminFormNavbarBreadcrumbs = ({
overflow="hidden"
color="secondary.500"
>
{formInfo ? formInfo.title : 'Loading...'}
{formInfo ? formInfo.title : t('features.common.loadingWithEllipsis')}
</Text>
</Skeleton>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const EditAttachment = ({ field }: EditAttachmentProps): JSX.Element => {
)
},
}),
[maxTotalSizeMb, otherAttachmentsSize],
[maxTotalSizeMb, otherAttachmentsSize, t],
)

const validateAttachmentSize = useCallback(() => {
Expand All @@ -154,12 +154,18 @@ export const EditAttachment = ({ field }: EditAttachmentProps): JSX.Element => {
return (
<CreatePageDrawerContentContainer>
<FormControl isRequired isReadOnly={isLoading} isInvalid={!!errors.title}>
<FormLabel>Field Name</FormLabel>
<FormLabel>
{t('features.adminForm.sidebar.fields.commonFieldComponents.title')}
</FormLabel>
<Input autoFocus {...register('title', requiredValidationRule)} />
<FormErrorMessage>{errors?.title?.message}</FormErrorMessage>
</FormControl>
<FormControl isReadOnly={isLoading} isInvalid={!!errors.description}>
<FormLabel>Description</FormLabel>
<FormLabel>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description')} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,18 @@ export const EditCheckbox = ({ field }: EditCheckboxProps): JSX.Element => {
return (
<CreatePageDrawerContentContainer>
<FormControl isRequired isReadOnly={isLoading} isInvalid={!!errors.title}>
<FormLabel>Field Name</FormLabel>
<FormLabel>
{t('features.adminForm.sidebar.fields.commonFieldComponents.title')}
</FormLabel>
<Input autoFocus {...register('title', requiredValidationRule)} />
<FormErrorMessage>{errors?.title?.message}</FormErrorMessage>
</FormControl>
<FormControl isReadOnly={isLoading} isInvalid={!!errors.description}>
<FormLabel>Description</FormLabel>
<FormLabel>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description')} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { FormControl } from '@chakra-ui/react'
import { extend, pick } from 'lodash'

Expand Down Expand Up @@ -61,6 +62,8 @@ export const EditCountryRegion = ({
},
})

const { t } = useTranslation()

const requiredValidationRule = useMemo(
() => createBaseValidationRules({ required: true }),
[],
Expand All @@ -69,12 +72,18 @@ export const EditCountryRegion = ({
return (
<CreatePageDrawerContentContainer>
<FormControl isRequired isReadOnly={isLoading} isInvalid={!!errors.title}>
<FormLabel>Field Name</FormLabel>
<FormLabel>
{t('features.adminForm.sidebar.fields.commonFieldComponents.title')}
</FormLabel>
<Input autoFocus {...register('title', requiredValidationRule)} />
<FormErrorMessage>{errors?.title?.message}</FormErrorMessage>
</FormControl>
<FormControl isReadOnly={isLoading} isInvalid={!!errors.description}>
<FormLabel>Description</FormLabel>
<FormLabel>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description')} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,26 @@ export const EditDate = ({ field }: EditDateProps): JSX.Element => {
},
deps: 'invalidDays',
}),
[getValues],
[getValues, t],
)

const { drawerWidth } = useCreatePageSidebarLayout()

return (
<CreatePageDrawerContentContainer>
<FormControl isRequired isReadOnly={isLoading} isInvalid={!!errors.title}>
<FormLabel>Field Name</FormLabel>
<FormLabel>
{t('features.adminForm.sidebar.fields.commonFieldComponents.title')}
</FormLabel>
<Input autoFocus {...register('title', requiredValidationRule)} />
<FormErrorMessage>{errors?.title?.message}</FormErrorMessage>
</FormControl>
<FormControl isReadOnly={isLoading} isInvalid={!!errors.description}>
<FormLabel>Description</FormLabel>
<FormLabel>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description')} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ export const EditDecimal = ({ field }: EditDecimalProps): JSX.Element => {
)
},
}
}, [getValues])
}, [getValues, t])

return (
<CreatePageDrawerContentContainer>
<FormControl isRequired isReadOnly={isLoading} isInvalid={!!errors.title}>
<FormLabel>Field Name</FormLabel>
<FormLabel>
{t('features.adminForm.sidebar.fields.commonFieldComponents.title')}
</FormLabel>
<Input autoFocus {...register('title', requiredValidationRule)} />
<FormErrorMessage>{errors?.title?.message}</FormErrorMessage>
</FormControl>
Expand All @@ -107,7 +109,11 @@ export const EditDecimal = ({ field }: EditDecimalProps): JSX.Element => {
isReadOnly={isLoading}
isInvalid={!!errors.description}
>
<FormLabel>Description</FormLabel>
<FormLabel>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description')} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,18 @@ export const EditDropdown = ({ field }: EditDropdownProps): JSX.Element => {
return (
<CreatePageDrawerContentContainer>
<FormControl isRequired isReadOnly={isLoading} isInvalid={!!errors.title}>
<FormLabel>Field Name</FormLabel>
<FormLabel>
{t('features.adminForm.sidebar.fields.commonFieldComponents.title')}
</FormLabel>
<Input autoFocus {...register('title', requiredValidationRule)} />
<FormErrorMessage>{errors?.title?.message}</FormErrorMessage>
</FormControl>
<FormControl isReadOnly={isLoading} isInvalid={!!errors.description}>
<FormLabel>Description</FormLabel>
<FormLabel>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description')} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
return (
<CreatePageDrawerContentContainer>
<FormControl isRequired isReadOnly={isLoading} isInvalid={!!errors.title}>
<FormLabel>Field Name</FormLabel>
<FormLabel>
{t('features.adminForm.sidebar.fields.commonFieldComponents.title')}
</FormLabel>
<Input autoFocus {...register('title', requiredValidationRule)} />
<FormErrorMessage>{errors?.title?.message}</FormErrorMessage>
</FormControl>
Expand All @@ -164,7 +166,11 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => {
isReadOnly={isLoading}
isInvalid={!!errors.description}
>
<FormLabel>Description</FormLabel>
<FormLabel>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description')} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ export const EditHeader = ({ field }: EditHeaderProps): JSX.Element => {
<FormErrorMessage>{errors?.title?.message}</FormErrorMessage>
</FormControl>
<FormControl isReadOnly={isLoading} isInvalid={!!errors.description}>
<FormLabel>Description</FormLabel>
<FormLabel>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description')} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export const EditHomeno = ({ field }: EditHomenoProps): JSX.Element => {
return (
<CreatePageDrawerContentContainer>
<FormControl isRequired isReadOnly={isLoading} isInvalid={!!errors.title}>
<FormLabel>Field Name</FormLabel>
<FormLabel>
{t('features.adminForm.sidebar.fields.commonFieldComponents.title')}
</FormLabel>
<Input autoFocus {...register('title', requiredValidationRule)} />
<FormErrorMessage>{errors?.title?.message}</FormErrorMessage>
</FormControl>
Expand All @@ -63,7 +65,11 @@ export const EditHomeno = ({ field }: EditHomenoProps): JSX.Element => {
isReadOnly={isLoading}
isInvalid={!!errors.description}
>
<FormLabel>Description</FormLabel>
<FormLabel>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description')} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ export const EditImage = ({ field }: EditImageProps): JSX.Element => {
isReadOnly={isLoading || isSubmitting}
isInvalid={!!errors.description}
>
<FormLabel isRequired>Description</FormLabel>
<FormLabel isRequired>
{t(
'features.adminForm.sidebar.fields.commonFieldComponents.description',
)}
</FormLabel>
<Textarea {...register('description', requiredValidationRule)} />
<FormErrorMessage>{errors?.description?.message}</FormErrorMessage>
</FormControl>
Expand Down
Loading

0 comments on commit b939444

Please sign in to comment.