Remove technical noise from lookup UX

This commit is contained in:
2026-03-15 01:20:48 +01:00
parent e5e34296a4
commit ef15bce7c4
6 changed files with 33 additions and 136 deletions

View File

@@ -7,31 +7,22 @@
@if (referenceData is null)
{
<section class="hero-panel">
<h1 class="page-title">Summoning tables...</h1>
<p class="lede">Loading the starter attack and critical data from SQLite.</p>
<h1 class="page-title">Preparing the lookup desk...</h1>
<p class="lede">Loading the tables and options for play.</p>
</section>
}
else
{
<section class="hero-panel">
<span class="eyebrow">Rolemaster Lookup Desk</span>
<h1 class="page-title">Resolve the attack roll, then the critical, from one place.</h1>
<p class="lede">
Attack tables still come from the starter dataset, while critical lookups now read the importer-managed tables loaded into the same SQLite file.
The page surfaces both the gameplay result and the import metadata behind each critical entry.
</p>
<div class="tag-row">
<span class="tag">@referenceData.AttackTables.Count attack tables</span>
<span class="tag">@referenceData.CriticalTables.Count critical tables</span>
<span class="tag">@referenceData.ArmorTypes.Count armor types</span>
<span class="tag">SQLite file: <code>rolemaster.db</code></span>
</div>
<span class="eyebrow">Session Lookup</span>
<h1 class="page-title">Resolve attacks and criticals fast.</h1>
<p class="lede">Choose the table, enter the roll, and read the outcome without digging through extra metadata.</p>
</section>
<div class="dashboard-grid">
<section class="panel">
<h2 class="panel-title">Automatic Attack Lookup</h2>
<p class="panel-copy">Choose an attack table, armor type, and attack roll. If the attack produces a critical and you provide the critical roll, the app resolves that follow-up automatically.</p>
<h2 class="panel-title">Attack Lookup</h2>
<p class="panel-copy">Choose an attack, armor type, and attack roll. If it produces a critical and you enter the follow-up roll, the app resolves that too.</p>
<div class="lookup-form">
<div class="form-grid">
@@ -68,7 +59,7 @@ else
<div class="action-row">
<button class="btn-ritual" @onclick="RunAttackLookupAsync">Resolve attack</button>
<span class="muted">Leave critical roll blank to stop after the attack table result.</span>
<span class="muted">Leave critical roll blank if you only need the hit result.</span>
</div>
</div>
@@ -83,7 +74,7 @@ else
<div class="result-card">
<h3>@attackResult.AttackTableName vs @attackResult.ArmorTypeLabel</h3>
<div class="result-stats">
<span class="stat-pill">Roll band: @attackResult.RollBand</span>
<span class="stat-pill">Attack roll: @attackResult.Roll</span>
<span class="stat-pill">Hits: @attackResult.Hits</span>
@if (!string.IsNullOrWhiteSpace(attackResult.CriticalSeverity))
{
@@ -94,7 +85,6 @@ else
<span class="stat-pill">No critical</span>
}
</div>
<p><strong>Table notation:</strong> @attackResult.RawNotation</p>
@if (!string.IsNullOrWhiteSpace(attackResult.Notes))
{
<p class="muted">@attackResult.Notes</p>
@@ -103,7 +93,7 @@ else
@if (attackResult.AutoCritical is not null)
{
<div class="callout">
<h4>Automatic critical resolution</h4>
<h4>Resolved critical</h4>
<CriticalLookupResultCard Result="attackResult.AutoCritical" />
</div>
}
@@ -118,7 +108,7 @@ else
<section class="panel">
<h2 class="panel-title">Direct Critical Lookup</h2>
<p class="panel-copy">Use this when you already know the critical table, column, roll, and group if the selected table has variants.</p>
<p class="panel-copy">Use this when you already know the critical table, severity, roll, and variant if the table uses one.</p>
<div class="lookup-form">
<div class="form-grid">
@@ -133,11 +123,11 @@ else
</div>
<div class="field-shell">
<label for="critical-column">Column</label>
<label for="critical-column">Severity</label>
<select id="critical-column" class="input-shell" @bind="criticalInput.Column">
@foreach (var column in SelectedCriticalTable?.Columns ?? [])
{
<option value="@column.Key">@column.Label (@column.Role)</option>
<option value="@column.Key">@column.Label</option>
}
</select>
</div>
@@ -145,7 +135,7 @@ else
@if (SelectedCriticalTable?.Groups.Count > 0)
{
<div class="field-shell">
<label for="critical-group">Group</label>
<label for="critical-group">Variant</label>
<select id="critical-group" class="input-shell" @bind="criticalInput.Group">
@foreach (var group in SelectedCriticalTable.Groups)
{
@@ -178,26 +168,6 @@ else
</div>
}
</section>
<section class="panel">
<h2 class="panel-title">Loaded Reference Data</h2>
<p class="panel-copy">Attack tables remain starter content. Critical tables below are whatever importer-managed entries are currently loaded into the app database.</p>
<div class="table-list">
@foreach (var attackTable in referenceData.AttackTables)
{
<div class="table-list-item">
<span class="table-list-title">@attackTable.Label</span>
<span class="muted">Attack table key: <code>@attackTable.Key</code></span>
</div>
}
@foreach (var criticalTable in referenceData.CriticalTables)
{
<CriticalTableReferenceCard Table="criticalTable" />
}
</div>
</section>
</div>
}
@@ -245,7 +215,7 @@ else
if (response is null)
{
attackError = "No seeded attack result matched that table, armor type, and roll.";
attackError = "No attack result matched that table, armor type, and roll.";
return;
}
@@ -265,7 +235,7 @@ else
if (response is null)
{
criticalError = "No loaded critical result matched that table, group, column, and roll.";
criticalError = "No critical result matched that selection and roll.";
return;
}

View File

@@ -10,8 +10,8 @@
<section class="hero-panel">
<span class="eyebrow">Critical Tables</span>
<h1 class="page-title">Browse every imported table</h1>
<p class="lede">The authority on this page is the SQLite data that the importer maintains. Switch tables to see the full roll matrix, grouped columns, and affix legend for each import.</p>
<h1 class="page-title">Browse critical results by table</h1>
<p class="lede">Switch tables to read the full roll matrix, compare outcomes, and use the affix legend as quick play help.</p>
</section>
<section class="panel tables-page">
@@ -43,7 +43,7 @@
}
else if (!referenceData.CriticalTables.Any())
{
<p class="muted">No critical tables have been imported yet.</p>
<p class="muted">No critical tables are available yet.</p>
}
else if (isDetailLoading)
{
@@ -61,12 +61,7 @@
{
<div class="table-shell">
<header>
<span class="eyebrow">@detail.SourceDocument</span>
<h2 class="panel-title">@detail.DisplayName</h2>
@if (!string.IsNullOrWhiteSpace(detail.Notes))
{
<p class="muted">@detail.Notes</p>
}
</header>
<div class="table-scroll">