From 1f3559e14fd89404a2e59a32e3514400cab23ebd Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Sat, 1 Apr 2023 02:28:48 +0900 Subject: [PATCH 01/11] Set label width in quick add dialog to prevent broken node icon --- .../node_modules/@node-red/editor-client/src/sass/search.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/node_modules/@node-red/editor-client/src/sass/search.scss b/packages/node_modules/@node-red/editor-client/src/sass/search.scss index f5502715b..2661f4164 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/search.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/search.scss @@ -108,6 +108,7 @@ } .red-ui-search-result-node-label { color: var(--red-ui-secondary-text-color); + width: 240px; } } From 8e4933041d655553ba4ac1fbf2956653e1df2466 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Sat, 1 Apr 2023 02:34:11 +0900 Subject: [PATCH 02/11] Wrap text of label in quick add dialog --- .../node_modules/@node-red/editor-client/src/sass/search.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/node_modules/@node-red/editor-client/src/sass/search.scss b/packages/node_modules/@node-red/editor-client/src/sass/search.scss index 2661f4164..66ade8798 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/search.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/search.scss @@ -109,6 +109,7 @@ .red-ui-search-result-node-label { color: var(--red-ui-secondary-text-color); width: 240px; + overflow-wrap: anywhere; } } From 3c66af9506bcbea6a2035305ffacab76b8319139 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Wed, 5 Apr 2023 00:44:10 +0900 Subject: [PATCH 03/11] Wrap long node name in tooltip and node property --- .../node_modules/@node-red/editor-client/src/sass/editor.scss | 2 +- .../node_modules/@node-red/editor-client/src/sass/popover.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/sass/editor.scss b/packages/node_modules/@node-red/editor-client/src/sass/editor.scss index b6d12faf2..f6f8eb4c1 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/editor.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/editor.scss @@ -124,7 +124,7 @@ list-style-type: none; margin: 0; padding:0; - + overflow-wrap: anywhere; li { display: inline-block; padding:0; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/popover.scss b/packages/node_modules/@node-red/editor-client/src/sass/popover.scss index 7e504b59b..53d1c7cab 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/popover.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/popover.scss @@ -35,6 +35,7 @@ padding: 8px; border-radius: 2px; background: var(--red-ui-popover-background); + overflow-wrap: anywhere; } .red-ui-popover:after, .red-ui-popover:before { border: solid transparent; From 2eaae4b83f33d5bc08563c40f548423995247936 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Wed, 5 Apr 2023 00:56:27 +0900 Subject: [PATCH 04/11] Wrap long node name in info sidebar --- .../node_modules/@node-red/editor-client/src/sass/tab-info.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss b/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss index 57dc7d6e3..2d7344df2 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss @@ -31,6 +31,7 @@ > span { display: inline-block; margin-left: 5px; + overflow-wrap: anywhere; } border-bottom: 1px solid var(--red-ui-secondary-border-color); } From 7b71d8d2120a506c4eb882b5e52a0d1a5e7eed0d Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Mon, 10 Apr 2023 01:25:34 +0900 Subject: [PATCH 05/11] Support uppercase in keyword when searching action list --- .../@node-red/editor-client/src/js/ui/actionList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js index 4886deabb..d949899ca 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js @@ -47,7 +47,7 @@ RED.actionList = (function() { var searchDiv = $("
",{class:"red-ui-search-container"}).appendTo(dialog); searchInput = $('').appendTo(searchDiv).searchBox({ change: function() { - filterTerm = $(this).val().trim(); + filterTerm = $(this).val().trim().toLowerCase(); filterTerms = filterTerm.split(" "); searchResults.editableList('filter'); searchResults.find("li.selected").removeClass("selected"); From df3dc36874ea4b41895f161b85c4e5463e5a5ab7 Mon Sep 17 00:00:00 2001 From: Mauricio Bonani Date: Mon, 17 Apr 2023 10:57:40 -0400 Subject: [PATCH 06/11] Fix palette filter background --- .../node_modules/@node-red/editor-client/src/sass/palette.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/sass/palette.scss b/packages/node_modules/@node-red/editor-client/src/sass/palette.scss index fdfe77f09..e4071b9db 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/palette.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/palette.scss @@ -55,7 +55,7 @@ .red-ui-palette-search { position: relative; overflow: hidden; - background: var(--red-ui-secondary-background); + background: var(--red-ui-form-input-background); text-align: center; height: 35px; padding: 3px; From c30e57c31d6b43ca76303b41e70fdd36680a6203 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Sun, 23 Apr 2023 20:47:17 +0900 Subject: [PATCH 07/11] Add node width and height to boundingBox --- .../editor-client/src/js/ui/subflow.js | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js index 43e525070..abe6402db 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js @@ -663,24 +663,23 @@ RED.subflow = (function() { var candidateOutputs = []; var candidateInputNodes = {}; - var boundingBox = [nodeList[0].x, - nodeList[0].y, - nodeList[0].x, - nodeList[0].y]; + var boundingBox = [nodeList[0].x-(nodeList[0].w/2), + nodeList[0].y-(nodeList[0].h/2), + nodeList[0].x+(nodeList[0].w/2), + nodeList[0].y+(nodeList[0].h/2)]; for (i=0;i Date: Mon, 24 Apr 2023 11:51:06 +0200 Subject: [PATCH 08/11] Solved node red not loading without error when subflow is missing --- .../@node-red/editor-client/src/js/nodes.js | 29 +++++++++++++------ .../editor-client/src/js/ui/editor.js | 10 ++++--- .../@node-red/runtime/lib/flows/util.js | 2 +- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/nodes.js b/packages/node_modules/@node-red/editor-client/src/js/nodes.js index 865636b24..94bdbfcf7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/nodes.js +++ b/packages/node_modules/@node-red/editor-client/src/js/nodes.js @@ -2095,16 +2095,27 @@ RED.nodes = (function() { } else if (n.type.substring(0,7) === "subflow") { var parentId = n.type.split(":")[1]; var subflow = subflow_denylist[parentId]||subflow_map[parentId]||getSubflow(parentId); - if (createNewIds || options.importMap[n.id] === "copy") { - parentId = subflow.id; - node.type = "subflow:"+parentId; - node._def = registry.getNodeType(node.type); - delete node.i; + if (!subflow){ + node._def = { + color:"#fee", + defaults: {}, + label: "unknown: "+n.type, + labelStyle: "red-ui-flow-node-label-italic", + outputs: n.outputs|| (n.wires && n.wires.length) || 0, + set: registry.getNodeSet("node-red/unknown") + } + } else { + if (createNewIds || options.importMap[n.id] === "copy") { + parentId = subflow.id; + node.type = "subflow:"+parentId; + node._def = registry.getNodeType(node.type); + delete node.i; + } + node.name = n.name; + node.outputs = subflow.out.length; + node.inputs = subflow.in.length; + node.env = n.env; } - node.name = n.name; - node.outputs = subflow.out.length; - node.inputs = subflow.in.length; - node.env = n.env; } else if (n.type === 'junction') { node._def = {defaults:{}} node._config.x = node.x diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index da7954625..188819734 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -45,11 +45,13 @@ RED.editor = (function() { var hasChanged; if (node.type.indexOf("subflow:")===0) { subflow = RED.nodes.subflow(node.type.substring(8)); - isValid = subflow.valid; - hasChanged = subflow.changed; - if (isValid === undefined) { - isValid = validateNode(subflow); + if (subflow){ + isValid = subflow.valid; hasChanged = subflow.changed; + if (isValid === undefined) { + isValid = validateNode(subflow); + hasChanged = subflow.changed; + } } validationErrors = validateNodeProperties(node, node._def.defaults, node); node.valid = isValid && validationErrors.length === 0; diff --git a/packages/node_modules/@node-red/runtime/lib/flows/util.js b/packages/node_modules/@node-red/runtime/lib/flows/util.js index 7c98fc041..74e046f45 100644 --- a/packages/node_modules/@node-red/runtime/lib/flows/util.js +++ b/packages/node_modules/@node-red/runtime/lib/flows/util.js @@ -199,7 +199,7 @@ function parseConfig(config) { if (subflowDetails) { var subflowType = subflowDetails[1] n.subflow = subflowType; - flow.subflows[subflowType].instances.push(n) + if (flow.subflows[subflowType]) flow.subflows[subflowType].instances.push(n) } if (container) { container.nodes[n.id] = n; From 841f1849c8b38a4a32ac996ffab916bb20744a20 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 28 Apr 2023 15:25:29 +0100 Subject: [PATCH 09/11] Update packages/node_modules/@node-red/runtime/lib/flows/util.js --- packages/node_modules/@node-red/runtime/lib/flows/util.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/runtime/lib/flows/util.js b/packages/node_modules/@node-red/runtime/lib/flows/util.js index 74e046f45..83665b589 100644 --- a/packages/node_modules/@node-red/runtime/lib/flows/util.js +++ b/packages/node_modules/@node-red/runtime/lib/flows/util.js @@ -199,7 +199,9 @@ function parseConfig(config) { if (subflowDetails) { var subflowType = subflowDetails[1] n.subflow = subflowType; - if (flow.subflows[subflowType]) flow.subflows[subflowType].instances.push(n) + if (flow.subflows[subflowType]) { + flow.subflows[subflowType].instances.push(n) + } } if (container) { container.nodes[n.id] = n; From 246409970d8e6dad0b1449cf1d8a15a28ece24d7 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 28 Apr 2023 17:17:40 +0100 Subject: [PATCH 10/11] Remove coveralls reporting as it is failing builds --- .github/workflows/tests.yml | 10 +++++----- README.md | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 28d3c1b32..1c437ba8c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,8 +29,8 @@ jobs: - name: Run tests run: | npm run test - - name: Publish to coveralls.io - if: ${{ matrix.node-version == 14 }} - uses: coverallsapp/github-action@v1.1.2 - with: - github-token: ${{ github.token }} + # - name: Publish to coveralls.io + # if: ${{ matrix.node-version == 14 }} + # uses: coverallsapp/github-action@v1.1.2 + # with: + # github-token: ${{ github.token }} diff --git a/README.md b/README.md index 06310a220..a888ef166 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ http://nodered.org [![Build Status](https://github.com/node-red/node-red/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/node-red/node-red/actions?query=branch%3Amaster) -[![Coverage Status](https://coveralls.io/repos/node-red/node-red/badge.svg?branch=master)](https://coveralls.io/r/node-red/node-red?branch=master) Low-code programming for event-driven applications. From 86dfe8681370343ea42817b6259dec8fbc67f47e Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 28 Apr 2023 17:47:16 +0100 Subject: [PATCH 11/11] Add editor scope to keyboard shortcut scope select --- .../@node-red/editor-client/locales/en-US/editor.json | 1 + .../@node-red/editor-client/src/js/ui/keyboard.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json index e6beed2e1..5474d1a23 100644 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json @@ -491,6 +491,7 @@ "unassigned": "Unassigned", "global": "global", "workspace": "workspace", + "editor": "edit dialog", "selectAll": "Select all", "selectNone": "Select none", "selectAllConnected": "Select connected", diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js b/packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js index 40e11aa72..a081656fc 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js @@ -491,7 +491,11 @@ RED.keyboard = (function() { okButton.attr("disabled",!valid); }); - var scopeSelect = $('').appendTo(scope); + var scopeSelect = $('').appendTo(scope); scopeSelect.i18n(); if (object.scope === "workspace") { object.scope = "red-ui-workspace";