From ab6e3432bd3f066eac867555c58117ae2fdf0bae Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 21 Aug 2026 06:07:12 -0400 Subject: [PATCH] =?UTF-8?q?feat(centralui):=20NodeBrowserDialog.Selectable?= =?UTF-8?q?NodeClasses=20=E2=80=94=20opt-in=20Object=20node=20selection=20?= =?UTF-8?q?(default=20unchanged)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01G2GHPnbbKGvyyfbr2XBRVH --- .../Dialogs/NodeBrowserDialog.razor | 43 ++++++++++++++---- .../Components/Dialogs/TreeRow.razor | 14 +++++- .../NodeBrowserDialogSelectionTests.cs | 44 +++++++++++++++++++ 3 files changed, 90 insertions(+), 11 deletions(-) diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Dialogs/NodeBrowserDialog.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Dialogs/NodeBrowserDialog.razor index 60b442d6..d6263749 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Dialogs/NodeBrowserDialog.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Dialogs/NodeBrowserDialog.razor @@ -56,12 +56,24 @@ @* A button, not an href="javascript:void(0)" anchor: this selects a node rather than navigating, and the pseudo-href was a CSP/a11y smell. Matches the tree - label in TreeRow.razor. *@ - + label in TreeRow.razor. A node class the caller does + not accept renders as plain text — nothing to click. *@ + @if (IsSelectable(node.NodeClass)) + { + + @if (node.NodeClass == BrowseNodeClass.Object) + { + object + } + } + else + { + @node.DisplayName + } @if (!string.IsNullOrEmpty(node.DataType)) { @node.DataType @@ -90,7 +102,7 @@ } @@ -113,6 +125,10 @@ }