From ee5fbc543ce1d33a56cf118dbd048d6693a15875 Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Wed, 11 Sep 2024 14:12:33 +0200 Subject: [PATCH] fix(If Node): Update copy for type conversion parameter (#10769) --- .../src/components/N8nInputLabel/InputLabel.vue | 9 +++++++++ packages/nodes-base/utils/constants.ts | 2 +- packages/nodes-base/utils/descriptions.ts | 5 +++-- packages/workflow/src/NodeParameters/FilterParameter.ts | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/design-system/src/components/N8nInputLabel/InputLabel.vue b/packages/design-system/src/components/N8nInputLabel/InputLabel.vue index d8f1845da..6c527549e 100644 --- a/packages/design-system/src/components/N8nInputLabel/InputLabel.vue +++ b/packages/design-system/src/components/N8nInputLabel/InputLabel.vue @@ -185,10 +185,19 @@ const addTargetBlank = (html: string) => } :root .tooltipPopper { + line-height: var(--font-line-height-compact); max-width: 400px; li { margin-left: var(--spacing-s); } + + code { + color: var(--color-text-dark); + font-size: var(--font-size-3xs); + background: var(--color-background-medium); + padding: var(--spacing-5xs); + border-radius: var(--border-radius-base); + } } diff --git a/packages/nodes-base/utils/constants.ts b/packages/nodes-base/utils/constants.ts index 592f23d90..2d85f8b26 100644 --- a/packages/nodes-base/utils/constants.ts +++ b/packages/nodes-base/utils/constants.ts @@ -4,4 +4,4 @@ export const NODE_RAN_MULTIPLE_TIMES_WARNING = export const LOCALHOST = '127.0.0.1'; export const ENABLE_LESS_STRICT_TYPE_VALIDATION = - "Try changing the type of comparison. Alternatively you can enable 'Convert Value Types'."; + "Try changing the type of comparison. Alternatively you can enable 'Convert types where required'."; diff --git a/packages/nodes-base/utils/descriptions.ts b/packages/nodes-base/utils/descriptions.ts index 6921ca8c6..d2fa59ac1 100644 --- a/packages/nodes-base/utils/descriptions.ts +++ b/packages/nodes-base/utils/descriptions.ts @@ -34,8 +34,9 @@ export const returnAllOrLimit: INodeProperties[] = [ ]; export const looseTypeValidationProperty: INodeProperties = { - displayName: 'Convert Value Types', - description: 'Whether to try casting value types based on the selected operator', + displayName: 'Convert types where required', + description: + 'If the type of an expression doesn\'t match the type of the comparison, n8n will try to cast the expression to the required type. E.g. for booleans "false" or 0 will be cast to false', name: 'looseTypeValidation', type: 'boolean', default: true, diff --git a/packages/workflow/src/NodeParameters/FilterParameter.ts b/packages/workflow/src/NodeParameters/FilterParameter.ts index 39ca0af9d..e1191394d 100644 --- a/packages/workflow/src/NodeParameters/FilterParameter.ts +++ b/packages/workflow/src/NodeParameters/FilterParameter.ts @@ -109,7 +109,7 @@ function parseFilterConditionValues( const getTypeDescription = (isStrict: boolean) => { if (isStrict) - return "Try changing the type of comparison. Alternatively you can enable 'Convert Value Types'."; + return "Try changing the type of comparison. Alternatively you can enable 'Convert types where required'."; return 'Try changing the type of the comparison.'; }; @@ -135,7 +135,7 @@ function parseFilterConditionValues( return `

Try either:

    -
  1. Enabling 'Convert Value Types'
  2. +
  3. Enabling 'Convert types where required'
  4. Converting the ${valuePosition} field to ${expectedType}${suggestFunction}
`;