From d69028d1d2944dbdae9e69b59967a82ab0652b7f Mon Sep 17 00:00:00 2001 From: "@permadeath.com" Date: Fri, 21 Aug 2026 11:32:41 -0400 Subject: [PATCH] docs(forces): rework the Hangar filter reference Drop the Alpha Strike filter, lead with the chassis-versus-bare-word example, and say only that the unsupported filters are coming soon. --- web/scripts/hangar.test.mjs | 12 +++++++++++- web/src/screens/hangar.ts | 14 ++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/web/scripts/hangar.test.mjs b/web/scripts/hangar.test.mjs index 7b1e85c..efe9be5 100644 --- a/web/scripts/hangar.test.mjs +++ b/web/scripts/hangar.test.mjs @@ -422,7 +422,13 @@ test("the filter reference says what is not supported yet, and marks it", async // whether they got the syntax wrong or asked the library for something it // does not carry. const hangar = await readFile(`${web}src/screens/hangar.ts`, "utf8"); - for (const missing of ["equipment", "quirks", "alpha", "engine", "faction"]) { + for (const missing of [ + "equipment", + "quirks", + "damage", + "engine", + "faction", + ]) { assert.match( hangar, new RegExp(`soon\\("${missing}"`), @@ -430,6 +436,10 @@ test("the filter reference says what is not supported yet, and marks it", async ); } assert.match(hangar, /coming soon/, "nothing marks the unsupported terms"); + assert.ok( + !hangar.includes('soon("alpha"'), + "Alpha Strike is back on the list of things to come", + ); // And they are not silently accepted by the parser either. assert.equal(parseQuery('equipment:"ER PPC"').filters.length, 0); }); diff --git a/web/src/screens/hangar.ts b/web/src/screens/hangar.ts index e62a94f..5b6080f 100644 --- a/web/src/screens/hangar.ts +++ b/web/src/screens/hangar.ts @@ -186,13 +186,20 @@ export function hangarScreen(): Node[] { }), el("ul", { className: "hangar-help-examples" }, [ example("atlas", "every Atlas"), + example( + "hawk", + "193 designs: Phoenix Hawk, Black Hawk, Battle Hawk and 23 other chassis", + ), + example( + 'chassis:"black hawk"', + "33: the Black Hawks and nothing else. Quoted, because the name has a space in it", + ), example("bv<=1500", "nothing dearer than 1,500 battle value"), example( "era<=3025 tech:inner", "Inner Sphere designs of 3025 or earlier", ), example("class:heavy jump>0", "heavies that jump"), - example('chassis:"black hawk"', "a name with a space in it, quoted"), example("role:brawler mass>=70", "brawlers of 70 tons and up"), ]), el("h3", { textContent: "Every key" }), @@ -200,15 +207,10 @@ export function hangarScreen(): Node[] { el("code", { textContent: FILTER_KEYS.join(", ") }), ]), el("h3", { textContent: "Not yet" }), - el("p", { - textContent: - "These are questions the library cannot answer yet. Each one needs a column helm does not publish in the index — the data exists in its database, so the work is deciding what a browser should carry rather than finding it.", - }), el("ul", { className: "hangar-help-soon" }, [ soon("equipment", 'equipment:"ER PPC"', "what a design carries"), soon("quirks", "quirks:battlefists", "MegaMek's per-design quirks"), soon("damage", "damage9>=20", "damage at a range band"), - soon("alpha", "alpha:3/3/2", "the Alpha Strike conversion"), soon("engine", "engine:xl", "engine, structure and armour types"), soon("faction", "faction:steiner", "who fielded it, and when"), ]), -- 2.51.2