1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01: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>
</Tooltip>{' '}
<ConditionallyRender
condition={!isOss()}
condition={
!isOss() &&
!uiConfig?.flags.disableNotifications
}
show={<Notifications />}
/>
<Tooltip title="Documentation" arrow>

View File

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

View File

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

View File

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