From 16f8b78b3996445c39a78ee4c18fe43dd96f1141 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Sat, 4 Feb 2023 11:16:28 +0900 Subject: [PATCH 1/5] Show scrollbar in notification dialog only when needed --- .../@node-red/editor-client/src/sass/notifications.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss b/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss index 7d7544e2e..c0e87b7ba 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/notifications.scss @@ -32,7 +32,7 @@ color: var(--red-ui-primary-text-color); border: 1px solid var(--red-ui-notification-border-default); border-left-width: 16px; - overflow: scroll; + overflow: auto; max-height: 80vh; .ui-dialog-buttonset { margin-top: 20px; From ede3ac4282578334256333e487e6817598e8807d Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Sat, 4 Feb 2023 20:55:34 +0900 Subject: [PATCH 2/5] Add tooltip for show/hide button on info sidebar --- .../@node-red/editor-client/locales/en-US/editor.json | 2 ++ .../@node-red/editor-client/locales/ja/editor.json | 2 ++ .../@node-red/editor-client/src/js/ui/tab-info-outliner.js | 4 ++++ 3 files changed, 8 insertions(+) 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 0300a220f..e6beed2e1 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 @@ -683,6 +683,8 @@ "empty": "empty", "globalConfig": "Global Configuration Nodes", "triggerAction": "Trigger action", + "showFlow": "Show", + "hideFlow": "Hide", "find": "Find in workspace" }, "help": { diff --git a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json index b07b8e583..b5939cec0 100644 --- a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json @@ -683,6 +683,8 @@ "empty": "空", "globalConfig": "グローバル設定ノード", "triggerAction": "アクションを実行", + "showFlow": "表示", + "hideFlow": "非表示", "find": "ワークスペース内を検索" }, "help": { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js index 32491f297..2dc18579f 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js @@ -135,6 +135,10 @@ RED.sidebar.info.outliner = (function() { RED.workspaces.show(n.id, null, true); } }); + RED.popover.tooltip(toggleVisibleButton, function () { + var isHidden = !div.hasClass("red-ui-info-outline-item-hidden"); + return RED._("sidebar.info." + (isHidden ? "hideFlow" : "showFlow")); + }); } if (n.type !== 'subflow') { var toggleButton = $('').appendTo(controls).on("click",function(evt) { From 4fda59a5858b1a40aef5474a1d3f3b17d02aa830 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Fri, 10 Feb 2023 16:49:29 +0900 Subject: [PATCH 3/5] Add validator for complete node --- .../@node-red/nodes/core/common/24-complete.html | 11 ++++++++++- .../@node-red/nodes/locales/en-US/messages.json | 5 ++++- .../@node-red/nodes/locales/ja/messages.json | 5 ++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/common/24-complete.html b/packages/node_modules/@node-red/nodes/core/common/24-complete.html index b2d406bb5..2f68a0fcf 100644 --- a/packages/node_modules/@node-red/nodes/core/common/24-complete.html +++ b/packages/node_modules/@node-red/nodes/core/common/24-complete.html @@ -18,7 +18,16 @@ color:"#c0edc0", defaults: { name: {value:""}, - scope: {value:[], type:"*[]"}, + scope: { + value: [], + type: "*[]", + validate: function (v, opt) { + if (v.length > 0) { + return true; + } + return RED._("node-red:complete.errors.scopeUndefined"); + } + }, uncaught: {value:false} }, inputs:0, diff --git a/packages/node_modules/@node-red/nodes/locales/en-US/messages.json b/packages/node_modules/@node-red/nodes/locales/en-US/messages.json index 7fcd5eadc..a683b1552 100644 --- a/packages/node_modules/@node-red/nodes/locales/en-US/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/en-US/messages.json @@ -119,7 +119,10 @@ } }, "complete": { - "completeNodes": "complete: __number__" + "completeNodes": "complete: __number__", + "errors": { + "scopeUndefined": "scope undefined" + } }, "debug": { "output": "Output", diff --git a/packages/node_modules/@node-red/nodes/locales/ja/messages.json b/packages/node_modules/@node-red/nodes/locales/ja/messages.json index b7fa20b02..cc93e92b1 100644 --- a/packages/node_modules/@node-red/nodes/locales/ja/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/ja/messages.json @@ -119,7 +119,10 @@ } }, "complete": { - "completeNodes": "complete: __number__" + "completeNodes": "complete: __number__", + "errors": { + "scopeUndefined": "スコープが未定義" + } }, "debug": { "output": "対象", From 81331e68d2e4a64c24b22feb59e97e1ad8a2281f Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Fri, 10 Feb 2023 18:55:10 +0900 Subject: [PATCH 4/5] Add validator for link call node --- .../@node-red/nodes/core/common/60-link.html | 13 +++++++++++-- .../@node-red/nodes/core/common/60-link.js | 4 ++-- .../@node-red/nodes/locales/en-US/messages.json | 5 +++-- .../@node-red/nodes/locales/ja/messages.json | 5 +++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/common/60-link.html b/packages/node_modules/@node-red/nodes/core/common/60-link.html index 4b8c9a3d6..5c16929c3 100644 --- a/packages/node_modules/@node-red/nodes/core/common/60-link.html +++ b/packages/node_modules/@node-red/nodes/core/common/60-link.html @@ -1,4 +1,3 @@ -