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

@@ -499,6 +499,10 @@ This is the key UX shift: the system does the import work again at cell scope in
### Phase 1: Strip visible technical noise
Status:
- implemented in the web app on March 15, 2026
Scope:
- simplify home page copy

View File

@@ -8,10 +8,10 @@
<main>
<div class="top-row">
<div>
<span class="eyebrow">Starter stack</span>
<span class="top-row-title">.NET 10 + Blazor + Minimal API + EF Core + SQLite</span>
<span class="eyebrow">Session Tools</span>
<span class="top-row-title">Attack lookup, critical lookup, and table browsing</span>
</div>
<span class="status-pill">Seeded for attack and critical lookups</span>
<span class="status-pill">Ready for play</span>
</div>
<article class="content-shell">

View File

@@ -1,7 +1,7 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid brand-shell">
<a class="navbar-brand" href="">RolemasterDB</a>
<p class="brand-copy">Automatic attack and critical lookup for a SQLite-backed starter dataset.</p>
<p class="brand-copy">Fast attack and critical lookup during play.</p>
</div>
</div>

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">

View File

@@ -1,93 +1,21 @@
@using System.Text.Json
<div class="result-card">
<h3>@Result.CriticalTableName</h3>
<div class="result-stats">
<span class="stat-pill">Table: <code>@Result.CriticalType</code></span>
<span class="stat-pill">Column: @Result.ColumnLabel</span>
<span class="stat-pill">Role: @Result.ColumnRole</span>
<span class="stat-pill">Band: @Result.RollBand</span>
<span class="stat-pill">Severity: @Result.ColumnLabel</span>
<span class="stat-pill">Roll: @Result.Roll</span>
<span class="stat-pill">Status: @Result.ParseStatus</span>
</div>
<div class="detail-grid">
<div class="detail-item">
<span class="detail-label">Family</span>
<span>@Result.CriticalFamily</span>
</div>
<div class="detail-item">
<span class="detail-label">Source</span>
<span>@Result.SourceDocument</span>
</div>
<div class="detail-item">
<span class="detail-label">Column Key</span>
<span><code>@Result.Column</code></span>
</div>
<div class="detail-item">
<span class="detail-label">Roll Range</span>
<span>@FormatRollRange(Result.RollBandMinRoll, Result.RollBandMaxRoll)</span>
</div>
@if (!string.IsNullOrWhiteSpace(Result.Group))
{
<div class="detail-item">
<span class="detail-label">Group</span>
<span>@(string.IsNullOrWhiteSpace(Result.GroupLabel) ? Result.Group : $"{Result.GroupLabel} ({Result.Group})")</span>
</div>
<span class="stat-pill">Variant: @(string.IsNullOrWhiteSpace(Result.GroupLabel) ? Result.Group : Result.GroupLabel)</span>
}
</div>
@if (!string.IsNullOrWhiteSpace(Result.TableNotes))
{
<p class="muted">@Result.TableNotes</p>
}
<div class="callout">
<h4>Cell details</h4>
<CompactCriticalCell
Description="@Result.Description"
Effects="@Result.Effects"
Branches="@Result.Branches" />
</div>
<details class="details-block">
<summary>Raw Imported Cell</summary>
<pre class="code-block">@Result.RawCellText</pre>
</details>
<details class="details-block">
<summary>Parsed JSON</summary>
<pre class="code-block">@FormatJson(Result.ParsedJson)</pre>
</details>
</div>
@code {
[Parameter, EditorRequired]
public CriticalLookupResponse Result { get; set; } = null!;
private static string FormatRollRange(int minRoll, int? maxRoll) =>
maxRoll is null
? $"{minRoll}+"
: minRoll == maxRoll
? minRoll.ToString()
: $"{minRoll}-{maxRoll}";
private static string FormatJson(string value)
{
if (string.IsNullOrWhiteSpace(value))
{
return "{}";
}
try
{
using var document = JsonDocument.Parse(value);
return JsonSerializer.Serialize(document.RootElement, new JsonSerializerOptions { WriteIndented = true });
}
catch (JsonException)
{
return value;
}
}
}