From 51ec0970c32f5981870baeba432e0918bac1d1bf Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Fri, 13 Mar 2026 21:40:00 +0300 Subject: [PATCH] Add per-button tooltips to graph overlay and widen stream test modal - Each graph node overlay button now has its own tooltip (Edit, Delete, Start/Stop, Test, etc.) instead of inheriting the card name from the parent group - Widen #test-stream-modal to 700px (matching CSS source test modal) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --- server/src/wled_controller/static/css/modal.css | 3 ++- .../src/wled_controller/static/js/core/graph-nodes.js | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/server/src/wled_controller/static/css/modal.css b/server/src/wled_controller/static/css/modal.css index cbdfbe3..7f7bf47 100644 --- a/server/src/wled_controller/static/css/modal.css +++ b/server/src/wled_controller/static/css/modal.css @@ -346,7 +346,8 @@ margin: 0 4px; } -#test-css-source-modal .modal-content { +#test-css-source-modal .modal-content, +#test-stream-modal .modal-content { max-width: 700px; } diff --git a/server/src/wled_controller/static/js/core/graph-nodes.js b/server/src/wled_controller/static/js/core/graph-nodes.js index aabb6f2..885ef2c 100644 --- a/server/src/wled_controller/static/js/core/graph-nodes.js +++ b/server/src/wled_controller/static/js/core/graph-nodes.js @@ -346,6 +346,14 @@ function _createOverlay(node, nodeWidth, callbacks) { width: totalW, height: btnSize + 4, })); + const ACTION_LABELS = { + startstop: node.running ? 'Stop' : 'Start', + test: 'Test / Preview', + notify: 'Test notification', + edit: 'Edit', + delete: 'Delete', + }; + btns.forEach((btn, i) => { const bx = ox + 4 + i * (btnSize + btnGap); const by = oy + 2; @@ -354,6 +362,9 @@ function _createOverlay(node, nodeWidth, callbacks) { const txt = svgEl('text', { x: bx + btnSize / 2, y: by + btnSize / 2 }); txt.textContent = btn.icon; bg.appendChild(txt); + const btnTip = svgEl('title'); + btnTip.textContent = ACTION_LABELS[btn.action] || btn.action; + bg.appendChild(btnTip); bg.addEventListener('click', (e) => { e.stopPropagation(); if (btn.action === 'edit' && callbacks.onEditNode) callbacks.onEditNode(node);