From 44728d72423f5549dda09589f4a618ebd80899cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Fri, 26 Jul 2024 14:30:49 +0200 Subject: [PATCH] feat(editor): Show new executions as `Queued` in the UI, until they actually start (#10204) --- packages/design-system/src/css/_tokens.scss | 1 + .../executions/ExecutionsFilter.vue | 1 + .../global/GlobalExecutionsListItem.vue | 19 ++++++++---- .../workflow/WorkflowExecutionsCard.vue | 10 +++++++ .../workflow/WorkflowExecutionsPreview.vue | 30 ++++++++++++------- .../__tests__/useExecutionHelpers.test.ts | 2 +- .../src/composables/useExecutionHelpers.ts | 11 +++++-- .../src/plugins/i18n/locales/en.json | 2 ++ 8 files changed, 58 insertions(+), 18 deletions(-) diff --git a/packages/design-system/src/css/_tokens.scss b/packages/design-system/src/css/_tokens.scss index 8e4050821..40bf465cf 100644 --- a/packages/design-system/src/css/_tokens.scss +++ b/packages/design-system/src/css/_tokens.scss @@ -225,6 +225,7 @@ --color-notification-background: var(--color-background-xlight); // Execution + --execution-card-border-new: var(--prim-gray-200); --execution-card-border-success: var(--prim-color-alt-a-tint-300); --execution-card-border-error: var(--prim-color-alt-c-tint-250); --execution-card-border-waiting: var(--prim-color-secondary-tint-300); diff --git a/packages/editor-ui/src/components/executions/ExecutionsFilter.vue b/packages/editor-ui/src/components/executions/ExecutionsFilter.vue index b3f59e342..4b3ea805b 100644 --- a/packages/editor-ui/src/components/executions/ExecutionsFilter.vue +++ b/packages/editor-ui/src/components/executions/ExecutionsFilter.vue @@ -84,6 +84,7 @@ const statuses = computed(() => [ { id: 'all', name: locale.baseText('executionsList.anyStatus') }, { id: 'error', name: locale.baseText('executionsList.error') }, { id: 'canceled', name: locale.baseText('executionsList.canceled') }, + { id: 'new', name: locale.baseText('executionsList.new') }, { id: 'running', name: locale.baseText('executionsList.running') }, { id: 'success', name: locale.baseText('executionsList.success') }, { id: 'waiting', name: locale.baseText('executionsList.waiting') }, diff --git a/packages/editor-ui/src/components/executions/global/GlobalExecutionsListItem.vue b/packages/editor-ui/src/components/executions/global/GlobalExecutionsListItem.vue index ac11a59dd..e6fc6dacf 100644 --- a/packages/editor-ui/src/components/executions/global/GlobalExecutionsListItem.vue +++ b/packages/editor-ui/src/components/executions/global/GlobalExecutionsListItem.vue @@ -92,7 +92,7 @@ const statusText = computed(() => { case 'crashed': return i18n.baseText('executionsList.error'); case 'new': - return i18n.baseText('executionsList.running'); + return i18n.baseText('executionsList.new'); case 'running': return i18n.baseText('executionsList.running'); case 'success': @@ -119,7 +119,7 @@ const statusTextTranslationPath = computed(() => { return 'executionsList.statusText'; } case 'new': - return 'executionsList.statusRunning'; + return 'executionsList.statusTextWithoutTime'; case 'running': return 'executionsList.statusRunning'; default: @@ -192,7 +192,10 @@ async function handleActionItemClick(commandData: Command) { {{ formattedStoppedAtDate }} - + @@ -334,7 +337,10 @@ async function handleActionItemClick(commandData: Command) { background: var(--execution-card-border-success); } - &.new td:first-child::before, + &.new td:first-child::before { + background: var(--execution-card-border-new); + } + &.running td:first-child::before { background: var(--execution-card-border-running); } @@ -382,7 +388,10 @@ async function handleActionItemClick(commandData: Command) { font-weight: var(--font-weight-normal); } - .new &, + .new { + color: var(--color-text-dark); + } + .running & { color: var(--color-warning); } diff --git a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsCard.vue b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsCard.vue index fc4907745..4c84a2704 100644 --- a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsCard.vue +++ b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsCard.vue @@ -208,6 +208,16 @@ export default defineComponent({ } } + &.new { + &, + & .executionLink { + border-left: var(--spacing-4xs) var(--border-style-base) var(--execution-card-border-new); + } + .statusLabel { + color: var(--color-text-dark); + } + } + &.waiting { &, & .executionLink { diff --git a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue index 1f36aea7a..af5c725a7 100644 --- a/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue +++ b/packages/editor-ui/src/components/executions/workflow/WorkflowExecutionsPreview.vue @@ -1,5 +1,13 @@