Move tables actions into inspector
This commit is contained in:
@@ -71,6 +71,7 @@ It is intentionally implementation-focused:
|
||||
| 2026-03-21 | P3.8 | Completed | Reused the inspector body inside a mobile bottom sheet with its own backdrop and close affordance so touch users keep the same selection-driven inspector model as desktop. |
|
||||
| 2026-03-21 | P3.9 | Completed | Pulled legend/help out of the always-on canvas component and turned it into an explicitly toggled secondary surface controlled from the context bar. |
|
||||
| 2026-03-21 | P3.10 | Completed | Softened the default `Reference` mode by replacing repeated curation wording in resting cells with subtle status indicators and by simplifying the top-level guidance copy. |
|
||||
| 2026-03-21 | P3.11 | Completed | Moved the live editor and curation entry points into the shared inspector content and removed the last remaining grid-owned action buttons. |
|
||||
|
||||
### Lessons Learned
|
||||
|
||||
@@ -111,6 +112,7 @@ It is intentionally implementation-focused:
|
||||
- The inspector content itself should be shared independently of its container. Once the body is separated from the desktop column chrome, the mobile bottom sheet can reuse it with almost no behavioral drift.
|
||||
- Help content should not stay embedded in the canvas component once the grid becomes the main task surface. Moving legend rendering back to the page host makes it easier to demote, reposition, or merge with future help surfaces.
|
||||
- Hiding maintenance noise in default reference mode is mostly a copy and chrome problem, not a routing or data problem. Replacing repeated curation words with quieter indicators goes further than adding yet another toggle.
|
||||
- Once the inspector owns the action entry points, the grid should stop carrying legacy button styles and callbacks. Removing dead grid-action code immediately keeps the browse-first model from drifting back toward edit-first behavior.
|
||||
|
||||
## Target Outcomes
|
||||
|
||||
@@ -481,7 +483,7 @@ Build the shared interaction infrastructure needed by multiple destinations befo
|
||||
| `P3.8` | Completed | Mobile now uses a bottom-sheet inspector that reuses the same selected-cell content as the desktop inspector column. |
|
||||
| `P3.9` | Completed | Legend/help is now on-demand and controlled from the context bar instead of always rendering below the canvas. |
|
||||
| `P3.10` | Completed | Default `Reference` mode now uses quieter status indicators and calmer guidance copy so the page reads less like a maintenance surface. |
|
||||
| `P3.11` | Pending | Preserve editor and curation entry points through the inspector. |
|
||||
| `P3.11` | Completed | Full editor and curation entry points now live in the shared inspector content instead of the grid itself. |
|
||||
| `P3.12` | Pending | Normalize click/tap/keyboard selection and close the phase with a hardening pass. |
|
||||
|
||||
### Goal
|
||||
|
||||
@@ -79,9 +79,7 @@
|
||||
RollJumpValue="rollJumpValue"
|
||||
DensityMode="densityMode"
|
||||
SelectedCell="selectedCell"
|
||||
OnSelectCell="SelectCell"
|
||||
OnOpenCuration="OpenCellCurationAsync"
|
||||
OnOpenEditor="OpenCellEditorAsync" />
|
||||
OnSelectCell="SelectCell" />
|
||||
|
||||
@if (isLegendOpen)
|
||||
{
|
||||
@@ -94,12 +92,19 @@
|
||||
@if (tableDetail is not null)
|
||||
{
|
||||
<aside class="tables-reference-inspector-shell">
|
||||
<TablesInspector SelectedCellDetail="SelectedCellDetail" />
|
||||
<TablesInspector
|
||||
SelectedCellDetail="SelectedCellDetail"
|
||||
OnEdit="OpenSelectedCellEditorAsync"
|
||||
OnCurate="OpenSelectedCellCurationAsync" />
|
||||
</aside>
|
||||
}
|
||||
</div>
|
||||
|
||||
<TablesInspectorSheet SelectedCellDetail="SelectedCellDetail" OnClose="ClearSelectedCell" />
|
||||
<TablesInspectorSheet
|
||||
SelectedCellDetail="SelectedCellDetail"
|
||||
OnClose="ClearSelectedCell"
|
||||
OnEdit="OpenSelectedCellEditorAsync"
|
||||
OnCurate="OpenSelectedCellCurationAsync" />
|
||||
}
|
||||
</section>
|
||||
|
||||
@@ -716,6 +721,16 @@
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Task OpenSelectedCellEditorAsync() =>
|
||||
selectedCell is null
|
||||
? Task.CompletedTask
|
||||
: OpenCellEditorAsync(selectedCell.ResultId);
|
||||
|
||||
private Task OpenSelectedCellCurationAsync() =>
|
||||
selectedCell is null
|
||||
? Task.CompletedTask
|
||||
: OpenCellCurationAsync(selectedCell.ResultId);
|
||||
|
||||
private Task ToggleLegend()
|
||||
{
|
||||
isLegendOpen = !isLegendOpen;
|
||||
|
||||
@@ -51,28 +51,7 @@
|
||||
|
||||
@if (isSelectedCell)
|
||||
{
|
||||
<div class="critical-cell-selected-actions">
|
||||
@if (!cell.IsCurated)
|
||||
{
|
||||
<button
|
||||
type="button"
|
||||
class="critical-cell-action-button is-curation"
|
||||
title="Open the curation preview for this cell."
|
||||
@onclick:stopPropagation="true"
|
||||
@onclick="() => OnOpenCuration.InvokeAsync(cell.ResultId)">
|
||||
Curate
|
||||
</button>
|
||||
}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="critical-cell-action-button is-edit"
|
||||
title="Open the full editor for this cell."
|
||||
@onclick:stopPropagation="true"
|
||||
@onclick="() => OnOpenEditor.InvokeAsync(cell.ResultId)">
|
||||
Edit
|
||||
</button>
|
||||
</div>
|
||||
<StatusChip Tone="accent">Selected</StatusChip>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -101,8 +80,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<TablesLegend LegendEntries="@(Detail.Legend ?? Array.Empty<CriticalTableLegendEntry>())" />
|
||||
|
||||
@code {
|
||||
private readonly Dictionary<(string RollBand, string? GroupKey, string ColumnKey), CriticalTableCellDetail> cellIndex = new();
|
||||
private readonly List<(string? GroupKey, string ColumnKey, string ColumnLabel)> displayColumns = new();
|
||||
@@ -134,12 +111,6 @@
|
||||
[Parameter]
|
||||
public EventCallback<TablesCellSelection> OnSelectCell { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> OnOpenCuration { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> OnOpenEditor { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
cellIndex.Clear();
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
<aside class="tables-inspector" aria-label="Selected result inspector">
|
||||
<TablesInspectorContent SelectedCellDetail="SelectedCellDetail" />
|
||||
<TablesInspectorContent SelectedCellDetail="SelectedCellDetail" OnEdit="OnEdit" OnCurate="OnCurate" />
|
||||
</aside>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public CriticalTableCellDetail? SelectedCellDetail { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback OnEdit { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback OnCurate { get; set; }
|
||||
}
|
||||
|
||||
@@ -35,6 +35,14 @@ else
|
||||
</InspectorSection>
|
||||
|
||||
<InspectorSection Title="Result" Description="The selected critical result stays readable while you browse the grid.">
|
||||
<div class="tables-inspector-actions">
|
||||
@if (!cell.IsCurated)
|
||||
{
|
||||
<button type="button" class="btn btn-secondary" @onclick="OnCurate">Open curation</button>
|
||||
}
|
||||
<button type="button" class="btn btn-primary" @onclick="OnEdit">Open editor</button>
|
||||
</div>
|
||||
|
||||
<CompactCriticalCell
|
||||
Description="@(cell.Description ?? string.Empty)"
|
||||
Effects="@(cell.Effects ?? Array.Empty<CriticalEffectLookupResponse>())"
|
||||
@@ -45,4 +53,10 @@ else
|
||||
@code {
|
||||
[Parameter]
|
||||
public CriticalTableCellDetail? SelectedCellDetail { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback OnEdit { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback OnCurate { get; set; }
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</header>
|
||||
|
||||
<div class="tables-inspector-sheet-body">
|
||||
<TablesInspectorContent SelectedCellDetail="SelectedCellDetail" />
|
||||
<TablesInspectorContent SelectedCellDetail="SelectedCellDetail" OnEdit="OnEdit" OnCurate="OnCurate" />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -26,4 +26,10 @@
|
||||
|
||||
[Parameter]
|
||||
public EventCallback OnClose { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback OnEdit { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback OnCurate { get; set; }
|
||||
}
|
||||
|
||||
@@ -1366,6 +1366,13 @@ pre,
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.tables-inspector-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 0.85rem;
|
||||
}
|
||||
|
||||
.tables-inspector-kicker {
|
||||
margin: 0 0 0.2rem;
|
||||
color: var(--ink-soft);
|
||||
@@ -1703,41 +1710,10 @@ pre,
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.critical-cell-selected-actions {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.tables-cell-status-indicator {
|
||||
min-height: 1rem;
|
||||
}
|
||||
|
||||
.critical-cell-action-button {
|
||||
border: 1px solid rgba(127, 96, 55, 0.18);
|
||||
border-radius: 999px;
|
||||
padding: 0.3rem 0.7rem;
|
||||
background: rgba(255, 252, 247, 0.92);
|
||||
color: #5b4327;
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.critical-cell-action-button.is-curation {
|
||||
background: rgba(255, 242, 223, 0.95);
|
||||
border-color: rgba(184, 121, 59, 0.28);
|
||||
color: #8a5b21;
|
||||
}
|
||||
|
||||
.critical-cell-action-button.is-edit {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.critical-cell-action-button:hover {
|
||||
background: rgba(255, 248, 236, 0.98);
|
||||
}
|
||||
|
||||
.critical-table-grid .critical-cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user