Remove workflow feature flag (#12732)

Removing workflows from the lab
This commit is contained in:
Thomas Trompette
2025-06-19 15:26:00 +02:00
committed by GitHub
parent cbc0d06a2f
commit f9da3735de
25 changed files with 28 additions and 186 deletions
@@ -413,13 +413,11 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
shouldBeRegistered: ({
objectMetadataItem,
viewType,
isWorkflowEnabled,
getTargetObjectReadPermission,
}) =>
getTargetObjectReadPermission(CoreObjectNameSingular.Workflow) === true &&
(objectMetadataItem?.nameSingular !== CoreObjectNameSingular.Workflow ||
viewType === ActionViewType.SHOW_PAGE) &&
isWorkflowEnabled,
viewType === ActionViewType.SHOW_PAGE),
availableOn: [
ActionViewType.INDEX_PAGE_NO_SELECTION,
ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION,
@@ -4,18 +4,12 @@ import { ActionType } from '@/action-menu/actions/types/ActionType';
import { ActionMenuContext } from '@/action-menu/contexts/ActionMenuContext';
import { useActiveWorkflowVersionsWithManualTrigger } from '@/workflow/hooks/useActiveWorkflowVersionsWithManualTrigger';
import { useRunWorkflowVersion } from '@/workflow/hooks/useRunWorkflowVersion';
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
import { msg } from '@lingui/core/macro';
import { useContext } from 'react';
import { capitalize, isDefined } from 'twenty-shared/utils';
import { IconSettingsAutomation } from 'twenty-ui/display';
import { FeatureFlagKey } from '~/generated/graphql';
export const useRunWorkflowRecordAgnosticActions = () => {
const isWorkflowEnabled = useIsFeatureEnabled(
FeatureFlagKey.IS_WORKFLOW_ENABLED,
);
const { actionMenuType } = useContext(ActionMenuContext);
const { records: activeWorkflowVersions } =
@@ -27,10 +21,6 @@ export const useRunWorkflowRecordAgnosticActions = () => {
const { runWorkflowVersion } = useRunWorkflowVersion();
if (!isWorkflowEnabled) {
return [];
}
return activeWorkflowVersions
.map((activeWorkflowVersion, index) => {
if (!isDefined(activeWorkflowVersion.workflow)) {
@@ -8,7 +8,6 @@ import { WorkflowWithCurrentVersion } from '@/workflow/types/Workflow';
export type ShouldBeRegisteredFunctionParams = {
objectMetadataItem?: ObjectMetadataItem;
objectPermissions: ObjectPermissions;
isWorkflowEnabled: boolean;
recordFilters?: RecordFilter[];
isShowPage?: boolean;
isSoftDeleteFilterActive?: boolean;