From e7199dbfccdbdf1c4273f916e3006ca610c230e9 Mon Sep 17 00:00:00 2001 From: Eugene Date: Tue, 1 Oct 2024 15:24:52 +0200 Subject: [PATCH] feat(editor): Remove execution annotation feature flag (#11020) --- .../src/components/executions/ExecutionsFilter.vue | 10 ++-------- .../executions/global/GlobalExecutionsList.vue | 12 ++---------- .../executions/workflow/WorkflowExecutionsCard.vue | 10 ++-------- .../workflow/WorkflowExecutionsPreview.vue | 14 +++----------- packages/editor-ui/src/constants.ts | 1 - 5 files changed, 9 insertions(+), 38 deletions(-) diff --git a/packages/editor-ui/src/components/executions/ExecutionsFilter.vue b/packages/editor-ui/src/components/executions/ExecutionsFilter.vue index 08afe7cceb..b76b51f24d 100644 --- a/packages/editor-ui/src/components/executions/ExecutionsFilter.vue +++ b/packages/editor-ui/src/components/executions/ExecutionsFilter.vue @@ -8,10 +8,9 @@ import type { } from '@/Interface'; import { i18n as locale } from '@/plugins/i18n'; import { getObjectKeys, isEmpty } from '@/utils/typesUtils'; -import { EnterpriseEditionFeature, EXECUTION_ANNOTATION_EXPERIMENT } from '@/constants'; +import { EnterpriseEditionFeature } from '@/constants'; import { useSettingsStore } from '@/stores/settings.store'; import { useUIStore } from '@/stores/ui.store'; -import { usePostHog } from '@/stores/posthog.store'; import { useTelemetry } from '@/composables/useTelemetry'; import type { Placement } from '@floating-ui/core'; import { useDebounce } from '@/composables/useDebounce'; @@ -27,7 +26,6 @@ const DATE_TIME_MASK = 'YYYY-MM-DD HH:mm'; const settingsStore = useSettingsStore(); const uiStore = useUIStore(); -const posthogStore = usePostHog(); const { debounce } = useDebounce(); const telemetry = useTelemetry(); @@ -48,11 +46,7 @@ const isCustomDataFilterTracked = ref(false); const isAdvancedExecutionFilterEnabled = computed( () => settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.AdvancedExecutionFilters], ); -const isAnnotationFiltersEnabled = computed( - () => - isAdvancedExecutionFilterEnabled.value && - posthogStore.isFeatureEnabled(EXECUTION_ANNOTATION_EXPERIMENT), -); +const isAnnotationFiltersEnabled = computed(() => isAdvancedExecutionFilterEnabled.value); const showTags = computed(() => false); const getDefaultFilter = (): ExecutionFilterType => ({ diff --git a/packages/editor-ui/src/components/executions/global/GlobalExecutionsList.vue b/packages/editor-ui/src/components/executions/global/GlobalExecutionsList.vue index f526867d51..4673d420ad 100644 --- a/packages/editor-ui/src/components/executions/global/GlobalExecutionsList.vue +++ b/packages/editor-ui/src/components/executions/global/GlobalExecutionsList.vue @@ -2,11 +2,7 @@ import { watch, computed, ref, onMounted } from 'vue'; import ExecutionsFilter from '@/components/executions/ExecutionsFilter.vue'; import GlobalExecutionsListItem from '@/components/executions/global/GlobalExecutionsListItem.vue'; -import { - EnterpriseEditionFeature, - EXECUTION_ANNOTATION_EXPERIMENT, - MODAL_CONFIRM, -} from '@/constants'; +import { EnterpriseEditionFeature, MODAL_CONFIRM } from '@/constants'; import { useToast } from '@/composables/useToast'; import { useMessage } from '@/composables/useMessage'; import { useI18n } from '@/composables/useI18n'; @@ -17,7 +13,6 @@ import { useWorkflowsStore } from '@/stores/workflows.store'; import { useExecutionsStore } from '@/stores/executions.store'; import type { PermissionsRecord } from '@/permissions'; import { getResourcePermissions } from '@/permissions'; -import { usePostHog } from '@/stores/posthog.store'; import { useSettingsStore } from '@/stores/settings.store'; const props = withDefaults( @@ -42,7 +37,6 @@ const i18n = useI18n(); const telemetry = useTelemetry(); const workflowsStore = useWorkflowsStore(); const executionsStore = useExecutionsStore(); -const posthogStore = usePostHog(); const settingsStore = useSettingsStore(); const isMounted = ref(false); @@ -72,9 +66,7 @@ const workflows = computed(() => { }); const isAnnotationEnabled = computed( - () => - settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.AdvancedExecutionFilters] && - posthogStore.isFeatureEnabled(EXECUTION_ANNOTATION_EXPERIMENT), + () => settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.AdvancedExecutionFilters], ); watch( diff --git a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsCard.vue b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsCard.vue index 18ba430cb9..ff6631ab21 100644 --- a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsCard.vue +++ b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsCard.vue @@ -2,14 +2,13 @@ import { computed, onMounted } from 'vue'; import { useRoute } from 'vue-router'; import type { IExecutionUIData } from '@/composables/useExecutionHelpers'; -import { EnterpriseEditionFeature, EXECUTION_ANNOTATION_EXPERIMENT, VIEWS } from '@/constants'; +import { EnterpriseEditionFeature, VIEWS } from '@/constants'; import ExecutionsTime from '@/components/executions/ExecutionsTime.vue'; import { useExecutionHelpers } from '@/composables/useExecutionHelpers'; import type { ExecutionSummary } from 'n8n-workflow'; import { useWorkflowsStore } from '@/stores/workflows.store'; import { useI18n } from '@/composables/useI18n'; import type { PermissionsRecord } from '@/permissions'; -import { usePostHog } from '@/stores/posthog.store'; import { useSettingsStore } from '@/stores/settings.store'; import { toDayMonth, toTime } from '@/utils/formatters/dateFormatter'; @@ -30,17 +29,12 @@ const locale = useI18n(); const executionHelpers = useExecutionHelpers(); const workflowsStore = useWorkflowsStore(); -const posthogStore = usePostHog(); const settingsStore = useSettingsStore(); const isAdvancedExecutionFilterEnabled = computed( () => settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.AdvancedExecutionFilters], ); -const isAnnotationEnabled = computed( - () => - isAdvancedExecutionFilterEnabled.value && - posthogStore.isFeatureEnabled(EXECUTION_ANNOTATION_EXPERIMENT), -); +const isAnnotationEnabled = computed(() => isAdvancedExecutionFilterEnabled.value); const currentWorkflow = computed(() => (route.params.name as string) || workflowsStore.workflowId); const retryExecutionActions = computed(() => [ diff --git a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue index 9f06b080f0..afd8f96e13 100644 --- a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue +++ b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue @@ -4,20 +4,15 @@ import { useRoute } from 'vue-router'; import { ElDropdown } from 'element-plus'; import { useExecutionDebugging } from '@/composables/useExecutionDebugging'; import { useMessage } from '@/composables/useMessage'; +import WorkflowExecutionAnnotationPanel from '@/components/executions/workflow/WorkflowExecutionAnnotationPanel.ee.vue'; import WorkflowPreview from '@/components/WorkflowPreview.vue'; -import { - EnterpriseEditionFeature, - EXECUTION_ANNOTATION_EXPERIMENT, - MODAL_CONFIRM, - VIEWS, -} from '@/constants'; +import { EnterpriseEditionFeature, MODAL_CONFIRM, VIEWS } from '@/constants'; import type { ExecutionSummary } from 'n8n-workflow'; import type { IExecutionUIData } from '@/composables/useExecutionHelpers'; import { useExecutionHelpers } from '@/composables/useExecutionHelpers'; import { useWorkflowsStore } from '@/stores/workflows.store'; import { useI18n } from '@/composables/useI18n'; import { getResourcePermissions } from '@/permissions'; -import { usePostHog } from '@/stores/posthog.store'; import { useSettingsStore } from '@/stores/settings.store'; type RetryDropdownRef = InstanceType; @@ -39,7 +34,6 @@ const executionHelpers = useExecutionHelpers(); const message = useMessage(); const executionDebugging = useExecutionDebugging(); const workflowsStore = useWorkflowsStore(); -const posthogStore = usePostHog(); const settingsStore = useSettingsStore(); const retryDropdownRef = ref(null); @@ -67,9 +61,7 @@ const isRetriable = computed( ); const isAnnotationEnabled = computed( - () => - settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.AdvancedExecutionFilters] && - posthogStore.isFeatureEnabled(EXECUTION_ANNOTATION_EXPERIMENT), + () => settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.AdvancedExecutionFilters], ); const hasAnnotation = computed( diff --git a/packages/editor-ui/src/constants.ts b/packages/editor-ui/src/constants.ts index 40b3cba6f4..04d025abf2 100644 --- a/packages/editor-ui/src/constants.ts +++ b/packages/editor-ui/src/constants.ts @@ -693,7 +693,6 @@ export const MORE_ONBOARDING_OPTIONS_EXPERIMENT = { variant: 'variant', }; -export const EXECUTION_ANNOTATION_EXPERIMENT = '023_execution_annotation'; export const CREDENTIAL_DOCS_EXPERIMENT = { name: '024_credential_docs', control: 'control',