Improve admin field names and generation-safe dialog lifecycle

This commit is contained in:
Joseph Doherty
2026-11-13 21:15:58 -05:00
parent 06b1743051
commit 169149f1eb
82 changed files with 15839 additions and 73 deletions
@@ -63,6 +63,7 @@
NodeName="@_msgNodeName" OnClose="CloseMessage" />
@code {
private readonly string _labelScope = "raw-control-" + Guid.NewGuid().ToString("N") + "-";
/// <summary>The top-level Raw nodes to render (the enterprise roots from <c>LoadRootsAsync</c>).</summary>
[Parameter, EditorRequired] public IReadOnlyList<RawNode> Roots { get; set; } = default!;
@@ -189,7 +190,7 @@
break;
default:
<div @key="row.Key" class="small py-1" style="@($"padding-left:{row.Depth * 18}px")">
<button type="button" class="btn btn-sm btn-link p-0" @onclick="@(() => ShowMore(row.Node))">
<button type="button" class="btn btn-sm btn-link p-0" aria-label="@($"Show {Math.Min(row.Remaining, RawTreeRows.DefaultPageSize)} more ({row.Remaining} not shown) under {row.Node.DisplayName}")" @onclick="@(() => ShowMore(row.Node))">
Show @Math.Min(row.Remaining, RawTreeRows.DefaultPageSize) more
(@row.Remaining not shown)
</button>
@@ -211,7 +212,8 @@
@if (hasExpander)
{
<button type="button" class="btn btn-sm btn-link p-0 tree-twist"
@onclick="@(() => ToggleAsync(node))">
aria-label="@($"{(node.Expanded ? "Collapse" : "Expand")} {node.DisplayName}")" aria-expanded="@(node.Expanded ? "true" : "false")"
aria-busy="@(node.Loading ? "true" : null)" @onclick="@(() => ToggleAsync(node))">
@(node.Expanded ? "▼" : "▶")
</button>
}
@@ -222,7 +224,7 @@
@if (items.Count > 0)
{
<ContextMenu Items="items" ShowEllipsis="true">
<ContextMenu Items="items" ShowEllipsis="true" TriggerLabel="@($"More actions for {node.DisplayName}")">
@RenderRowBody(node, muted)
</ContextMenu>
}
@@ -239,12 +241,12 @@
<span class="d-inline-flex align-items-center gap-1">
@if (PickerMode && node.Kind == RawNodeKind.Tag)
{
<input type="checkbox" class="form-check-input me-1"
checked="@IsTagSelected(node)"
<input type="checkbox" class="form-check-input me-1" aria-labelledby="@(_labelScope + Convert.ToHexString(System.Text.Encoding.UTF8.GetBytes(node.Key)))"
title="@($"{node.Kind} {node.Key}")" checked="@IsTagSelected(node)"
@onchange="@(e => ToggleTagSelection(node, e.Value is true))" />
}
<span aria-hidden="true">@KindIcon(node.Kind)</span>
<span class="mono small @(muted ? "text-muted" : "")">@node.DisplayName</span>
<span id="@(_labelScope + Convert.ToHexString(System.Text.Encoding.UTF8.GetBytes(node.Key)))" class="mono small @(muted ? "text-muted" : "")">@node.DisplayName</span>
@if (muted)
{
<span class="chip chip-idle ms-1" style="font-size:0.65rem">disabled</span>