1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-15 01:16:22 +02:00

feat: disable notifications flag (#3874)

This commit is contained in:
Mateusz Kwasniewski 2023-05-29 08:28:47 +02:00 committed by GitHub
parent 258cae2e7f
commit b0a003ea58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 2 deletions

View File

@ -255,7 +255,10 @@ const Header: VFC = () => {
</IconButton> </IconButton>
</Tooltip>{' '} </Tooltip>{' '}
<ConditionallyRender <ConditionallyRender
condition={!isOss()} condition={
!isOss() &&
!uiConfig?.flags.disableNotifications
}
show={<Notifications />} show={<Notifications />}
/> />
<Tooltip title="Documentation" arrow> <Tooltip title="Documentation" arrow>

View File

@ -52,6 +52,7 @@ export interface IFlags {
strategyImprovements?: boolean; strategyImprovements?: boolean;
disableBulkToggle?: boolean; disableBulkToggle?: boolean;
segmentContextFieldUsage?: boolean; segmentContextFieldUsage?: boolean;
disableNotifications?: boolean;
} }
export interface IVersionInfo { export interface IVersionInfo {

View File

@ -72,6 +72,7 @@ exports[`should create default config 1`] = `
"cleanClientApi": false, "cleanClientApi": false,
"demo": false, "demo": false,
"disableBulkToggle": false, "disableBulkToggle": false,
"disableNotifications": false,
"embedProxy": true, "embedProxy": true,
"embedProxyFrontend": true, "embedProxyFrontend": true,
"featuresExportImport": true, "featuresExportImport": true,
@ -103,6 +104,7 @@ exports[`should create default config 1`] = `
"cleanClientApi": false, "cleanClientApi": false,
"demo": false, "demo": false,
"disableBulkToggle": false, "disableBulkToggle": false,
"disableNotifications": false,
"embedProxy": true, "embedProxy": true,
"embedProxyFrontend": true, "embedProxyFrontend": true,
"featuresExportImport": true, "featuresExportImport": true,

View File

@ -22,7 +22,8 @@ export type IFlagKey =
| 'googleAuthEnabled' | 'googleAuthEnabled'
| 'variantMetrics' | 'variantMetrics'
| 'disableBulkToggle' | 'disableBulkToggle'
| 'segmentContextFieldUsage'; | 'segmentContextFieldUsage'
| 'disableNotifications';
export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
@ -103,6 +104,10 @@ const flags: IFlags = {
process.env.UNLEASH_SSEGMENT_CONTEXT_FIELD_USAGE, process.env.UNLEASH_SSEGMENT_CONTEXT_FIELD_USAGE,
false, false,
), ),
disableNotifications: parseEnvVarBoolean(
process.env.DISABLE_NOTIFICATIONS,
false,
),
}; };
export const defaultExperimentalOptions: IExperimentalOptions = { export const defaultExperimentalOptions: IExperimentalOptions = {