Skip to content

Commit

Permalink
Merge pull request #7725 from opengovsg/release_v6.149.0
Browse files Browse the repository at this point in the history
build: release v6.149.0
  • Loading branch information
KenLSM authored Sep 26, 2024
2 parents 7aa81e2 + 72579e0 commit 89a6733
Show file tree
Hide file tree
Showing 70 changed files with 5,619 additions and 2,421 deletions.
2 changes: 0 additions & 2 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ pull_request_rules:
actions:
review:
type: APPROVE
merge:
method: squash
- name: Approve and merge non-major Snyk.io upgrades
conditions:
- author=snyk-bot
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,10 @@ jobs:
NODE_OPTIONS: --max-old-space-size=4096 -r ${{ env.DD_TRACE_PACKAGE }}
AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE: 1
- name: Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty: false

backend_lint:
needs: [changes, install]
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,41 @@ 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.149.0](https://github.com/opengovsg/FormSG/compare/v6.148.0...v6.149.0)

- build: merge release v6.148.0 to develop [`#7724`](https://github.com/opengovsg/FormSG/pull/7724)
- feat: approvals for mrf [`#7636`](https://github.com/opengovsg/FormSG/pull/7636)
- fix: coverall allow empty lcov [`#7722`](https://github.com/opengovsg/FormSG/pull/7722)
- chore: remove p-queue from be [`#7693`](https://github.com/opengovsg/FormSG/pull/7693)
- chore: add comments clarifying potentially confusing terms [`#7694`](https://github.com/opengovsg/FormSG/pull/7694)
- ci(Mergify): configuration update [`#7720`](https://github.com/opengovsg/FormSG/pull/7720)
- chore: Revert "chore(deps-dev): bump jest-environment-jsdom from 29.5.0 to 29.7.0" [`#7719`](https://github.com/opengovsg/FormSG/pull/7719)
- feat(tracking): mrf workflow + creation [`#7704`](https://github.com/opengovsg/FormSG/pull/7704)
- chore(deps-dev): bump @types/lodash from 4.17.7 to 4.17.9 in /shared [`#7717`](https://github.com/opengovsg/FormSG/pull/7717)
- fix(deps): bump libphonenumber-js from 1.11.8 to 1.11.9 in /shared [`#7713`](https://github.com/opengovsg/FormSG/pull/7713)
- chore(deps-dev): bump @babel/preset-env from 7.25.3 to 7.25.4 [`#7711`](https://github.com/opengovsg/FormSG/pull/7711)
- fix(deps): bump express-rate-limit from 7.2.0 to 7.4.0 [`#7710`](https://github.com/opengovsg/FormSG/pull/7710)
- chore(deps-dev): bump @types/busboy from 1.5.3 to 1.5.4 [`#7709`](https://github.com/opengovsg/FormSG/pull/7709)
- chore(deps-dev): bump @stoplight/prism-cli from 5.5.4 to 5.10.0 [`#7708`](https://github.com/opengovsg/FormSG/pull/7708)
- chore(deps-dev): bump jest-environment-jsdom from 29.5.0 to 29.7.0 [`#7707`](https://github.com/opengovsg/FormSG/pull/7707)
- chore(deps-dev): bump eslint-plugin-prettier from 5.1.3 to 5.2.1 [`#7706`](https://github.com/opengovsg/FormSG/pull/7706)
- fix(deps): bump aws-sdk from 2.1659.0 to 2.1691.0 [`#7703`](https://github.com/opengovsg/FormSG/pull/7703)
- fix(deps): jest extended upgrade to 4.0.2 [`#7698`](https://github.com/opengovsg/FormSG/pull/7698)
- fix(deps): bump dotenv from 16.0.3 to 16.4.5 [`#7702`](https://github.com/opengovsg/FormSG/pull/7702)
- fix(deps): bump @aws-sdk/client-lambda from 3.414.0 to 3.654.0 [`#7701`](https://github.com/opengovsg/FormSG/pull/7701)
- fix(deps): bump axios from 1.7.4 to 1.7.7 [`#7699`](https://github.com/opengovsg/FormSG/pull/7699)
- fix(deps): bump opossum and @types/opossum [`#7593`](https://github.com/opengovsg/FormSG/pull/7593)
- fix(deps): bump neverthrow from 6.1.0 to 8.0.0 [`#7697`](https://github.com/opengovsg/FormSG/pull/7697)
- chore(deps-dev): bump @types/dedent from 0.7.0 to 0.7.2 [`#7696`](https://github.com/opengovsg/FormSG/pull/7696)
- fix(deps): bump @opengovsg/sgid-client from 2.0.0 to 2.2.0 [`#7687`](https://github.com/opengovsg/FormSG/pull/7687)
- chore: remove unused deps [`#7685`](https://github.com/opengovsg/FormSG/pull/7685)
- fix: chromatic build failure [`#7684`](https://github.com/opengovsg/FormSG/pull/7684)
- build: release v6.148.0 [`#7683`](https://github.com/opengovsg/FormSG/pull/7683)

#### [v6.148.0](https://github.com/opengovsg/FormSG/compare/v6.147.1...v6.148.0)

> 16 September 2024

- build: merge release v6.147.1 to develop [`#7681`](https://github.com/opengovsg/FormSG/pull/7681)
- chore: remove unused deps [`#7676`](https://github.com/opengovsg/FormSG/pull/7676)
- feat: add betaflag on submission key [`#7677`](https://github.com/opengovsg/FormSG/pull/7677)
Expand All @@ -15,6 +48,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore(deps): bump axios from 1.6.5 to 1.7.7 in /frontend [`#7674`](https://github.com/opengovsg/FormSG/pull/7674)
- chore(deps-dev): bump husky from 8.0.3 to 9.1.6 [`#7673`](https://github.com/opengovsg/FormSG/pull/7673)
- build: release 6.174.1 [`#7672`](https://github.com/opengovsg/FormSG/pull/7672)
- chore: bump version to v6.148.0 [`ae76291`](https://github.com/opengovsg/FormSG/commit/ae762918dffa3f0bcba0e0d25dd5e5c5623e435c)

#### [v6.147.1](https://github.com/opengovsg/FormSG/compare/v6.147.0...v6.147.1)

Expand Down
26 changes: 26 additions & 0 deletions frontend/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,32 @@ module.exports = {
test: /\.mjs$/,
include: /node_modules/,
},
{
// Added to fix ticket:
// https://linear.app/ogp/issue/FRM-1857/fix-chromatic-build-failure-due-es2018-features-not-supported
test: /\.(?:jsx?|tsx?|vue)$/,
use: [
{
loader: 'babel-loader',
options: {
presets: [
'@babel/preset-env',
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
'@babel/preset-typescript',
],
plugins: [
'@babel/plugin-transform-async-to-generator',
'@babel/plugin-proposal-async-generator-functions',
],
},
},
],
},
],
},
}
Expand Down
20 changes: 8 additions & 12 deletions frontend/datadog-chunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@
import { datadogRum, RumInitConfiguration } from '@datadog/browser-rum'

// Discard benign RUM errors.
export const ddBeforeSend: RumInitConfiguration['beforeSend'] = (event) => {
// TODO(#4279): Might want to remove this once we are fully React, since then we will not need to check auth state.
// Discard unauth'd errors
if (event.type === 'resource' && event.resource.status_code === 404) {
return false
}

if (event.type !== 'error') return
// Ensure that beforeSend returns true to keep the event and false to discard it.
const ddBeforeSend: RumInitConfiguration['beforeSend'] = (event) => {
if (event.type !== 'error') return true

// Caused by @chakra-ui/react@latest-v1 -> @chakra-ui/[email protected] -> [email protected]
// Already fixed in @chakra-ui/react@latest, but we cannot upgrade until we upgrade to React 18.
Expand All @@ -27,6 +22,8 @@ export const ddBeforeSend: RumInitConfiguration['beforeSend'] = (event) => {
if (event.error.message.includes('ResizeObserver loop limit exceeded')) {
return false
}

return true
}

// Init Datadog RUM
Expand All @@ -41,10 +38,9 @@ datadogRum.init({

// Specify a version number to identify the deployed version of your application in Datadog
version: '@REACT_APP_VERSION',
// TODO/RUM: Update these RUM percentages as we increase the rollout percentage!
sampleRate: Number('@REACT_APP_DD_SAMPLE_RATE') || 5,
replaySampleRate: 100,
trackInteractions: true,
sessionSampleRate: Number('@REACT_APP_DD_SAMPLE_RATE') || 5,
sessionReplaySampleRate: 100,
trackUserInteractions: true,
defaultPrivacyLevel: 'mask-user-input',
beforeSend: ddBeforeSend,
})
Expand Down
56 changes: 28 additions & 28 deletions frontend/package-lock.json

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

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "form-frontend",
"version": "6.148.0",
"version": "6.149.0",
"homepage": ".",
"private": true,
"dependencies": {
"@chakra-ui/react": "^1.8.6",
"@datadog/browser-logs": "^4.50.1",
"@datadog/browser-rum": "^4.34.1",
"@datadog/browser-rum": "^5.27.0",
"@emotion/react": "^11.7.0",
"@emotion/styled": "^11.6.0",
"@floating-ui/react-dom-interactions": "^0.9.3",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface BadgeProps extends ChakraBadgeProps {
* The theme of the tag to display
*/
variant?: BadgeVariants
colorScheme?: string
}

export const Badge = (props: BadgeProps): JSX.Element => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export const FormLabel = ({
>
<Icon
ml="0.5rem"
mb="0.1rem"
color="secondary.500"
as={tooltipVariant === 'info' ? BxsInfoCircle : BxsHelpCircle}
verticalAlign="middle"
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/components/Radio/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ export interface RadioProps
* please use the props `maxWidth` or `width` to configure
*/
isFullWidth?: boolean
/**
* If `true`, the radio children will occupy the full width of the radio container.
*/
isLabelFullWidth?: boolean
/**
* Background and shadow colors.
*/
Expand Down Expand Up @@ -121,6 +125,7 @@ export const Radio = forwardRef<RadioProps, 'input'>(
spacing = '0.5rem',
children,
isFullWidth,
isLabelFullWidth = false,
...rest
} = omitThemingProps(props)

Expand Down Expand Up @@ -203,6 +208,7 @@ export const Radio = forwardRef<RadioProps, 'input'>(
}

const labelStyles: SystemStyleObject = {
width: isLabelFullWidth ? 'full' : undefined,
userSelect: 'none',
marginStart: spacing,
...styles.label,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { DragDropContext } from 'react-beautiful-dnd'
import { StoryFn } from '@storybook/react'

import { FormResponseMode } from '~shared/types'

import { getAdminFormView } from '~/mocks/msw/handlers/admin-form'

import { StoryRouter } from '~utils/storybook'

import { CreatePageSidebarProvider } from '~features/admin-form/create/common'

import { FieldListDrawer } from '..'

export default {
component: FieldListDrawer,
title:
'Features/AdminForm/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer',
parameters: {
msw: [getAdminFormView({ mode: FormResponseMode.Encrypt })],
},
decorators: [
StoryRouter({ initialEntries: ['/12345'], path: '/:formId' }),
(Story: StoryFn) => (
// eslint-disable-next-line @typescript-eslint/no-empty-function
<DragDropContext onDragEnd={() => {}}>
<CreatePageSidebarProvider>
<Story />
</CreatePageSidebarProvider>
</DragDropContext>
),
],
}

const encryptModeHandlers = [
getAdminFormView({ mode: FormResponseMode.Encrypt }),
]

const mrfModeHandlers = [
getAdminFormView({ mode: FormResponseMode.Multirespondent }),
]

export const EncryptMode = {
parameters: {
msw: encryptModeHandlers,
},
}

export const MrfMode = {
parameters: {
msw: mrfModeHandlers,
},
}
Loading

0 comments on commit 89a6733

Please sign in to comment.