polish(engine): standard empty/loading/error states (Phase L) #184

Merged
funman300 merged 1 commits from feat/empty-states into master 2026-07-14 03:08:55 +00:00
Owner

Phase L from docs/ui-redesign-2026-07.md — the doc called it "small, mechanical, big perceived-quality win" and that's what it was.

One pattern

ui_modal::spawn_empty_state(parent, glyph, headline, detail, font) — a centred glyph + headline + optional detail block with an EmptyStateBlock marker. Next-step actions are composition (spawn a button after it), not configuration. Glyphs are restricted to FiraMono-covered ranges (suits / arrows / ASCII) per the §10/§11 Android tofu constraint.

Swept surfaces

Surface Before After
Theme store three ad-hoc text lines ↻ loading / ! error (with reason) / # empty catalog
Leaderboard ad-hoc "Fetching…", error line, two-line empty ↻ fetching / ! error / ♠ "Be the first…"
Replays tab selector spawned with a "No replays" caption + dead Watch/Copy controls ♦ dedicated empty state; controls only spawn when there's something to select
Stats first launch bare caption above em-dash grid ♣ standard block above the grid

Deliberately not swept: the Account tab's sync row — it's a live status + action row, not an empty state; its richer treatment (last-synced timestamp, conflict summaries) is exactly Phase M's scope.

Tests

1 new structural test for the helper (marker count, node contents, detail-less variant). Full workspace + clippy green, exit-code-verified.

With this, only Phase M (sync transparency & data export/import) remains from the thirteen-phase redesign doc.

🤖 Generated with Claude Code

Phase L from docs/ui-redesign-2026-07.md — the doc called it "small, mechanical, big perceived-quality win" and that's what it was. ## One pattern `ui_modal::spawn_empty_state(parent, glyph, headline, detail, font)` — a centred glyph + headline + optional detail block with an `EmptyStateBlock` marker. Next-step actions are composition (spawn a button after it), not configuration. Glyphs are restricted to FiraMono-covered ranges (suits / arrows / ASCII) per the §10/§11 Android tofu constraint. ## Swept surfaces | Surface | Before | After | |---|---|---| | Theme store | three ad-hoc text lines | ↻ loading / ! error (with reason) / # empty catalog | | Leaderboard | ad-hoc "Fetching…", error line, two-line empty | ↻ fetching / ! error / ♠ "Be the first…" | | Replays tab | selector spawned with a "No replays" caption + dead Watch/Copy controls | ♦ dedicated empty state; controls only spawn when there's something to select | | Stats first launch | bare caption above em-dash grid | ♣ standard block above the grid | **Deliberately not swept:** the Account tab's sync row — it's a live status + action row, not an empty state; its richer treatment (last-synced timestamp, conflict summaries) is exactly Phase M's scope. ## Tests 1 new structural test for the helper (marker count, node contents, detail-less variant). Full workspace + clippy green, exit-code-verified. With this, only Phase M (sync transparency & data export/import) remains from the thirteen-phase redesign doc. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
funman300 added 1 commit 2026-07-14 03:03:31 +00:00
polish(engine): standard empty/loading/error states (Phase L)
Test / fmt (pull_request) Successful in 5s
Test / test (pull_request) Successful in 4m20s
02bcc8b4af
New ui_modal::spawn_empty_state — glyph + headline + optional detail,
centred, with next-step actions composed alongside rather than
configured in. Glyphs restricted to FiraMono-covered ranges (suits,
arrows, ASCII) per the section-10/11 Android constraint.

Swept every improvised surface onto it:
- Theme store: loading / error / empty-catalog branches
- Leaderboard: fetching / error / be-the-first branches
- You-hub Replays tab: dedicated no-replays state (selector and
  actions no longer spawn dead controls when history is empty)
- Stats: first-launch nudge above the em-dash grid

The Account tab's sync row was deliberately NOT swept: it is a live
status + action row, not an empty state, and its deeper treatment
belongs to Phase M's sync-transparency work.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
funman300 merged commit fc4ea17789 into master 2026-07-14 03:08:55 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#184