-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7725 from opengovsg/release_v6.149.0
build: release v6.149.0
- Loading branch information
Showing
70 changed files
with
5,619 additions
and
2,421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -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 | ||
|
@@ -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, | ||
}) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...ate/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/FieldListDrawer.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
} |
Oops, something went wrong.