Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: release v6.165.0 #7927

Merged
merged 6 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,24 @@ 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.165.0](https://github.com/opengovsg/FormSG/compare/v6.164.0...v6.165.0)

- chore(approvals-ga): remove beta flag for MRF email notifications and approvals [`#7920`](https://github.com/opengovsg/FormSG/pull/7920)
- chore(deps-dev): bump @typescript-eslint/parser from 8.14.0 to 8.15.0 in /shared [`#7911`](https://github.com/opengovsg/FormSG/pull/7911)
- fix(deps): bump @aws-sdk/client-lambda from 3.654.0 to 3.693.0 [`#7910`](https://github.com/opengovsg/FormSG/pull/7910)
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.14.0 to 8.15.0 in /shared [`#7912`](https://github.com/opengovsg/FormSG/pull/7912)
- build: merge release v6.164.0 to develop [`#7921`](https://github.com/opengovsg/FormSG/pull/7921)
- build: release v6.164.0 [`#7919`](https://github.com/opengovsg/FormSG/pull/7919)

#### [v6.164.0](https://github.com/opengovsg/FormSG/compare/v6.163.0...v6.164.0)

> 19 November 2024

- feat(approvals-ga): p1 changes [`#7918`](https://github.com/opengovsg/FormSG/pull/7918)
- build: merge release v6.163.0 to develop [`#7916`](https://github.com/opengovsg/FormSG/pull/7916)
- fix: fixed cursor appearance for inactive logic block [`#7917`](https://github.com/opengovsg/FormSG/pull/7917)
- build: release v6.163.0 [`#7914`](https://github.com/opengovsg/FormSG/pull/7914)
- chore: bump version to v6.164.0 [`9cf94dc`](https://github.com/opengovsg/FormSG/commit/9cf94dc221b374648a41d6e291ac8e1190484c72)

#### [v6.163.0](https://github.com/opengovsg/FormSG/compare/v6.162.0...v6.163.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.164.0",
"version": "6.165.0",
"homepage": ".",
"type": "module",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
BASICFIELD_TO_DRAWER_META,
MYINFO_FIELD_TO_DRAWER_META,
} from '~features/admin-form/create/constants'
import { useUser } from '~features/user/queries'

import { useCreateTabForm } from '../../useCreateTabForm'
import {
Expand Down Expand Up @@ -150,9 +149,6 @@ export const DraggableMyInfoFieldListOption = ({

export const BasicFieldOption = forwardRef<BasicFieldOptionProps, 'button'>(
({ fieldType, isDisabled, ...props }, ref) => {
// TODO: (MRF-email-notif) Remove isTest and useUser when approvals is out of beta
const isTest = import.meta.env.STORYBOOK_NODE_ENV === 'test'
const { user } = useUser()
const meta = useMemo(
() => BASICFIELD_TO_DRAWER_META[fieldType],
[fieldType],
Expand Down Expand Up @@ -183,13 +179,10 @@ export const BasicFieldOption = forwardRef<BasicFieldOptionProps, 'button'>(
>
<Icon fontSize="1.5rem" as={meta.icon} />
<Text textStyle="body-1">{meta.label}</Text>
{/* TODO: (MRF-email-notif) Remove isTest and betaFlag check when approvals is out of beta */}
{isTest || user?.betaFlags?.mrfEmailNotifications ? (
isMrf && fieldType === BasicField.YesNo ? (
<Badge maxW="100%" variant="subtle" colorScheme="secondary">
<Text noOfLines={1}>Use for approvals</Text>
</Badge>
) : null
{isMrf && fieldType === BasicField.YesNo ? (
<Badge maxW="100%" variant="subtle" colorScheme="secondary">
<Text noOfLines={1}>Use for approvals</Text>
</Badge>
) : null}
</FieldListOption>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ export const EditStepBlock = ({

const isFirstStep = isFirstStepByStepNumber(stepNumber)

// TODO: (MRF-email-notif) Remove isTest check when approvals is out of beta
const isTest = import.meta.env.STORYBOOK_NODE_ENV === 'test'

return (
<Stack
ref={wrapperRef}
Expand All @@ -141,14 +138,11 @@ export const EditStepBlock = ({
/>
<Divider />
<QuestionsBlock formMethods={formMethods} isLoading={_isLoading} />
{/*TODO: (MRF-email-notif) Remove isTest and betaFlag check when approvals is out of beta */}
{isTest || user?.betaFlags?.mrfEmailNotifications ? (
!isFirstStep ? (
<>
<Divider />
<ApprovalsBlock formMethods={formMethods} stepNumber={stepNumber} />
</>
) : null
{!isFirstStep ? (
<>
<Divider />
<ApprovalsBlock formMethods={formMethods} stepNumber={stepNumber} />
</>
) : null}
<Divider />
<SaveActionGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import IconButton from '~components/IconButton'
import { FieldLogicBadge } from '~features/admin-form/create/logic/components/LogicContent/InactiveLogicBlock/FieldLogicBadge'
import { LogicBadge } from '~features/admin-form/create/logic/components/LogicContent/InactiveLogicBlock/LogicBadge'
import { FormFieldWithQuestionNo } from '~features/form/types'
import { useUser } from '~features/user/queries'

import {
createOrEditDataSelector,
Expand Down Expand Up @@ -65,10 +64,6 @@ export const InactiveStepBlock = ({
const setToEditing = useAdminWorkflowStore(setToEditingSelector)
const stateData = useAdminWorkflowStore(createOrEditDataSelector)

const { user } = useUser()
// TODO: (MRF-email-notif) Remove isTest check when MRF email notifications and approvals are both out of beta
const isTest = import.meta.env.STORYBOOK_NODE_ENV === 'test'

// Prevent editing step if some other step is being edited.
const isPreventEdit = useMemo(() => !!stateData, [stateData])

Expand Down Expand Up @@ -141,8 +136,6 @@ export const InactiveStepBlock = ({

<Stack>
<Text textStyle="subhead-3">Respondent in this step</Text>
{/* TODO: (MRF-email-notif) Remove isTest and betaFlag check when MRF email
notifications is out of beta */}
{isFirstStep ? (
<Text>Anyone who has access to your form</Text>
) : (
Expand All @@ -166,11 +159,8 @@ export const InactiveStepBlock = ({
{questionBadges}
</Stack>
</Stack>
{/* TODO: (MRF-email-notif) Remove isTest and betaFlag check when approvals is out of beta */}
{isTest || user?.betaFlags?.mrfEmailNotifications ? (
!isFirstStep ? (
<InactiveApprovalsBlock step={step} idToFieldMap={idToFieldMap} />
) : null
{!isFirstStep ? (
<InactiveApprovalsBlock step={step} idToFieldMap={idToFieldMap} />
) : null}
</Stack>
</chakra.button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { Box, Divider, Stack } from '@chakra-ui/react'

import { BxsChevronDown } from '~assets/icons/BxsChevronDown'

import { useUser } from '~features/user/queries'

import { useAdminFormWorkflow } from '../../hooks/useAdminFormWorkflow'

import { NewStepBlock } from './NewStepBlock'
Expand All @@ -12,9 +10,6 @@ import { WorkflowCompletionMessageBlock } from './WorkflowCompletionMessageBlock

export const WorkflowContent = (): JSX.Element | null => {
const { formWorkflow, isLoading } = useAdminFormWorkflow()
// TODO: (MRF-email-notif) Remove isTest and useUser when email notifications is out of beta
const isTest = import.meta.env.STORYBOOK_NODE_ENV === 'test'
const { user } = useUser()

if (isLoading) return null

Expand All @@ -26,10 +21,7 @@ export const WorkflowContent = (): JSX.Element | null => {
))}
<NewStepBlock />
</Stack>
{/*TODO: (MRF-email-notif) Remove flag check when email notifications is out of beta */}
{isTest || user?.betaFlags?.mrfEmailNotifications ? (
<WorkflowCompletionMessageBlock />
) : null}
<WorkflowCompletionMessageBlock />
</Stack>
)
}
Expand Down
44 changes: 8 additions & 36 deletions frontend/src/features/admin-form/settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import { useEffect } from 'react'
import {
BiCodeBlock,
BiCog,
BiDollar,
BiKey,
BiMailSend,
BiMessage,
} from 'react-icons/bi'
import { BiCodeBlock, BiCog, BiDollar, BiKey, BiMailSend } from 'react-icons/bi'
import { IconType } from 'react-icons/lib'
import { useNavigate, useParams } from 'react-router-dom'
import {
Expand All @@ -19,17 +12,12 @@ import {
Tabs,
} from '@chakra-ui/react'

import { FormResponseMode } from '~shared/types'

import { ADMINFORM_RESULTS_SUBROUTE, ADMINFORM_ROUTE } from '~constants/routes'
import { useDraggable } from '~hooks/useDraggable'

import { useUser } from '~features/user/queries'

import { useAdminFormCollaborators } from '../common/queries'

import { SettingsTab } from './components/SettingsTab'
import { useAdminFormSettings } from './queries'
import { SettingsAuthPage } from './SettingsAuthPage'
import { SettingsEmailsPage } from './SettingsEmailsPage'
import { SettingsGeneralPage } from './SettingsGeneralPage'
Expand All @@ -46,9 +34,6 @@ interface TabEntry {

export const SettingsPage = (): JSX.Element => {
const { formId, settingsTab } = useParams()
const { data: formSettings, isLoading: isFormSettingLoading } =
useAdminFormSettings()
const { user, isLoading: isUserLoading } = useUser()

if (!formId) throw new Error('No formId provided')

Expand All @@ -62,25 +47,6 @@ export const SettingsPage = (): JSX.Element => {
navigate(`${ADMINFORM_ROUTE}/${formId}/${ADMINFORM_RESULTS_SUBROUTE}`)
}, [formId, hasEditAccess, isCollabLoading, navigate])

// TODO: (MRF-email-notif) Remove isTest when email notifications is out of beta
const isTest = import.meta.env.STORYBOOK_NODE_ENV === 'test'
// For beta flagging email notifications tab.
const emailNotificationsTab =
isUserLoading ||
isFormSettingLoading ||
// TODO: (MRF-email-notif) Remove isTest and betaFlag check when MRF email notifications is out of beta
(!isTest &&
formSettings?.responseMode === FormResponseMode.Multirespondent &&
!user?.betaFlags?.mrfEmailNotifications)
? null
: {
label: 'Email notifications',
icon: BiMailSend,
component: SettingsEmailsPage,
path: 'email-notifications',
showRedDot: true,
}

const tabConfig: TabEntry[] = [
{
label: 'General',
Expand All @@ -94,7 +60,13 @@ export const SettingsPage = (): JSX.Element => {
component: SettingsAuthPage,
path: 'singpass',
},
emailNotificationsTab,
{
label: 'Email notifications',
icon: BiMailSend,
component: SettingsEmailsPage,
path: 'email-notifications',
showRedDot: true,
},
{
label: 'Webhooks',
icon: BiCodeBlock,
Expand Down
Loading
Loading