From 8b5c333d3dca03ba51a5873b75451fbfafc5ae15 Mon Sep 17 00:00:00 2001 From: Eugene Date: Wed, 4 Sep 2024 13:11:33 +0200 Subject: [PATCH] feat(editor): Make highlighted data pane floating (#10638) Co-authored-by: oleg --- .../editor-ui/src/components/TagsDropdown.vue | 4 +- ...e => WorkflowExecutionAnnotationPanel.vue} | 261 +++++++----------- .../workflow/WorkflowExecutionsList.vue | 25 +- .../workflow/WorkflowExecutionsPreview.vue | 18 +- 4 files changed, 119 insertions(+), 189 deletions(-) rename packages/editor-ui/src/components/executions/workflow/{WorkflowExecutionAnnotationSidebar.vue => WorkflowExecutionAnnotationPanel.vue} (53%) diff --git a/packages/editor-ui/src/components/TagsDropdown.vue b/packages/editor-ui/src/components/TagsDropdown.vue index cae9c7462..2c25e455f 100644 --- a/packages/editor-ui/src/components/TagsDropdown.vue +++ b/packages/editor-ui/src/components/TagsDropdown.vue @@ -182,7 +182,7 @@ onClickOutside( () => { emit('blur'); }, - { ignore: [`.tags-dropdown-${dropdownId}`, '#tags-manager-modal'] }, + { ignore: [`.tags-dropdown-${dropdownId}`, '#tags-manager-modal'], detectIframe: true }, ); @@ -199,7 +199,7 @@ onClickOutside( multiple :reserve-keyword="false" loading-text="..." - :popper-class="['tags-dropdown', 'tags-dropdown-' + dropdownId]" + :popper-class="['tags-dropdown', 'tags-dropdown-' + dropdownId].join(' ')" data-test-id="tags-dropdown" @update:model-value="onTagsUpdated" @visible-change="onVisibleChange" diff --git a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionAnnotationSidebar.vue b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionAnnotationPanel.vue similarity index 53% rename from packages/editor-ui/src/components/executions/workflow/WorkflowExecutionAnnotationSidebar.vue rename to packages/editor-ui/src/components/executions/workflow/WorkflowExecutionAnnotationPanel.vue index 94ff1f406..1ae4ef0e5 100644 --- a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionAnnotationSidebar.vue +++ b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionAnnotationPanel.vue @@ -1,16 +1,32 @@ - diff --git a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue index 677046f4b..8fe995853 100644 --- a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue +++ b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue @@ -5,13 +5,20 @@ import { ElDropdown } from 'element-plus'; import { useExecutionDebugging } from '@/composables/useExecutionDebugging'; import { useMessage } from '@/composables/useMessage'; import WorkflowPreview from '@/components/WorkflowPreview.vue'; -import { MODAL_CONFIRM, VIEWS } from '@/constants'; +import { + EnterpriseEditionFeature, + EXECUTION_ANNOTATION_EXPERIMENT, + 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; @@ -32,6 +39,8 @@ const executionHelpers = useExecutionHelpers(); const message = useMessage(); const executionDebugging = useExecutionDebugging(); const workflowsStore = useWorkflowsStore(); +const posthogStore = usePostHog(); +const settingsStore = useSettingsStore(); const retryDropdownRef = ref(null); const workflowId = computed(() => route.params.name as string); @@ -57,6 +66,12 @@ const isRetriable = computed( () => !!props.execution && executionHelpers.isExecutionRetriable(props.execution), ); +const isAnnotationEnabled = computed( + () => + settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.AdvancedExecutionFilters] && + posthogStore.isFeatureEnabled(EXECUTION_ANNOTATION_EXPERIMENT), +); + async function onDeleteExecution(): Promise { const deleteConfirmed = await message.confirm( locale.baseText('executionDetails.confirmMessage.message'), @@ -115,6 +130,7 @@ function onRetryButtonBlur(event: FocusEvent) { :class="$style.executionDetails" :data-test-id="`execution-preview-details-${executionId}`" > +
{{ executionUIDetails?.startTime