From 4cd87191e50e7501a3ff7a7e5cb477da10044d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Tue, 18 Apr 2023 15:39:49 +0200 Subject: [PATCH 01/18] :construction: Quick test --- .../src/components/ParameterInputWrapper.vue | 18 +++++++++++++++--- packages/editor-ui/src/utils/htmlUtils.ts | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/editor-ui/src/components/ParameterInputWrapper.vue b/packages/editor-ui/src/components/ParameterInputWrapper.vue index d1f2c73ebb164..707d855406c13 100644 --- a/packages/editor-ui/src/components/ParameterInputWrapper.vue +++ b/packages/editor-ui/src/components/ParameterInputWrapper.vue @@ -31,6 +31,7 @@ :highlight="!!(expressionOutput && targetItem)" :hint="expressionOutput" :singleLine="true" + renderHTML /> "${whitespaced}"`; + }, onFocus() { this.$emit('focus'); }, @@ -221,6 +229,10 @@ export default mixins(showMessage, workflowHelpers).extend({ diff --git a/packages/editor-ui/src/components/ParameterInputWrapper.vue b/packages/editor-ui/src/components/ParameterInputWrapper.vue index 707d855406c13..14ef22ebfc3d9 100644 --- a/packages/editor-ui/src/components/ParameterInputWrapper.vue +++ b/packages/editor-ui/src/components/ParameterInputWrapper.vue @@ -31,7 +31,6 @@ :highlight="!!(expressionOutput && targetItem)" :hint="expressionOutput" :singleLine="true" - renderHTML /> "${whitespaced}"`; - }, onFocus() { this.$emit('focus'); }, @@ -229,10 +223,6 @@ export default mixins(showMessage, workflowHelpers).extend({ From ed8a1661d394f0ae11661c77e9796b9cea9feea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Thu, 20 Apr 2023 12:33:18 +0200 Subject: [PATCH 07/18] :rewind: New requirement changes --- packages/editor-ui/src/components/ParameterInputHint.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/ParameterInputHint.vue b/packages/editor-ui/src/components/ParameterInputHint.vue index f0a39b4e0a1cd..ead77cf8dfc4a 100644 --- a/packages/editor-ui/src/components/ParameterInputHint.vue +++ b/packages/editor-ui/src/components/ParameterInputHint.vue @@ -2,7 +2,11 @@
{{ hint }}
@@ -56,4 +60,7 @@ export default Vue.extend({ .highlight { color: var(--color-secondary); } +.preserve-whitespace { + white-space: pre; +} From c535807617628a3cac746d2c804e234ce6478730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Thu, 20 Apr 2023 12:54:41 +0200 Subject: [PATCH 08/18] :bug: Prevent excess whitespace from HTML formatting --- .../src/components/ParameterInputHint.vue | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/editor-ui/src/components/ParameterInputHint.vue b/packages/editor-ui/src/components/ParameterInputHint.vue index ead77cf8dfc4a..9c2b887c34778 100644 --- a/packages/editor-ui/src/components/ParameterInputHint.vue +++ b/packages/editor-ui/src/components/ParameterInputHint.vue @@ -1,15 +1,6 @@ @@ -162,7 +160,6 @@ export default mixins(showMessage, workflowHelpers).extend({ }, expressionValueComputed(): string | null { const value = isResourceLocatorValue(this.value) ? this.value.value : this.value; - if (!this.activeNode || !this.isValueExpression || typeof value !== 'string') { return null; } From b8873ad14809927e1bc8a6cf0036accc2b71925d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Tue, 2 May 2023 10:47:03 +0200 Subject: [PATCH 17/18] :test_tube: Fix e2e test --- cypress/e2e/14-mapping.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/14-mapping.cy.ts b/cypress/e2e/14-mapping.cy.ts index 8c4d6f9cdbe05..65354796000a7 100644 --- a/cypress/e2e/14-mapping.cy.ts +++ b/cypress/e2e/14-mapping.cy.ts @@ -205,7 +205,7 @@ describe('Data mapping', () => { 'have.text', `{{ $node['${SCHEDULE_TRIGGER_NODE_NAME}'].json.input[0].count }} {{ $node['${SCHEDULE_TRIGGER_NODE_NAME}'].json.input }}`, ); - ndv.getters.parameterExpressionPreview('value').should('include.text', '[empty]'); + ndv.getters.parameterExpressionPreview('value').should('include.text', ' '); ndv.actions.selectInputNode('Set'); From 9bfc901a57629cbfac34336c8d671ba981b7e798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Tue, 2 May 2023 11:07:28 +0200 Subject: [PATCH 18/18] :test_tube: Tighten text check --- cypress/e2e/14-mapping.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/14-mapping.cy.ts b/cypress/e2e/14-mapping.cy.ts index 65354796000a7..afab75190e641 100644 --- a/cypress/e2e/14-mapping.cy.ts +++ b/cypress/e2e/14-mapping.cy.ts @@ -205,7 +205,7 @@ describe('Data mapping', () => { 'have.text', `{{ $node['${SCHEDULE_TRIGGER_NODE_NAME}'].json.input[0].count }} {{ $node['${SCHEDULE_TRIGGER_NODE_NAME}'].json.input }}`, ); - ndv.getters.parameterExpressionPreview('value').should('include.text', ' '); + ndv.getters.parameterExpressionPreview('value').should('have.text', ' '); ndv.actions.selectInputNode('Set');