Skip to content

Explanation texts

Issue #63, milestone next release (owner, 2026-11-12). The content rule of the issue (lore, what it does, what a further level or more units change) is replaced ([E], owner, 2026-11-12): two paragraphs, one or two sentences of lore, then „So funktioniert es:“ with the mechanics precisely in words, no numbers and no formulas; statements must match the code. Short and precise ([E], owner 2026-11-12): the lore one sentence, the mechanics at most three, at most about 350 characters (see Grimdark naming).

  • [E] Display option „Immer anzeigen“ / „(?)-Symbol“ / „Ausblenden“ is stored on the server per player, a new column like probes, with a migration (D1 = 1, owner, 2026-11-12).
  • [E] Default for new players: „(?)-Symbol“ (D2 = 2, owner, 2026-11-12).
  • [E] The (?) opens an inline panel below the entry on click or tap; the same for touch, keyboard and screen readers (D3 = 1, owner, 2026-11-12).
  • [E] Order: #63 builds the mechanism (option, (?), panel) with the current ds as placeholder. The long texts are drafted by Claude as [V] in the grimdark style in the rename pull request (#94; its concept „Grimdark naming“ is not on main yet); the owner confirms them there (D4, owner, 2026-11-12).
  • [E] The short ds stays as a one-line summary that is always visible, also with „Ausblenden“; the long text is separate (D5 = 1, owner, 2026-11-12).
  • [V] The option sits in „Hilfe & Optionen“ (src/client/views/misc.ts) next to „Sonden pro Spionage“.
  • [E] Changed by the Lexicanum (#285, owner, 2026-11-17): the (?) opens the article of the entry, in a side panel over the list on a desktop and as the page on a phone; nothing unfolds below the entry any more. The option has two values, show the (?) or hide it; „Immer anzeigen“ goes (B2). [V] Label „(?)-Symbol: Anzeigen / Ausblenden“; a stored always reads as icon (storedMode in src/core/explain.ts, for the stored value and for an older client that sends it), so no migration changes the column. The long text lt is the introduction of the article. See Lexicanum; the rest of this page describes the state before #285 where it differs.

The second icon next to the „?“, the ▤ of the level overview with its own option, is described in Level overview (#187).

  • Option: column users.explain_mode (always, icon, hidden, default icon, CHECK), added by migration 10 (see SQLite storage); existing players get the default. The modes and the fallback to ds live in src/core/explain.ts. The action options takes explain next to probes and refuses another value („Ungültig.“).
  • [V] Without explain (an older client) the action keeps the stored mode.
  • Catalog: optional field lt (long text) for buildings, research, ships and defense. The panel shows lt, else ds (D4); an entry without either has neither (?) nor panel. Since the branch of #94 every entry on main has an lt ([E], grimdark style, confirmed by the owner 2026-11-12, see Grimdark naming), so the ships and the defense get the (?) too; the entries of #50 and #60 got theirs with the rename ([E], owner 2026-11-12).
  • Interface: src/client/logic/explain.ts decides per entry and mode; itemHTML (research, shipyard, defense) and Buildings.svelte render it; since #118 the generic CatalogList.svelte renders it in all four lists. The buildings view now shows the short ds too (D5). The (?) is a <button> with aria-expanded, aria-controls and the name „Erklärung zu ‹Name›“; Enter and Space work as on every button. Opened panels are kept while the page is open (not stored).
  • [V] Labels: „Erklärungstexte:“ with „Immer anzeigen“, „Als (?)-Symbol“, „Ausblenden“ (the drafts of the issue), in the box „Optionen“, saved with its button „Speichern“.
  • [V] Design after the mockup docs/design/explanations/ (button.exq, .ex in src/client/static/style.css); the (?) is 24 px instead of 20 px, the minimum target size of WCAG 2.2. The text is plain text, escaped; a blank line splits it into paragraphs, one <p> each ([E], owner, 2026-11-12, for the two paragraphs of #94).
  • Tests: src/core/explain.test.ts (also every catalog entry has an lt but the list LATER, and no classic name in it), src/client/logic/explain.test.ts, src/server/db/upgrades/migration-10.test.ts, the option in actions.test.ts, store.test.ts and auth.test.ts; E2E in e2e/game.spec.ts („explanation texts (#63)“: click, keyboard, tap on a phone, all three modes after a reload) and e2e/a11y.spec.ts (closed, opened and always shown). The E2E test checks that the panel shows lt (Adamant-Tiefbohrung, Auspex-Lehre, Spähschädel, Sonnenkathedrale); an entry without any text is left to the unit tests, as no catalog entry on main is one.