A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Show resolved choices beside the historical record (#1157)
Aviel Cohen21e59fcbbd70
diff --git a/changelog.d/1157-existing-hebrew.md b/changelog.d/1157-existing-hebrew.mdnew file mode 100644index 000000000..1f70631be--- /dev/null+++ b/changelog.d/1157-existing-hebrew.md@@ -0,0 +1 @@+- The Timeline shows existing Hebrew event titles and chosen/recorded answer text in the Hebrew UI, with localized office-holder names, independent English fallbacks and untranslated variant titles preserved (refs #955, #1157; existing human-review flags remain unchanged).diff --git a/changelog.d/1157-timeline-screen.md b/changelog.d/1157-timeline-screen.mdnew file mode 100644index 000000000..5423710b7--- /dev/null+++ b/changelog.d/1157-timeline-screen.md@@ -0,0 +1,3 @@+- A timeline screen shows the player’s course beside the record, including considered alternatives and design assumptions+ (refs #955, #939). Its button is the eighth on the left column, so the column's discs are 40 px, 2 px apart, on the+ one-row bar.diff --git a/tools/headed.py b/tools/headed.pyindex e2b4421c3..eaa682103 100644--- a/tools/headed.py+++ b/tools/headed.py@@ -48,13 +48,13 @@ END_TURN, OPTION, MAP_UNDER_WHY = (1516, 42), (608, 520), (1180, 300)def left_column_button(index: int, window: tuple[int, int] = WINDOW) -> tuple[int, int]:"""The centre of the left icon column's button `index` (0 Cabinet, 1 Budget, 2 Defence, 3 Why?) in CSS pixels, from- Statecraft.uss (HUD round 2, #398): the column at left 16 px and top 112 px (the one-row bar), 45 px discs 48 px apart- (seven since Objectives, #1189),+ Statecraft.uss (HUD round 2, #398): the column at left 16 px and top 112 px (the one-row bar), 40 px discs 42 px apart+ (eight with Timeline, #955),in panel units the PanelSettings scale to the window (1920x1080 reference, match 0.5: the geometric mean of the tworatios). Derived, so a moved column is one change in the USS and here, not a re-measured capture."""w, h = windowscale = ((w / 1920) * (h / 1080)) ** 0.5- return round((16 + 28) * scale), round((112 + 48 * index + 22.5) * scale) # the discs are centred in the 56 px column+ return round((16 + 28) * scale), round((112 + 42 * index + 20) * scale) # the discs are centred in the 56 px columnWHY = left_column_button(3) # Why? moved from the top bar to the left icon column (#602)diff --git a/unity/Assets/Scripts/UI/GameRoot.cs b/unity/Assets/Scripts/UI/GameRoot.csindex a81651678..adfe3eba9 100644--- a/unity/Assets/Scripts/UI/GameRoot.cs+++ b/unity/Assets/Scripts/UI/GameRoot.cs@@ -275,6 +275,7 @@ namespace Statecraft.Game.UIOwn(new DefencePresenter(root, bridge, text, portraits));Own(new BudgetPresenter(root, bridge, text));Own(new WhyPresenter(root, bridge, text));+ Own(new TimelinePresenter(root, bridge, text));Own(new HowToPlayPresenter(root, text));Own(new ObjectivesPresenter(root, bridge, text));// Presentation only (#40): never the sim or the save. Outside Play mode (EditMode tests) no file: the developer'sdiff --git a/unity/Assets/Scripts/UI/HudPresenter.cs b/unity/Assets/Scripts/UI/HudPresenter.csindex d9642d031..f09b0b4e9 100644--- a/unity/Assets/Scripts/UI/HudPresenter.cs+++ b/unity/Assets/Scripts/UI/HudPresenter.cs@@ -69,8 +69,8 @@ namespace Statecraft.Game.UIstatic readonly (string name, string key)[] Texts ={("nav-cabinet", "hud.nav.cabinet"), ("nav-budget", "hud.nav.budget"), ("nav-defence", "hud.nav.defence"),- ("nav-why", "hud.nav.why"), ("nav-how-to-play", "hud.nav.how_to_play"), ("nav-objectives", "hud.nav.objectives"),- ("nav-settings", "hud.nav.settings"),+ ("nav-why", "hud.nav.why"), ("nav-timeline", "nav.timeline"), ("nav-how-to-play", "hud.nav.how_to_play"),+ ("nav-objectives", "hud.nav.objectives"), ("nav-settings", "hud.nav.settings"),("new-game", "hud.new_game"), ("end-turn", "hud.end_turn"),};diff --git a/unity/Assets/Scripts/UI/KeyScroll.cs b/unity/Assets/Scripts/UI/KeyScroll.csindex badf118e5..6ef36529c 100644--- a/unity/Assets/Scripts/UI/KeyScroll.cs+++ b/unity/Assets/Scripts/UI/KeyScroll.cs@@ -18,7 +18,7 @@ namespace Statecraft.Game.UIstatic readonly Dictionary<string, string> MainViews = new Dictionary<string, string>{["cabinet"] = "cabinet-seats", ["budget"] = "budget-rows", ["defence"] = "defence-body", ["why"] = "why-rows",- ["how-to-play"] = "how-to-play-body", ["objectives"] = "objectives-rows",+ ["how-to-play"] = "how-to-play-body", ["timeline"] = "timeline-list", ["objectives"] = "objectives-rows",};/// <summary>A page is the view's height less about one line of text, so the line at the edge stays in sight.</summary>diff --git a/unity/Assets/Scripts/UI/ScreenNav.cs b/unity/Assets/Scripts/UI/ScreenNav.csindex 197b10235..435aea2c9 100644--- a/unity/Assets/Scripts/UI/ScreenNav.cs+++ b/unity/Assets/Scripts/UI/ScreenNav.cs@@ -4,16 +4,16 @@ using UnityEngine.UIElements;namespace Statecraft.Game.UI{- /// <summary>The side-menu buttons open the Cabinet, Budget, Defence, Why, How to play, Objectives and Settings screens, one at a time; pressing the open+ /// <summary>The side-menu buttons open the Cabinet, Budget, Defence, Why, Timeline, How to play, Objectives and Settings screens, one at a time; pressing the open/// screen's button again closes it. Every press toggles, synchronously, with no debounce: two presses in one frame (a/// double click, or a click plus Enter) open and close again, so the result depends only on the number of presses/// (HudTests.TwoPressesInOneFrameToggleTwice; playtest 1, item 11).</summary>public sealed class ScreenNav : System.IDisposable{- public static readonly string[] Screens = { "cabinet", "budget", "defence", "why", "how-to-play", "objectives", "settings" };+ public static readonly string[] Screens = { "cabinet", "budget", "defence", "why", "timeline", "how-to-play", "objectives", "settings" };/// <summary>The class on the open screen's button (Statecraft.uss lights its ring).</summary>public const string OpenClass = "nav-open";- /// <summary>The class on the "root" element while a wide screen (class <see cref="WideClass"/>: Cabinet, Defence) is+ /// <summary>The class on the "root" element while a wide screen (class <see cref="WideClass"/>: Cabinet, Defence, Timeline) is/// open: Statecraft.uss hides the info panel it covers, so its buttons take no focus and no clicks.</summary>public const string WideOpenClass = "wide-screen-open", WideClass = "screen-wide";/// <summary>The class on the "root" element while any screen is open: Statecraft.uss hides the decision layer under it,diff --git a/unity/Assets/Scripts/UI/TimelinePresenter.cs b/unity/Assets/Scripts/UI/TimelinePresenter.csnew file mode 100644index 000000000..4f4b33d03--- /dev/null+++ b/unity/Assets/Scripts/UI/TimelinePresenter.cs@@ -0,0 +1,87 @@+#nullable enable+using System.Linq;+using Statecraft.Sim;+using UnityEngine.UIElements;++namespace Statecraft.Game.UI+{+ /// <summary>The resolved course beside the record (#955). All ordering, divergence and rejoin answers come from the sim.</summary>+ public sealed class TimelinePresenter : System.IDisposable+ {+ readonly VisualElement screen;+ readonly ScrollView list;+ readonly SimBridge bridge;+ readonly UiText text;+ GameSession? shownSession;+ GameState? shownState;++ public TimelinePresenter(VisualElement root, SimBridge bridge, UiText text)+ {+ this.bridge = bridge; this.text = text;+ screen = root.Q<VisualElement>("screen-timeline");+ list = screen.Q<ScrollView>("timeline-list");+ screen.Q<Label>("timeline-screen-title").text = text["timeline.title"];+ screen.Q<Label>("timeline-yours-heading").text = text["timeline.yours"];+ screen.Q<Label>("timeline-record-heading").text = text["timeline.record"];+ ScreenNav.OnOpened(screen, Render);+ bridge.Changed += OnChanged;+ }++ void OnChanged() { if (ScreenNav.IsOpen(screen)) Render(); }++ /// <summary>Queued orders leave the resolved state unchanged, so they neither add rows nor reset the reader's scroll.</summary>+ public void Render()+ {+ if (shownSession == bridge.Session && shownState == bridge.State) return;+ shownSession = bridge.Session; shownState = bridge.State;+ var c = bridge.Content; var s = bridge.State;+ list.Clear();+ foreach (var entry in Timeline.Entries(c, s))+ {+ var ev = c.Events.First(e => e.Id == entry.Event);+ var row = new VisualElement { userData = entry.Event };+ row.AddToClassList("timeline-row");+ row.EnableInClassList("timeline-diverged", entry.Diverged);+ Label Line(string name, string words)+ {+ var label = new Label(words) { name = name };+ label.AddToClassList("timeline-line");+ return label;+ }+ var date = EventSystem.FillDate(ev, s.Date);+ var variant = Timeline.Variant(c, s, ev);+ bool hebrew = text["ui.lang"] == UiLanguage.Hebrew;+ // Match the decision card: each existing Hebrew field falls back independently; variants have no Hebrew title.+ string Local(string english, string he) => hebrew && he != "" ? Cabinet.Fill(c, s, he, date, p => ContentNames.Of(text, p)) : english;+ string Answer(string id)+ {+ var option = ev.Options.First(o => o.Id == id);+ return Local(Cabinet.Fill(c, s, option.Text, date), option.TextHe);+ }+ row.Add(Line("timeline-date", Statecraft.Game.Map.Control1948.DateText(ev.From, k => text[k])));+ row.Add(Line("timeline-title", Local(EventSystem.Title(c, s, ev), variant == null || variant.Title == "" ? ev.TitleHe : "")));+ var columns = new VisualElement(); columns.AddToClassList("timeline-columns");+ columns.Add(Line("timeline-yours", Answer(entry.Chosen)));+ columns.Add(Line("timeline-record", entry.Historical == "" ? text["timeline.no_record"] : Answer(entry.Historical)));+ row.Add(columns);+ var alternative = ev.Options.First(o => o.Id == entry.Chosen).Alternative;+ if (alternative?.Basis == OptionAlternative.Design)+ row.Add(Line("timeline-design", text["timeline.alt_design"]));+ else if (alternative != null && alternative.IsConsidered && alternative.Date.HasValue)+ row.Add(Line("timeline-attribution", text.Format(+ alternative.Basis == OptionAlternative.Proposed ? "timeline.alt_proposed" : "timeline.alt_debated",+ alternative.By, Statecraft.Game.Map.Control1948.DateText(alternative.Date.Value, k => text[k]))));+ // A visible sign supplements the rim: the difference is not conveyed by colour alone.+ if (entry.Diverged) row.Add(Line("timeline-difference", "≠"));+ if (entry.RejoinedBy != "") row.Add(Line("timeline-rejoined", text["timeline.rejoined"]));+ list.Add(row);+ }+ }++ public void Dispose()+ {+ bridge.Changed -= OnChanged;+ if (screen.userData is System.Action) screen.userData = null;+ }+ }+}diff --git a/unity/Assets/Scripts/UI/TimelinePresenter.cs.meta b/unity/Assets/Scripts/UI/TimelinePresenter.cs.metanew file mode 100644index 000000000..d85e50f03--- /dev/null+++ b/unity/Assets/Scripts/UI/TimelinePresenter.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: 6c6a030ad7c64646b7baff250e0d935ddiff --git a/unity/Assets/Tests/EditMode/HebrewUiTests.cs b/unity/Assets/Tests/EditMode/HebrewUiTests.csindex ad0303554..661e3e927 100644--- a/unity/Assets/Tests/EditMode/HebrewUiTests.cs+++ b/unity/Assets/Tests/EditMode/HebrewUiTests.cs@@ -280,7 +280,7 @@ public class HebrewUiTests("meter-security/meter-name", "hud.caption.security"), ("meter-support/meter-name", "hud.caption.support"),("meter-cohesion/meter-name", "hud.caption.cohesion"), ("meter-standing/meter-name", "hud.caption.standing"), ("meter-fx/meter-name", "hud.caption.fx"),("nav-cabinet", "hud.nav.cabinet"), ("nav-budget", "hud.nav.budget"), ("nav-defence", "hud.nav.defence"),- ("nav-why", "hud.nav.why"), ("nav-how-to-play", "hud.nav.how_to_play"), ("nav-objectives", "hud.nav.objectives"),+ ("nav-why", "hud.nav.why"), ("nav-timeline", "nav.timeline"), ("nav-how-to-play", "hud.nav.how_to_play"), ("nav-objectives", "hud.nav.objectives"),("new-game", "hud.new_game"), ("end-turn", "hud.end_turn"),("event-draft", "event.draft"),("budget-screen-title", "budget.title"), ("budget-reset", "budget.reset"), ("budget-submit", "budget.submit"),diff --git a/unity/Assets/Tests/EditMode/LeftColumnTests.cs b/unity/Assets/Tests/EditMode/LeftColumnTests.csindex 97aef4987..1d3c42dfb 100644--- a/unity/Assets/Tests/EditMode/LeftColumnTests.cs+++ b/unity/Assets/Tests/EditMode/LeftColumnTests.cs@@ -33,6 +33,7 @@ public class LeftColumnTests{("nav-cabinet", "hud.nav.cabinet", "columns"), ("nav-budget", "hud.nav.budget", "ledger"),("nav-defence", "hud.nav.defence", "helmet"), ("nav-why", "hud.nav.why", "question"),+ ("nav-timeline", "nav.timeline", "hourglass"),("nav-how-to-play", "hud.nav.how_to_play", "book"), ("nav-objectives", "hud.nav.objectives", "flag"),("nav-settings", "hud.nav.settings", "gear"),};@@ -255,7 +256,7 @@ public class LeftColumnTestsvar order = root.Query<VisualElement>().Where(e => e.focusable && e.canGrabFocus && e.tabIndex >= 0 && e is Button).ToList().Select(e => e.name).Where(n => n.StartsWith("nav-") || n == "new-game" || n == "end-turn" || n.StartsWith("minimap-")).ToList();// Under the open card the minimap column is out of reach (the backdrop covers it); the column and the bar are not.- CollectionAssert.AreEqual(new[] { "nav-cabinet", "nav-budget", "nav-defence", "nav-why", "nav-how-to-play", "nav-objectives", "nav-settings", "new-game", "end-turn" },+ CollectionAssert.AreEqual(new[] { "nav-cabinet", "nav-budget", "nav-defence", "nav-why", "nav-timeline", "nav-how-to-play", "nav-objectives", "nav-settings", "new-game", "end-turn" },order, $"{at}: the Tab order under the open card");var r = root.Q("root");Assert.IsTrue(r.ClassListContains(EventCardPresenter.ModalClass), at + ": precondition: the card is open");diff --git a/unity/Assets/Tests/EditMode/PromoHudTests.cs b/unity/Assets/Tests/EditMode/PromoHudTests.csindex 6bcf06df3..31ad7ecee 100644--- a/unity/Assets/Tests/EditMode/PromoHudTests.cs+++ b/unity/Assets/Tests/EditMode/PromoHudTests.cs@@ -40,7 +40,8 @@ public class PromoHudTestsusing var ui = new UiTestKit();foreach (var (button, name, glyph) in new[] { ("nav-cabinet", "Cabinet", "columns"), ("nav-budget", "Budget", "ledger"),("nav-defence", "Defence", "helmet"), ("nav-why", "Why?", "question"),- ("nav-how-to-play", "How to play", "book"), ("nav-objectives", "Objectives", "flag"), ("nav-settings", "Settings", "gear"),+ ("nav-timeline", "Timeline", "hourglass"), ("nav-how-to-play", "How to play", "book"), ("nav-objectives", "Objectives", "flag"),+ ("nav-settings", "Settings", "gear"),("new-game", "New game", "restart") }){var b = ui.Q<Button>(button);diff --git a/unity/Assets/Tests/EditMode/TimelineScreenTests.cs b/unity/Assets/Tests/EditMode/TimelineScreenTests.csnew file mode 100644index 000000000..ec527c9e8--- /dev/null+++ b/unity/Assets/Tests/EditMode/TimelineScreenTests.cs@@ -0,0 +1,357 @@+#nullable enable+using System;+using System.Linq;+using System.Collections;+using UnityEngine.TestTools;+using NUnit.Framework;+using Statecraft.Game;+using Statecraft.Game.UI;+using Statecraft.Sim;+using UnityEditor;+using UnityEngine;+using UnityEngine.UIElements;++/// <summary>#955: the read-only view consumes the real sim helper, never pending/queued answers.</summary>+public class TimelineScreenTests+{+ static readonly Content C = ContentLoader.Load(Paths.Content);+ static UiText Text(bool hebrew = false) => UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(hebrew ? UiPaths.StringsHebrew : UiPaths.Strings).text);+ static IDisposable Presenter(VisualElement root, SimBridge bridge, UiText text) => new TimelinePresenter(root, bridge, text);+ static GameSession Historical(int turns, Content? content = null)+ {+ var c = content ?? C; var g = GameSession.New(c, GoldenRun.Seed, Mode.Historical);+ for (int i = 0; i < turns; i++) g.Step(GoldenRun.Orders(c, g.State).ToArray());+ return g;+ }+ static VisualElement[] Rows(VisualElement root) => root.Query<VisualElement>(className: "timeline-row").ToList().ToArray();++ static (GameSession game, GameEvent ev, EventOption chosen, EventOption record) ResolvedIdf(Content content, bool alternative)+ {+ var game = GameSession.New(content, GoldenRun.Seed, Mode.Historical);+ for (int i = 0; !game.State.PendingEvents.Contains("idf_founding") && i < 2; i++) game.Step(Array.Empty<Command>());+ Assert.Contains("idf_founding", game.State.PendingEvents, "a real pending event is required");+ var ev = content.Events.Single(e => e.Id == "idf_founding");+ var record = ev.Options.Single(o => o.Historical);+ var chosen = alternative ? ev.Options.First(o => !o.Historical) : record;+ var orders = GoldenRun.Orders(content, game.State)+ .Where(c => !(c is ChooseEventOption choice && choice.EventId == ev.Id)).ToList();+ orders.Add(new ChooseEventOption(ev.Id, chosen.Id));+ game.Step(orders);+ Assert.AreEqual(chosen.Id, game.State.ChosenOptions[ev.Id], "the normal sim path resolved the chosen answer");+ return (game, ev, chosen, record);+ }++ [TestCase(false, false)]+ [TestCase(false, true)]+ [TestCase(true, false)]+ [TestCase(true, true)]+ public void ExistingEventNarrativeUsesTheRequestedLanguage(bool hebrew, bool alternative)+ {+ var content = ContentLoader.Load(Paths.Content);+ var (game, ev, chosen, record) = ResolvedIdf(content, alternative);+ Assert.IsNotEmpty(ev.TitleHe); Assert.IsNotEmpty(chosen.TextHe); Assert.IsNotEmpty(record.TextHe);+ Assert.IsNull(Timeline.Variant(content, game.State, ev), "this is the real base event, not an untranslated variant");+ using var ui = new UiTestKit(); var text = Text(hebrew); var bridge = new SimBridge(game, text);+ using var screen = Presenter(ui.Root, bridge, text); using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ var row = Rows(ui.Root).Single(r => (string)r.userData == ev.Id);+ Assert.AreEqual(hebrew ? ev.TitleHe : EventSystem.Title(content, game.State, ev), row.Q<Label>("timeline-title").text);+ Assert.AreEqual(hebrew ? chosen.TextHe : chosen.Text, row.Q<Label>("timeline-yours").text);+ Assert.AreEqual(hebrew ? record.TextHe : record.Text, row.Q<Label>("timeline-record").text);+ }++ [TestCase("title")]+ [TestCase("chosen")]+ [TestCase("record")]+ public void MissingHebrewNarrativeFieldsFallBackIndependently(string missing)+ {+ // Test-only absence in an independently loaded content copy; no shipped translation or review flag changes.+ var content = ContentLoader.Load(Paths.Content);+ var (game, ev, chosen, record) = ResolvedIdf(content, true);+ if (missing == "title") ev.TitleHe = "";+ else if (missing == "chosen") chosen.TextHe = "";+ else record.TextHe = "";+ using var ui = new UiTestKit(); var text = Text(true); var bridge = new SimBridge(game, text);+ using var screen = Presenter(ui.Root, bridge, text); using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ var row = Rows(ui.Root).Single(r => (string)r.userData == ev.Id);+ Assert.AreEqual(missing == "title" ? EventSystem.Title(content, game.State, ev) : ev.TitleHe, row.Q<Label>("timeline-title").text);+ Assert.AreEqual(missing == "chosen" ? chosen.Text : chosen.TextHe, row.Q<Label>("timeline-yours").text);+ Assert.AreEqual(missing == "record" ? record.Text : record.TextHe, row.Q<Label>("timeline-record").text);+ }++ [TestCase(false)]+ [TestCase(true)]+ public void VariantTitlesKeepTheirExistingEnglishFallback(bool hebrew)+ {+ var content = ContentLoader.Load(Paths.Content);+ var (game, ev, _, _) = ResolvedIdf(content, false);+ ev.Variants.Add(new EventVariant { Title = "Fixture variant title" });+ using var ui = new UiTestKit(); var text = Text(hebrew); var bridge = new SimBridge(game, text);+ using var screen = Presenter(ui.Root, bridge, text); using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ var row = Rows(ui.Root).Single(r => (string)r.userData == ev.Id);+ Assert.AreEqual("Fixture variant title", row.Q<Label>("timeline-title").text,+ "a translated base title must not hide the active variant's untranslated title");+ }++ [TestCase(false)]+ [TestCase(true)]+ public void NarrativeOfficePlaceholdersUseNamesInTheRequestedLanguage(bool hebrew)+ {+ var content = ContentLoader.Load(Paths.Content);+ var (game, ev, chosen, record) = ResolvedIdf(content, true);+ // Test-only placeholders, not new Hebrew prose or an assertion about the historical event's wording.+ ev.Title = ev.TitleHe = chosen.Text = chosen.TextHe = record.Text = record.TextHe = "{defense_minister}";+ using var ui = new UiTestKit(); var text = Text(hebrew); var bridge = new SimBridge(game, text);+ var expected = Cabinet.Fill(content, game.State, "{defense_minister}", EventSystem.FillDate(ev, game.State.Date),+ person => ContentNames.Of(text, person));+ Assert.AreEqual(hebrew, UiDirection.HasRightToLeft(expected), "existing content supplies the requested name");+ StringAssert.DoesNotContain("{", expected, "the office placeholder must actually be expanded");+ using var screen = Presenter(ui.Root, bridge, text); using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ var row = Rows(ui.Root).Single(r => (string)r.userData == ev.Id);+ foreach (var name in new[] { "timeline-title", "timeline-yours", "timeline-record" })+ Assert.AreEqual(expected, row.Q<Label>(name).text, name);+ }++ [Test]+ public void TheHudOpensTheTimelineAndCloseReturnsItsFocus()+ {+ using var ui = new UiTestKit();+ using var nav = new ScreenNav(ui.Root);+ var b = ui.Q<Button>("nav-timeline");+ UiTestKit.Press(b);+ Assert.AreEqual("timeline", nav.Current);+ Assert.IsTrue(ScreenNav.IsOpen(ui.Q<VisualElement>("screen-timeline")));+ var close = ui.Q<Button>("screen-close-timeline"); close.Focus(); UiTestKit.Press(close);+ Assert.IsNull(nav.Current);+ Assert.AreSame(b, ui.Root.panel.focusController.focusedElement);+ }++ [Test]+ public void OneRowPerResolvedEventAndNoMarkOnTheRecord()+ {+ using var ui = new UiTestKit();+ var g = Historical(6); var text = Text(); var bridge = new SimBridge(g, text);+ using var screen = Presenter(ui.Root, bridge, text);+ using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ var entries = Timeline.Entries(C, g.State); Assert.Greater(entries.Count, 0, "real resolved history");+ CollectionAssert.AreEqual(entries.Select(e => e.Event), Rows(ui.Root).Select(r => r.userData));+ Assert.Zero(ui.Root.Query<VisualElement>(className: "timeline-diverged").ToList().Count);+ foreach (var row in Rows(ui.Root))+ {+ Assert.IsNotEmpty(row.Q<Label>("timeline-title").text);+ Assert.AreEqual(row.Q<Label>("timeline-yours").text, row.Q<Label>("timeline-record").text);+ foreach (var marker in new[] { "timeline-attribution", "timeline-design", "timeline-rejoined", "timeline-difference" })+ Assert.IsNull(row.Q<Label>(marker), "the recorded path must not acquire a false marker: " + marker);+ }+ }++ [Test]+ public void ARoadNotTakenIsMarkedBesideTheRecord()+ {+ using var ui = new UiTestKit(); var text = Text();+ var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);+ // Force only a real pending event's alternative; all other answers use the reference player.+ for (int i = 0; !g.State.PendingEvents.Contains("idf_founding") && i < 2; i++) g.Step(Array.Empty<Command>());+ Assert.Contains("idf_founding", g.State.PendingEvents);+ var e = C.Events.Single(x => x.Id == "idf_founding"); var alternative = e.Options.First(o => !o.Historical);+ var orders = GoldenRun.Orders(C, g.State).Where(x => !(x is ChooseEventOption choice && choice.EventId == e.Id)).ToList();+ orders.Add(new ChooseEventOption(e.Id, alternative.Id)); g.Step(orders);+ var bridge = new SimBridge(g, text); using var screen = Presenter(ui.Root, bridge, text);+ using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ var row = Rows(ui.Root).Single(r => (string)r.userData == e.Id);+ Assert.IsTrue(row.ClassListContains("timeline-diverged"));+ Assert.AreEqual("≠", row.Q<Label>("timeline-difference").text, "difference is visible without relying on colour");+ StringAssert.Contains(alternative.Text, row.Q<Label>("timeline-yours").text);+ StringAssert.Contains(e.Options.Single(o => o.Historical).Text, row.Q<Label>("timeline-record").text);+ Assert.AreNotEqual(row.Q<Label>("timeline-yours").text, row.Q<Label>("timeline-record").text);+ }++ [Test]+ public void PendingAndQueuedAnswersAreAbsentAndReadingChangesNoStateOrSave()+ {+ using var ui = new UiTestKit(); var text = Text(); var g = Historical(6);+ for (int i = 0; i < 12 && g.State.PendingEvents.Count == 0; i++) g.Step(GoldenRun.Orders(C, g.State).ToArray());+ Assert.Greater(Timeline.Entries(C, g.State).Count, 0, "readonly checks must exercise resolved rows");+ Assert.Greater(g.State.PendingEvents.Count, 0, "real pending choice needed for the queue guard");+ var e = C.Events.Single(x => x.Id == g.State.PendingEvents.First());+ var bridge = new SimBridge(g, text); bridge.Queue(new ChooseEventOption(e.Id, e.Options.First().Id));+ Assert.AreEqual(1, bridge.Queued.Count);+ var state = g.State.Hash(); var save = g.Save.Write(); var queued = bridge.Queued.Single();+ using var screen = Presenter(ui.Root, bridge, text); using var nav = new ScreenNav(ui.Root);+ nav.Open("timeline"); nav.Close(); nav.Open("timeline");+ Assert.IsFalse(Rows(ui.Root).Any(r => (string)r.userData == e.Id), "pending/queued is not resolved");+ Assert.AreEqual(state, g.State.Hash()); Assert.AreEqual(save, g.Save.Write()); Assert.AreSame(queued, bridge.Queued.Single());+ }++ [Test]+ public void NewTurnsRefreshRowsAndDisposedScreensStopListening()+ {+ using var ui = new UiTestKit(); var text = Text(); var bridge = new SimBridge(Historical(1), text);+ var screen = Presenter(ui.Root, bridge, text); using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ var before = Rows(ui.Root).Length;+ for (int i = 0; i < 6; i++) { foreach (var c in GoldenRun.Orders(C, bridge.State)) bridge.Queue(c); bridge.EndTurn(); }+ Assert.Greater(Rows(ui.Root).Length, before);+ CollectionAssert.AreEqual(Timeline.Entries(C, bridge.State).Select(e => e.Event), Rows(ui.Root).Select(r => r.userData));+ screen.Dispose(); var rows = Rows(ui.Root);+ bridge.EndTurn(); nav.Close(); nav.Open("timeline"); Assert.AreSame(rows[0], Rows(ui.Root)[0], "disposed presenter cannot rebuild the tree");+ }++ [Test]+ public void AFixtureRejoinKeepsBothTheOriginalRoadAndTheMissingRecordFallback([Values(false, true)] bool hebrew)+ {+ // UI-only fixture: no consequence card is added to shipped content and no historical attribution is invented.+ var c = ContentLoader.Load(Paths.Content); var g = GameSession.New(c, GoldenRun.Seed, Mode.Historical);+ c.Events.Add(new GameEvent { Id = "fixture_parent", Title = "Fixture parent", From = new DateTime(1948, 5, 15),+ Options = { new EventOption { Id = "record", Text = "Recorded answer", Historical = true }, new EventOption { Id = "road", Text = "Other answer" } } });+ c.Events.Add(new GameEvent { Id = "fixture_followup", Kind = EventKinds.Consequence, Title = "Fixture follow-up", From = new DateTime(1948, 5, 16),+ Options = { new EventOption { Id = "return", Text = "Return answer", Rejoin = "fixture_parent" } } });+ g.State.ChosenOptions["fixture_followup"] = "return"; g.State.ChosenOptions["fixture_parent"] = "road";+ using var ui = new UiTestKit(); var text = Text(hebrew); var bridge = new SimBridge(g, text);+ using var screen = Presenter(ui.Root, bridge, text); using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ var rows = Rows(ui.Root); Assert.AreEqual(2, rows.Length);+ Assert.AreEqual("fixture_parent", rows[0].userData); Assert.AreEqual("fixture_followup", rows[1].userData);+ Assert.IsTrue(rows[0].ClassListContains("timeline-diverged"));+ Assert.AreEqual("Other answer", rows[0].Q<Label>("timeline-yours").text);+ Assert.AreEqual("Recorded answer", rows[0].Q<Label>("timeline-record").text);+ Assert.AreEqual(text["timeline.rejoined"], rows[0].Q<Label>("timeline-rejoined").text);+ Assert.AreEqual(text["timeline.no_record"], rows[1].Q<Label>("timeline-record").text);+ Assert.AreEqual(hebrew ? "15 במאי 1948" : "15 May 1948", rows[0].Q<Label>("timeline-date").text);+ Assert.AreEqual(hebrew ? "16 במאי 1948" : "16 May 1948", rows[1].Q<Label>("timeline-date").text, "use each event window, not the current game date");+ }++ [Test]+ public void ReopeningAndQueuingKeepTheSameRowsButReplacingTheSessionRefreshesThem()+ {+ using var ui = new UiTestKit(); var text = Text(); var bridge = new SimBridge(Historical(6), text);+ using var screen = Presenter(ui.Root, bridge, text); using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ var first = Rows(ui.Root)[0]; nav.Close(); nav.Open("timeline");+ Assert.AreSame(first, Rows(ui.Root)[0], "reading again must not reset the scroll tree");+ bridge.Queue(new SetMobilization(1.0)); Assert.AreSame(first, Rows(ui.Root)[0], "an unrelated queued order cannot rebuild history");+ bridge.Replace(GameSession.New(C, GoldenRun.Seed, Mode.Historical));+ Assert.IsEmpty(Rows(ui.Root), "a new game cannot retain the previous session's history");+ }++ [Test]+ public void LanguageRebuildUsesNewHeadingsAndTheExistingEventText()+ {+ using var ui = new UiTestKit(); var en = Text(); var he = Text(true); var bridge = new SimBridge(Historical(6), en);+ using var nav = new ScreenNav(ui.Root);+ var old = Presenter(ui.Root, bridge, en); nav.Open("timeline"); old.Dispose();+ using var current = Presenter(ui.Root, bridge, he); nav.Open("timeline");+ Assert.AreEqual(he["timeline.title"], ui.Q<Label>("timeline-screen-title").text);+ Assert.AreEqual(he["timeline.yours"], ui.Q<Label>("timeline-yours-heading").text);+ Assert.AreEqual(he["timeline.record"], ui.Q<Label>("timeline-record-heading").text);+ Assert.IsNotEmpty(Rows(ui.Root)); Assert.IsNotEmpty(Rows(ui.Root)[0].Q<Label>("timeline-yours").text);+ }++ [UnityTest]+ public IEnumerator ThePairedAnswersFitLaptopAndPhoneAndPageKeysReachTheLastRow()+ {+ foreach (var hebrew in new[] { false, true })+ foreach (var size in new[] { new Vector2Int(1280, 720), new Vector2Int(390, 844) })+ {+ var rt = new RenderTexture(size.x, size.y, 0);+ var ps = UnityEngine.Object.Instantiate(AssetDatabase.LoadAssetAtPath<PanelSettings>(UiPaths.Panel)); ps.targetTexture = rt;+ var go = new GameObject("TimelineLayoutTest"); go.SetActive(false);+ var doc = go.AddComponent<UIDocument>(); doc.panelSettings = ps;+ doc.visualTreeAsset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(UiPaths.GameUxml); go.SetActive(true);+ var root = doc.rootVisualElement; root.Q("root").RemoveFromClassList("loading");+ if (hebrew) root.Q("root").AddToClassList(UiLanguage.HebrewClass);+ var text = Text(hebrew); var content = ContentLoader.Load(Paths.Content); var game = Historical(12, content);+ // UI-only long attribution fixture; never added to shipped content or factual review records.+ content.Events.Add(new GameEvent { Id = "fixture_long_attribution", Title = "Fixture attribution wrapping", From = new DateTime(1948, 5, 15),+ Options = { new EventOption { Id = "record", Text = "Fixture recorded answer", Historical = true }, new EventOption {+ Id = "road", Text = "Fixture alternative answer", Alternative = new OptionAlternative { Basis = OptionAlternative.Debated,+ By = string.Join(" ", Enumerable.Repeat("Fixture body with a long name", 8)), Date = new DateTime(1948, 5, 15) } } } });+ game.State.ChosenOptions["fixture_long_attribution"] = "road";+ var bridge = new SimBridge(game, text);+ var hud = new HudPresenter(root, bridge, text);+ var screen = Presenter(root, bridge, text);+ var nav = new ScreenNav(root); nav.Open("timeline");+ var direction = new UiDirection(root, bridge);+ try+ {+ for (int i = 0; i < 12; i++) yield return null;+ var panel = root.Q("screen-timeline"); var window = root.worldBound;+ Assert.Greater(panel.worldBound.width, 0); Assert.Greater(panel.worldBound.height, 0);+ Assert.GreaterOrEqual(panel.worldBound.xMin, window.xMin); Assert.LessOrEqual(panel.worldBound.xMax, window.xMax);+ Assert.GreaterOrEqual(panel.worldBound.yMin, window.yMin); Assert.LessOrEqual(panel.worldBound.yMax, window.yMax);+ var view = root.Q<ScrollView>("timeline-list"); Assert.Greater(view.contentViewport.worldBound.height, 0);+ foreach (var row in Rows(root))+ {+ var yours = row.Q<Label>("timeline-yours"); var record = row.Q<Label>("timeline-record");+ Assert.AreEqual(hebrew, yours.worldBound.center.x > record.worldBound.center.x, "columns follow the interface language");+ foreach (var label in row.Query<Label>().ToList())+ {+ Assert.IsNotEmpty(label.text, label.name);+ Assert.Greater(label.contentRect.width, 0, label.name);+ Assert.GreaterOrEqual(label.worldBound.xMin, view.contentViewport.worldBound.xMin - 1f, label.name);+ Assert.LessOrEqual(label.worldBound.xMax, view.contentViewport.worldBound.xMax + 1f, label.name);+ var measured = label.MeasureTextSize(label.text, label.contentRect.width, VisualElement.MeasureMode.Exactly, 0, VisualElement.MeasureMode.Undefined);+ Assert.LessOrEqual(measured.y, label.contentRect.height + 1f, label.name + " text must fit rather than clip");+ }+ }+ var close = root.Q<Button>("screen-close-timeline"); close.Focus();+ Assert.Greater(view.verticalScroller.highValue, 0, "real history must overflow this reading screen");+ Assert.IsTrue(KeyScroll.Press(root, "timeline", false, KeyScroll.Key.End));+ Assert.AreEqual(view.verticalScroller.highValue, view.scrollOffset.y, 0.5f);+ Assert.AreSame(close, root.panel.focusController.focusedElement, "scroll keys never lose the focused Close button");+ Assert.IsTrue(KeyScroll.Press(root, "timeline", false, KeyScroll.Key.Home));+ Assert.AreEqual(0f, view.scrollOffset.y, 0.5f);+ }+ finally+ {+ nav.Dispose(); screen.Dispose(); hud.Dispose(); direction.Dispose();+ UnityEngine.Object.DestroyImmediate(go); UnityEngine.Object.DestroyImmediate(ps); rt.Release(); UnityEngine.Object.DestroyImmediate(rt);+ }+ }+ }++ [Test]+ public void AConsideredChosenAlternativeShowsItsOwnAttributionOnlyAfterTheChoice(+ [Values(OptionAlternative.Proposed, OptionAlternative.Debated, OptionAlternative.Design, "none")] string basis,+ [Values(false, true)] bool hebrew)+ {+ // Entirely test-only metadata: "Fixture body" is not a real institution or an assertion about history.+ var c = ContentLoader.Load(Paths.Content); var g = GameSession.New(c, GoldenRun.Seed, Mode.Historical);+ var option = new EventOption { Id = "road", Text = "Fixture answer", Alternative = basis == "none" ? null : new OptionAlternative {+ Basis = basis, By = basis == OptionAlternative.Design ? "" : "Fixture body",+ Date = basis == OptionAlternative.Design ? (DateTime?)null : new DateTime(1948, 5, 16) } };+ c.Events.Add(new GameEvent { Id = "fixture_attribution", Title = "Fixture attribution", From = new DateTime(1948, 5, 15),+ Options = { new EventOption { Id = "record", Text = "Fixture recorded answer", Historical = true }, option } });+ // One separate pending alternative must never disclose an attribution before the player chooses it.+ c.Events.Add(new GameEvent { Id = "fixture_pending", Title = "Fixture pending", From = new DateTime(1948, 5, 15),+ Options = { new EventOption { Id = "record", Text = "Fixture record", Historical = true }, new EventOption {+ Id = "road", Text = "Fixture pending answer", Alternative = new OptionAlternative { Basis = OptionAlternative.Proposed,+ By = "Pending fixture body", Date = new DateTime(1948, 5, 15) } } } });+ g.State.ChosenOptions["fixture_attribution"] = "road"; g.State.PendingEvents.Add("fixture_pending");+ using var ui = new UiTestKit(); var text = Text(hebrew); var bridge = new SimBridge(g, text);+ using var screen = Presenter(ui.Root, bridge, text); using var nav = new ScreenNav(ui.Root); nav.Open("timeline");+ Assert.AreEqual(1, Rows(ui.Root).Length, "pending attribution is not shown as history");+ var label = Rows(ui.Root)[0].Q<Label>("timeline-attribution");+ if (basis == "none")+ {+ Assert.IsNull(label, "no invented attribution for old content with no metadata");+ Assert.IsNull(Rows(ui.Root)[0].Q<Label>("timeline-design"), "no invented design classification for metadata-free content");+ return;+ }+ if (basis == OptionAlternative.Design)+ {+ Assert.IsNull(label, "design cannot be represented as a documented proposal");+ var design = Rows(ui.Root)[0].Q<Label>("timeline-design"); Assert.IsNotNull(design, "GDD195 requires identifying a design assumption");+ Assert.AreEqual(hebrew ? "הנחת תכנון." : "Design assumption.", design.text);+ Assert.IsFalse(design.focusable); return;+ }+ Assert.IsNotNull(label, "the chosen considered alternative needs its recorded attribution (Q-ALT-7)");+ Assert.IsNull(Rows(ui.Root)[0].Q<Label>("timeline-design"), "a considered alternative is not a design-only assumption");+ if (!hebrew) Assert.AreEqual(basis == OptionAlternative.Proposed+ ? "Not adopted. Proposed by Fixture body, 16 May 1948."+ : "Not adopted. Debated by Fixture body, 16 May 1948.", label.text);+ else+ {+ StringAssert.Contains(basis == OptionAlternative.Proposed ? "הוצע בידי" : "נדון בידי", label.text);+ StringAssert.Contains("Fixture body", label.text); StringAssert.Contains("16 במאי 1948", label.text);+ }+ Assert.IsFalse(label.focusable, "attribution adds no keyboard stop");+ }++}diff --git a/unity/Assets/Tests/EditMode/TimelineScreenTests.cs.meta b/unity/Assets/Tests/EditMode/TimelineScreenTests.cs.metanew file mode 100644index 000000000..6867d887f--- /dev/null+++ b/unity/Assets/Tests/EditMode/TimelineScreenTests.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: eb22715e59bc0476b92f8f3490ad9259\ No newline at end of filediff --git a/unity/Assets/Tests/EditMode/TopBarTests.cs b/unity/Assets/Tests/EditMode/TopBarTests.csindex 35d096c15..d46f04fa6 100644--- a/unity/Assets/Tests/EditMode/TopBarTests.cs+++ b/unity/Assets/Tests/EditMode/TopBarTests.cs@@ -625,7 +625,7 @@ public class TopBarTests{var order = root.Query<Button>().ToList().Where(e => e.focusable && e.canGrabFocus && e.tabIndex >= 0).Select(e => e.name).Where(n => n.StartsWith("nav-") || n == "new-game" || n == "end-turn" || n.StartsWith("minimap-")).ToList();- CollectionAssert.AreEqual(new[] { "nav-cabinet", "nav-budget", "nav-defence", "nav-why", "nav-how-to-play", "nav-objectives", "nav-settings", "new-game", "end-turn", "minimap-overview", "minimap-labels", "minimap-borders" },+ CollectionAssert.AreEqual(new[] { "nav-cabinet", "nav-budget", "nav-defence", "nav-why", "nav-timeline", "nav-how-to-play", "nav-objectives", "nav-settings", "new-game", "end-turn", "minimap-overview", "minimap-labels", "minimap-borders" },order, (hebrew ? "he" : "en") + ": the Tab order");}, widest: false);}diff --git a/unity/Assets/UI/Game.uxml b/unity/Assets/UI/Game.uxmlindex e64de1e55..0ffe46ac1 100644--- a/unity/Assets/UI/Game.uxml+++ b/unity/Assets/UI/Game.uxml@@ -17,6 +17,7 @@<ui:Button name="nav-budget" text="Budget" class="nav-button rail-button"><Statecraft.Game.UI.UiIcon glyph="ledger" class="nav-disc" /></ui:Button><ui:Button name="nav-defence" text="Defence" class="nav-button rail-button"><Statecraft.Game.UI.UiIcon glyph="helmet" class="nav-disc" /></ui:Button><ui:Button name="nav-why" text="Why?" class="nav-button rail-button"><Statecraft.Game.UI.UiIcon glyph="question" class="nav-disc" /></ui:Button>+ <ui:Button name="nav-timeline" text="Timeline" class="nav-button rail-button"><Statecraft.Game.UI.UiIcon glyph="hourglass" class="nav-disc" /></ui:Button><ui:Button name="nav-how-to-play" text="How to play" class="nav-button rail-button"><Statecraft.Game.UI.UiIcon glyph="book" class="nav-disc" /></ui:Button><ui:Button name="nav-objectives" text="Objectives" class="nav-button rail-button"><Statecraft.Game.UI.UiIcon glyph="flag" class="nav-disc" /></ui:Button><ui:Button name="nav-settings" text="Settings" class="nav-button rail-button"><Statecraft.Game.UI.UiIcon glyph="gear" class="nav-disc" /></ui:Button>@@ -326,6 +327,12 @@<ui:ScrollView name="why-rows" class="grow" /><Statecraft.Game.UI.UiFrame /></ui:VisualElement>+ <ui:VisualElement name="screen-timeline" class="panel screen screen-wide">+ <ui:VisualElement class="screen-header"><ui:Label name="timeline-screen-title" class="title" /></ui:VisualElement>+ <ui:VisualElement class="timeline-columns timeline-headings"><ui:Label name="timeline-yours-heading" /><ui:Label name="timeline-record-heading" /></ui:VisualElement>+ <ui:ScrollView name="timeline-list" class="grow" />+ <Statecraft.Game.UI.UiFrame />+ </ui:VisualElement><!-- A short guide to the existing loop (#1041). It is a normal side-menu screen, so ScreenNav owns opening and closing. --><ui:VisualElement name="screen-how-to-play" class="panel screen"><ui:VisualElement class="screen-header"><ui:Label name="how-to-play-title" text="How to play" class="title" /></ui:VisualElement>diff --git a/unity/Assets/UI/Statecraft.uss b/unity/Assets/UI/Statecraft.ussindex 4702471de..80eb2903b 100644--- a/unity/Assets/UI/Statecraft.uss+++ b/unity/Assets/UI/Statecraft.uss@@ -222,15 +222,16 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);full height (the bar draws over its top), shown and taking the pointer only while the decision card is open. */.event-gutter { display: none; position: absolute; left: 0; top: 112px; bottom: 0; width: 72px; background-color: rgba(5, 9, 18, 0.55); }.event-modal .event-gutter { display: flex; }-.left-column .rail-button { width: 45px; height: 45px; margin: 0 0 3px 0; padding: 0; font-size: 1px; color: rgba(0, 0, 0, 0); }+.left-column .rail-button { width: 40px; height: 40px; margin: 0 0 2px 0; padding: 0; font-size: 1px; color: rgba(0, 0, 0, 0); }.left-column .rail-button:hover, .left-column .rail-button:focus, .left-column .nav-open { color: rgba(0, 0, 0, 0); }-/* Seven discs since Objectives (#1189). On the one-row bar: 45 px, 3 px apart, so the column still ends at 112 + 336 px- (six 50 px discs 6 px apart, #1041: the same), above the info panel's top (456 px) in a short, wide window- (InfoPanelLayoutTests), and at least 29 screen px in the smallest one-row window (1366x657). The narrow, two-row and- three-row tiers keep their discs (50 px; 60 px on a phone): the column starts lower there, the info panel is far- below it, and 960x600 needs 50 px for the 24 screen px floor (LeftColumnTests). The column keeps its 56 px width, so- the backdrop, the screens and the toast keep their places. */-.left-column .rail-button .nav-disc { top: 0; left: 0; width: 45px; height: 45px; padding: 10.5px; border-radius: 22.5px; }+/* Eight discs with Timeline (#955) after Objectives (#1189). On the one-row bar: 40 px, 2 px apart, so the column still+ ends at 112 + 336 px (seven 45 px discs 3 px apart, #1189, and six 50 px discs 6 px apart, #1041: the same), above the+ info panel's top (456 px) in a short, wide window (InfoPanelLayoutTests), and at least 26 screen px in the smallest+ one-row window (1366x657), over the 24 screen px floor. The glyph keeps its 24 px through the smaller padding. The+ narrow, two-row and three-row tiers keep their discs (50 px; 60 px on a phone): the column starts lower there, the info+ panel is far below it, and 960x600 needs 50 px for the 24 screen px floor (LeftColumnTests). The column keeps its 56 px+ width, so the backdrop, the screens and the toast keep their places. */+.left-column .rail-button .nav-disc { top: 0; left: 0; width: 40px; height: 40px; padding: 8px; border-radius: 20px; }.hud-narrow .left-column > .rail-button { width: 50px; height: 50px; margin: 0 0 6px 0; }.hud-narrow .left-column > .rail-button .nav-disc { width: 50px; height: 50px; padding: 11px; border-radius: 25px; }/* A screen with something to do this turn (#1109, HudPresenter.ActionClass): a small gold dot on the disc's upper right,@@ -990,3 +991,16 @@ Button.settings-choice-selected { -unity-font-definition: url("project://databas.lang-he .info-gdd-pairs > .info-gdd-line { margin-right: 0; margin-left: 14px; }.hud-two-row .info-panel.info-gdd-shown { width: 452px; flex-wrap: wrap; }.hud-two-row .info-gdd { width: 100%; margin: 8px 0 0 0; padding: 8px 0 0 0; border-left-width: 0; border-right-width: 0; border-top-width: 1px; }++/* #955: paired answers remain side by side, wrapping within equal columns. */+.timeline-columns { flex-direction: row; align-items: stretch; }+.timeline-columns > Label { flex-basis: 0; flex-grow: 1; min-width: 0; padding-left: 8px; padding-right: 8px; white-space: normal; }+.lang-he .timeline-columns { flex-direction: row-reverse; }+.timeline-headings { flex-shrink: 0; margin-bottom: 8px; color: var(--gold-light); }+.timeline-row { flex-shrink: 0; border-bottom-width: 1px; border-color: var(--gold-dim); padding: 10px 4px; }+.timeline-line { white-space: normal; }+#timeline-title { color: var(--gold-light); margin-bottom: 6px; }+#timeline-date { font-size: 16px; }+.timeline-diverged { border-left-width: 3px; padding-left: 8px; }+.lang-he .timeline-diverged { border-left-width: 0; border-right-width: 3px; padding-left: 4px; padding-right: 8px; }+#timeline-difference, #timeline-rejoined { color: var(--gold-light); }diff --git a/unity/Assets/UI/strings.en.yaml b/unity/Assets/UI/strings.en.yamlindex c6c1fc126..03a44d43a 100644--- a/unity/Assets/UI/strings.en.yaml+++ b/unity/Assets/UI/strings.en.yaml@@ -493,3 +493,16 @@ site.build_swamp: "Drain the swamp with {0}: {1}, {2}"site.building_swamp: "Being drained by {0}: {1} left"site.stop_swamp: "Stop draining (the money spent is lost)"site.built_swamp: "Drained on {0}"++# Timeline screen (#955).+timeline.title: "Your course and the record"+timeline.yours: "Your course"+timeline.record: "The record"+timeline.no_record: "No single recorded answer"+timeline.rejoined: "Rejoined the record"+nav.timeline: "Timeline"++# Q-ALT-7: after the choice only; GDD195 identifies design assumptions.+timeline.alt_proposed: "Not adopted. Proposed by {0}, {1}."+timeline.alt_debated: "Not adopted. Debated by {0}, {1}."+timeline.alt_design: "Design assumption."diff --git a/unity/Assets/UI/strings.he.yaml b/unity/Assets/UI/strings.he.yamlindex b9f1528df..47d02c6c8 100644--- a/unity/Assets/UI/strings.he.yaml+++ b/unity/Assets/UI/strings.he.yaml@@ -531,3 +531,16 @@ site.build_swamp: "ייבוש הביצה עם {0}: {1}, {2}"site.building_swamp: "בייבוש בידי {0}: עוד {1}"site.stop_swamp: "עצירת הייבוש (הכסף שהוצא לא יוחזר)"site.built_swamp: "יובש ב־{0}"++# Timeline screen (#955). Hebrew drafts: agent-checked, native review pending (#564).+timeline.title: "הדרך שלך והרצף ההיסטורי"+timeline.yours: "הדרך שלך"+timeline.record: "הרצף ההיסטורי"+timeline.no_record: "אין תשובה מתועדת אחת"+timeline.rejoined: "חזרה לרצף ההיסטורי"+nav.timeline: "ציר הזמן"++# Q-ALT-7: after the choice only; GDD195 identifies design assumptions. Hebrew drafts: agent-checked; native review pending (#564).+timeline.alt_proposed: "לא אומץ. הוצע בידי {0}, {1}."+timeline.alt_debated: "לא אומץ. נדון בידי {0}, {1}."+timeline.alt_design: "הנחת תכנון."