From f58c961d98347d2dd82feb62c26bcd4f44d9c583 Mon Sep 17 00:00:00 2001 From: Marie <51697796+ijreilly@users.noreply.github.com> Date: Mon, 27 May 2024 16:05:22 +0200 Subject: [PATCH] Remove feature flag for Links field (#5606) --- .../src/modules/workspace/types/FeatureFlagKey.ts | 3 +-- .../SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx | 4 ---- packages/twenty-front/src/testing/mock-data/users.ts | 6 ------ .../src/database/typeorm-seeds/core/feature-flags.ts | 5 ----- .../engine/core-modules/feature-flag/feature-flag.entity.ts | 1 - .../commands/add-standard-id.command.ts | 2 -- 6 files changed, 1 insertion(+), 20 deletions(-) diff --git a/packages/twenty-front/src/modules/workspace/types/FeatureFlagKey.ts b/packages/twenty-front/src/modules/workspace/types/FeatureFlagKey.ts index ffbb483ca9..cb6262c2d0 100644 --- a/packages/twenty-front/src/modules/workspace/types/FeatureFlagKey.ts +++ b/packages/twenty-front/src/modules/workspace/types/FeatureFlagKey.ts @@ -4,5 +4,4 @@ export type FeatureFlagKey = | 'IS_EVENT_OBJECT_ENABLED' | 'IS_AIRTABLE_INTEGRATION_ENABLED' | 'IS_POSTGRESQL_INTEGRATION_ENABLED' - | 'IS_STRIPE_INTEGRATION_ENABLED' - | 'IS_LINKS_FIELD_ENABLED'; + | 'IS_STRIPE_INTEGRATION_ENABLED'; diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx index 78fcf95781..37cd74c656 100644 --- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx +++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx @@ -32,7 +32,6 @@ import { Section } from '@/ui/layout/section/components/Section'; import { Breadcrumb } from '@/ui/navigation/bread-crumb/components/Breadcrumb'; import { View } from '@/views/types/View'; import { ViewType } from '@/views/types/ViewType'; -import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled'; import { FieldMetadataType } from '~/generated-metadata/graphql'; import { isDefined } from '~/utils/isDefined'; import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull'; @@ -112,8 +111,6 @@ export const SettingsObjectNewFieldStep2 = () => { const { createOneRelationMetadataItem: createOneRelationMetadata } = useCreateOneRelationMetadataItem(); - const isLinksFieldEnabled = useIsFeatureEnabled('IS_LINKS_FIELD_ENABLED'); - if (!activeObjectMetadataItem) return null; const canSave = @@ -263,7 +260,6 @@ export const SettingsObjectNewFieldStep2 = () => { FieldMetadataType.Email, FieldMetadataType.FullName, FieldMetadataType.Link, - isLinksFieldEnabled ? undefined : FieldMetadataType.Links, FieldMetadataType.Numeric, FieldMetadataType.Probability, FieldMetadataType.Uuid, diff --git a/packages/twenty-front/src/testing/mock-data/users.ts b/packages/twenty-front/src/testing/mock-data/users.ts index d9a3dd43de..f3e1238f12 100644 --- a/packages/twenty-front/src/testing/mock-data/users.ts +++ b/packages/twenty-front/src/testing/mock-data/users.ts @@ -50,12 +50,6 @@ export const mockDefaultWorkspace: Workspace = { value: true, workspaceId: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6w', }, - { - id: '1492de61-5018-4368-8923-4f1eeaf988c7', - key: 'IS_LINKS_FIELD_ENABLED', - value: true, - workspaceId: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6w', - }, ], createdAt: '2023-04-26T10:23:42.33625+00:00', updatedAt: '2023-04-26T10:23:42.33625+00:00', diff --git a/packages/twenty-server/src/database/typeorm-seeds/core/feature-flags.ts b/packages/twenty-server/src/database/typeorm-seeds/core/feature-flags.ts index 2e53652125..cb88f801f9 100644 --- a/packages/twenty-server/src/database/typeorm-seeds/core/feature-flags.ts +++ b/packages/twenty-server/src/database/typeorm-seeds/core/feature-flags.ts @@ -45,11 +45,6 @@ export const seedFeatureFlags = async ( workspaceId: workspaceId, value: true, }, - { - key: FeatureFlagKeys.IsLinksFieldEnabled, - workspaceId: workspaceId, - value: true, - }, { key: FeatureFlagKeys.IsContactCreationForSentAndReceivedEmailsEnabled, workspaceId: workspaceId, diff --git a/packages/twenty-server/src/engine/core-modules/feature-flag/feature-flag.entity.ts b/packages/twenty-server/src/engine/core-modules/feature-flag/feature-flag.entity.ts index 03618d83bb..71e823ad18 100644 --- a/packages/twenty-server/src/engine/core-modules/feature-flag/feature-flag.entity.ts +++ b/packages/twenty-server/src/engine/core-modules/feature-flag/feature-flag.entity.ts @@ -22,7 +22,6 @@ export enum FeatureFlagKeys { IsPostgreSQLIntegrationEnabled = 'IS_POSTGRESQL_INTEGRATION_ENABLED', IsStripeIntegrationEnabled = 'IS_STRIPE_INTEGRATION_ENABLED', IsGmailSyncV2Enabled = 'IS_GMAIL_SYNC_V2_ENABLED', - IsLinksFieldEnabled = 'IS_LINKS_FIELD_ENABLED', IsContactCreationForSentAndReceivedEmailsEnabled = 'IS_CONTACT_CREATION_FOR_SENT_AND_RECEIVED_EMAILS_ENABLED', } diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/commands/add-standard-id.command.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/commands/add-standard-id.command.ts index 89e3136a94..e08c2cf154 100644 --- a/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/commands/add-standard-id.command.ts +++ b/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/commands/add-standard-id.command.ts @@ -59,7 +59,6 @@ export class AddStandardIdCommand extends CommandRunner { IS_POSTGRESQL_INTEGRATION_ENABLED: true, IS_STRIPE_INTEGRATION_ENABLED: false, IS_GMAIL_SYNC_V2_ENABLED: true, - IS_LINKS_FIELD_ENABLED: true, IS_CONTACT_CREATION_FOR_SENT_AND_RECEIVED_EMAILS_ENABLED: true, }, ); @@ -76,7 +75,6 @@ export class AddStandardIdCommand extends CommandRunner { IS_POSTGRESQL_INTEGRATION_ENABLED: true, IS_STRIPE_INTEGRATION_ENABLED: false, IS_GMAIL_SYNC_V2_ENABLED: true, - IS_LINKS_FIELD_ENABLED: true, IS_CONTACT_CREATION_FOR_SENT_AND_RECEIVED_EMAILS_ENABLED: true, }, );