mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-13 11:17:26 +02:00
This PR cleans up the createFlagDialogCache flag. These changes were automatically generated by AI and should be reviewed carefully. Fixes #10504 ## 🧹 AI Flag Cleanup Summary This change removes the `createFlagDialogCache` feature flag, making its functionality permanent. The create-feature-flag dialog will now always cache its state in local storage. ### 🚮 Removed - **TypeScript Definitions** - Removed `createFlagDialogCache` from `UiFlags` in `frontend/src/interfaces/uiConfig.ts`. - Removed `createFlagDialogCache` from `IFlagKey` in `src/lib/types/experimental.ts`. - **Flag Configuration** - Removed the `createFlagDialogCache` flag definition from `src/lib/types/experimental.ts`. - **Conditional Logic** - Removed the `useUiFlag` hook and conditional logic for caching in `frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFe atureTogglesHeader/CreateFeatureDialog.tsx`. ### 🛠 Kept - **Feature Functionality** - The feature of caching the create-flag dialog's form state in local storage is now always enabled. ### 📝 Why The `createFlagDialogCache` feature has been successfully rolled out and is now considered stable. This cleanup removes the obsolete feature flag and hardcodes the enabled behavior, simplifying the codebase. Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com> Co-authored-by: Thomas Heartman <thomas@getunleash.io>
117 lines
3.1 KiB
TypeScript
117 lines
3.1 KiB
TypeScript
import type { ReactNode } from 'react';
|
|
import type { Variant } from 'utils/variants';
|
|
import type { ResourceLimitsSchema } from 'openapi';
|
|
import {} from '@unleash/proxy-client-react/dist/FlagContext';
|
|
import type { IMutableContext } from 'unleash-proxy-client';
|
|
|
|
export interface IUiConfig {
|
|
authenticationType?: string;
|
|
baseUriPath?: string;
|
|
feedbackUriPath?: string;
|
|
/**
|
|
* @deprecated `useUiFlags` can be used instead
|
|
* @example
|
|
* ```ts
|
|
* const yourFlag = useUiFlag("yourFlag")
|
|
* ```
|
|
*/
|
|
flags: UiFlags;
|
|
name: string;
|
|
slogan: string;
|
|
environment?: string;
|
|
billing?: 'subscription' | 'pay-as-you-go' | 'enterprise-consumption';
|
|
unleashUrl?: string;
|
|
version: string;
|
|
versionInfo?: IVersionInfo;
|
|
links: ILinks[];
|
|
disablePasswordAuth?: boolean;
|
|
emailEnabled?: boolean;
|
|
prometheusAPIAvailable: boolean;
|
|
maintenanceMode?: boolean;
|
|
toast?: IProclamationToast;
|
|
frontendApiOrigins?: string[];
|
|
resourceLimits: ResourceLimitsSchema;
|
|
oidcConfiguredThroughEnv?: boolean;
|
|
samlConfiguredThroughEnv?: boolean;
|
|
maxSessionsCount?: number;
|
|
unleashContext?: IMutableContext;
|
|
}
|
|
|
|
export interface IProclamationToast {
|
|
message: string;
|
|
id: string;
|
|
severity: 'success' | 'info' | 'warning' | 'error';
|
|
link: string;
|
|
}
|
|
|
|
export type UiFlags = {
|
|
P: boolean;
|
|
RE: boolean;
|
|
EEA?: boolean;
|
|
SE?: boolean;
|
|
T?: boolean;
|
|
UNLEASH_CLOUD?: boolean;
|
|
UG?: boolean;
|
|
maintenanceMode?: boolean;
|
|
messageBanner?: Variant;
|
|
banner?: Variant;
|
|
notifications?: boolean;
|
|
personalAccessTokensKillSwitch?: boolean;
|
|
demo?: boolean;
|
|
googleAuthEnabled?: boolean;
|
|
advancedPlayground?: boolean;
|
|
strategyVariant?: boolean;
|
|
doraMetrics?: boolean;
|
|
dependentFeatures?: boolean;
|
|
newStrategyConfiguration?: boolean;
|
|
signals?: boolean;
|
|
automatedActions?: boolean;
|
|
celebrateUnleash?: boolean;
|
|
enableLicense?: boolean;
|
|
feedbackComments?: Variant;
|
|
showInactiveUsers?: boolean;
|
|
feedbackPosting?: boolean;
|
|
outdatedSdksBanner?: boolean;
|
|
estimateTrafficDataCost?: boolean;
|
|
disableShowContextFieldSelectionValues?: boolean;
|
|
projectOverviewRefactorFeedback?: boolean;
|
|
featureLifecycle?: boolean;
|
|
manyStrategiesPagination?: boolean;
|
|
enableLegacyVariants?: boolean;
|
|
flagCreator?: boolean;
|
|
releasePlans?: boolean;
|
|
productivityReportEmail?: boolean;
|
|
showUserDeviceCount?: boolean;
|
|
consumptionModel?: boolean;
|
|
consumptionModelUI?: boolean;
|
|
edgeObservability?: boolean;
|
|
customMetrics?: boolean;
|
|
impactMetrics?: boolean;
|
|
changeRequestApproverEmails?: boolean;
|
|
reportUnknownFlags?: boolean;
|
|
lifecycleGraphs?: boolean;
|
|
addConfiguration?: boolean;
|
|
filterFlagsToArchive?: boolean;
|
|
projectListViewToggle?: boolean;
|
|
};
|
|
|
|
export interface IVersionInfo {
|
|
instanceId: string;
|
|
isLatest: boolean;
|
|
latest: Partial<IVersion>;
|
|
current: IVersion;
|
|
buildDate?: string;
|
|
}
|
|
|
|
export interface IVersion {
|
|
oss: string;
|
|
enterprise: string;
|
|
}
|
|
|
|
export interface ILinks {
|
|
value: string;
|
|
icon: ReactNode;
|
|
href: string;
|
|
title: string;
|
|
}
|