mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-19 17:52:45 +02:00
chore(AI): createFlagDialogCache flag cleanup (#10509)
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>
This commit is contained in:
parent
170ed87fcb
commit
02ee94c38f
@ -33,7 +33,6 @@ import { useFlagLimits } from './useFlagLimits.tsx';
|
||||
import { useFeatureCreatedFeedback } from './hooks/useFeatureCreatedFeedback.ts';
|
||||
import { formatTag } from 'utils/format-tag';
|
||||
import { useLocalStorageState } from 'hooks/useLocalStorageState.ts';
|
||||
import { useUiFlag } from 'hooks/useUiFlag.ts';
|
||||
|
||||
interface ICreateFeatureDialogProps {
|
||||
open: boolean;
|
||||
@ -112,9 +111,8 @@ const CreateFeatureDialogContent = ({
|
||||
{},
|
||||
60 * 60 * 1000, // <- 1 hour
|
||||
);
|
||||
const useFlagCreationCache = useUiFlag('createFlagDialogCache');
|
||||
|
||||
const initialData = useFlagCreationCache ? storedFlagConfig : {};
|
||||
const initialData = storedFlagConfig;
|
||||
|
||||
const {
|
||||
type,
|
||||
|
@ -86,7 +86,6 @@ export type UiFlags = {
|
||||
consumptionModelUI?: boolean;
|
||||
edgeObservability?: boolean;
|
||||
customMetrics?: boolean;
|
||||
createFlagDialogCache?: boolean;
|
||||
impactMetrics?: boolean;
|
||||
changeRequestApproverEmails?: boolean;
|
||||
reportUnknownFlags?: boolean;
|
||||
|
@ -56,7 +56,6 @@ export type IFlagKey =
|
||||
| 'reportUnknownFlags'
|
||||
| 'customMetrics'
|
||||
| 'impactMetrics'
|
||||
| 'createFlagDialogCache'
|
||||
| 'changeRequestApproverEmails'
|
||||
| 'paygTrialEvents'
|
||||
| 'paygInstanceStatsEvents'
|
||||
@ -260,10 +259,6 @@ const flags: IFlags = {
|
||||
process.env.UNLEASH_EXPERIMENTAL_REPORT_UNKNOWN_FLAGS,
|
||||
false,
|
||||
),
|
||||
createFlagDialogCache: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_CREATE_FLAG_DIALOG_CACHE,
|
||||
false,
|
||||
),
|
||||
changeRequestApproverEmails: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUEST_APPROVER_EMAILS,
|
||||
false,
|
||||
|
Loading…
Reference in New Issue
Block a user