Add desktop tables inspector

This commit is contained in:
2026-03-21 15:11:55 +01:00
parent 9cfb9ac364
commit 9841a5c097
4 changed files with 100 additions and 2 deletions

View File

@@ -83,6 +83,13 @@
</div>
}
</div>
@if (tableDetail is not null)
{
<aside class="tables-reference-inspector-shell">
<TablesInspector SelectedCellDetail="SelectedCellDetail" />
</aside>
}
</div>
}
</section>
@@ -161,6 +168,10 @@
private bool hasResolvedStoredTableSelection;
private CriticalTableReference? SelectedTableReference =>
referenceData?.CriticalTables.FirstOrDefault(item => string.Equals(item.Key, selectedTableSlug, StringComparison.OrdinalIgnoreCase));
private CriticalTableCellDetail? SelectedCellDetail =>
selectedCell is null
? null
: tableDetail?.Cells.FirstOrDefault(cell => cell.ResultId == selectedCell.ResultId);
protected override async Task OnInitializedAsync()
{

View File

@@ -0,0 +1,52 @@
@if (SelectedCellDetail is null)
{
<aside class="tables-inspector" aria-label="Selected result inspector">
<InspectorSection Title="Inspector" Description="Select a result in the table to inspect its details here.">
<p class="tables-inspector-empty">Choose a cell to see its roll band, severity, and readable result without leaving the grid.</p>
</InspectorSection>
</aside>
}
else
{
var cell = SelectedCellDetail;
<aside class="tables-inspector" aria-label="Selected result inspector">
<InspectorSection Title="Selected Result" Description="Read the selected cell and its context without opening a modal.">
<div class="tables-inspector-summary">
<div>
<p class="tables-inspector-kicker">Roll band</p>
<strong>@cell.RollBand</strong>
</div>
<div>
<p class="tables-inspector-kicker">Severity</p>
<strong>@cell.ColumnLabel</strong>
</div>
@if (!string.IsNullOrWhiteSpace(cell.GroupLabel))
{
<div>
<p class="tables-inspector-kicker">Variant</p>
<strong>@cell.GroupLabel</strong>
</div>
}
<div>
<p class="tables-inspector-kicker">Status</p>
<StatusChip Tone="@(cell.IsCurated ? "success" : "warning")">
@(cell.IsCurated ? "Curated" : "Needs Curation")
</StatusChip>
</div>
</div>
</InspectorSection>
<InspectorSection Title="Result" Description="The selected critical result stays readable while you browse the grid.">
<CompactCriticalCell
Description="@(cell.Description ?? string.Empty)"
Effects="@(cell.Effects ?? Array.Empty<CriticalEffectLookupResponse>())"
Branches="@(cell.Branches ?? Array.Empty<CriticalBranchLookupResponse>())" />
</InspectorSection>
</aside>
}
@code {
[Parameter]
public CriticalTableCellDetail? SelectedCellDetail { get; set; }
}