Add mobile tables inspector sheet
This commit is contained in:
@@ -91,6 +91,8 @@
|
||||
</aside>
|
||||
}
|
||||
</div>
|
||||
|
||||
<TablesInspectorSheet SelectedCellDetail="SelectedCellDetail" OnClose="ClearSelectedCell" />
|
||||
}
|
||||
</section>
|
||||
|
||||
@@ -700,6 +702,12 @@
|
||||
selectedCell = selection;
|
||||
}
|
||||
|
||||
private Task ClearSelectedCell()
|
||||
{
|
||||
selectedCell = null;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private void NormalizeViewStateForCurrentDetail()
|
||||
{
|
||||
referenceMode = NormalizeMode(referenceMode);
|
||||
|
||||
@@ -1,50 +1,6 @@
|
||||
@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>
|
||||
}
|
||||
<aside class="tables-inspector" aria-label="Selected result inspector">
|
||||
<TablesInspectorContent SelectedCellDetail="SelectedCellDetail" />
|
||||
</aside>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
@if (SelectedCellDetail is null)
|
||||
{
|
||||
<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>
|
||||
}
|
||||
else
|
||||
{
|
||||
var cell = SelectedCellDetail;
|
||||
|
||||
<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>
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public CriticalTableCellDetail? SelectedCellDetail { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
@if (SelectedCellDetail is not null)
|
||||
{
|
||||
<div class="tables-inspector-sheet" role="dialog" aria-modal="true" aria-label="Selected result inspector">
|
||||
<button type="button" class="tables-inspector-sheet-backdrop" @onclick="OnClose"></button>
|
||||
|
||||
<section class="tables-inspector-sheet-panel">
|
||||
<div class="tables-inspector-sheet-handle" aria-hidden="true"></div>
|
||||
<header class="tables-inspector-sheet-header">
|
||||
<div>
|
||||
<p class="tables-page-eyebrow">Selected Result</p>
|
||||
<h2 class="panel-title">Mobile Inspector</h2>
|
||||
</div>
|
||||
<button type="button" class="btn btn-link" @onclick="OnClose">Close</button>
|
||||
</header>
|
||||
|
||||
<div class="tables-inspector-sheet-body">
|
||||
<TablesInspectorContent SelectedCellDetail="SelectedCellDetail" />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public CriticalTableCellDetail? SelectedCellDetail { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback OnClose { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user