From ea6a4fd5a60a4efbd1f9513b714d461e86714f36 Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Thu, 28 Mar 2024 11:39:08 +0100 Subject: [PATCH 1/7] Increase expression input height in filter and assignment component --- .../src/components/AssignmentCollection/Assignment.vue | 2 -- .../editor-ui/src/components/FilterConditions/Condition.vue | 2 -- 2 files changed, 4 deletions(-) diff --git a/packages/editor-ui/src/components/AssignmentCollection/Assignment.vue b/packages/editor-ui/src/components/AssignmentCollection/Assignment.vue index c1ee16976b52e..f18b5d5c81142 100644 --- a/packages/editor-ui/src/components/AssignmentCollection/Assignment.vue +++ b/packages/editor-ui/src/components/AssignmentCollection/Assignment.vue @@ -169,7 +169,6 @@ const onBlur = (): void => { display-options hide-label hide-hint - :rows="3" :is-read-only="isReadOnly" :parameter="nameParameter" :value="assignment.name" @@ -196,7 +195,6 @@ const onBlur = (): void => { hide-label hide-issues hide-hint - :rows="3" is-assignment :is-read-only="isReadOnly" :options-position="breakpoint === 'default' ? 'top' : 'bottom'" diff --git a/packages/editor-ui/src/components/FilterConditions/Condition.vue b/packages/editor-ui/src/components/FilterConditions/Condition.vue index 18eb28b03415e..e3b1be0e1878e 100644 --- a/packages/editor-ui/src/components/FilterConditions/Condition.vue +++ b/packages/editor-ui/src/components/FilterConditions/Condition.vue @@ -156,7 +156,6 @@ const onBlur = (): void => { hide-label hide-hint hide-issues - :rows="3" :is-read-only="readOnly" :parameter="leftParameter" :value="condition.leftValue" @@ -181,7 +180,6 @@ const onBlur = (): void => { hide-label hide-hint hide-issues - :rows="3" :is-read-only="readOnly" :options-position="breakpoint === 'default' ? 'top' : 'bottom'" :parameter="rightParameter" From 596b56c78579e6f88165cbeb9802a467bcbe4f3d Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Thu, 28 Mar 2024 11:39:34 +0100 Subject: [PATCH 2/7] Add error message to parseJson extension method --- packages/workflow/src/Extensions/StringExtensions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/workflow/src/Extensions/StringExtensions.ts b/packages/workflow/src/Extensions/StringExtensions.ts index 88728fc400cbb..15b0f32f2774d 100644 --- a/packages/workflow/src/Extensions/StringExtensions.ts +++ b/packages/workflow/src/Extensions/StringExtensions.ts @@ -382,7 +382,10 @@ function parseJson(value: string): unknown { try { return JSON.parse(value); } catch (error) { - return undefined; + if (value.includes("'")) { + throw new ExpressionExtensionError("Parsing failed. Check you're using double quotes"); + } + throw new ExpressionExtensionError('Parsing failed'); } } From 0587ca2f9c9f5b960220faf959a14f52b7d075cc Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Thu, 28 Mar 2024 11:40:09 +0100 Subject: [PATCH 3/7] Make [empty] color lighter in expression output dropdown --- .../InlineExpressionEditorOutput.vue | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/editor-ui/src/components/InlineExpressionEditor/InlineExpressionEditorOutput.vue b/packages/editor-ui/src/components/InlineExpressionEditor/InlineExpressionEditorOutput.vue index 65102dabbe198..19279c5e29f73 100644 --- a/packages/editor-ui/src/components/InlineExpressionEditor/InlineExpressionEditorOutput.vue +++ b/packages/editor-ui/src/components/InlineExpressionEditor/InlineExpressionEditorOutput.vue @@ -45,21 +45,24 @@ const resolvedExpression = computed(() => { }); const plaintextSegments = computed(() => { - if (props.segments.length === 0) { - return [ - { - from: 0, - to: resolvedExpression.value.length - 1, - plaintext: resolvedExpression.value, - kind: 'plaintext', - }, - ]; - } - return props.segments.filter((s): s is Plaintext => s.kind === 'plaintext'); }); const resolvedSegments = computed(() => { + if (props.segments.length === 0) { + const emptyExpression = resolvedExpression.value; + const emptySegment: Resolved = { + from: 0, + to: emptyExpression.length, + kind: 'resolvable', + error: null, + resolvable: '', + resolved: emptyExpression, + state: 'pending', + }; + return [emptySegment]; + } + let cursor = 0; return props.segments @@ -69,8 +72,8 @@ const resolvedSegments = computed(() => { segment.kind === 'plaintext' ? segment.plaintext.length : segment.resolved - ? (segment.resolved as string | number | boolean).toString().length - : 0; + ? (segment.resolved as string | number | boolean).toString().length + : 0; segment.to = cursor; return segment; }) From 014785764b86da9dd29c80bec43544cb232e3dda Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Thu, 28 Mar 2024 11:40:33 +0100 Subject: [PATCH 4/7] Remove rounded corners in fixed fields with the popunder on --- packages/editor-ui/src/components/ParameterInputFull.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/ParameterInputFull.vue b/packages/editor-ui/src/components/ParameterInputFull.vue index ceda6d05d75e7..20c7a81d5d729 100644 --- a/packages/editor-ui/src/components/ParameterInputFull.vue +++ b/packages/editor-ui/src/components/ParameterInputFull.vue @@ -1,6 +1,6 @@