From e9a1c56434f81d6dda08e3d6665f34d8d09c5ddb Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 16 Sep 2026 14:41:17 +0000 Subject: [PATCH] Give a highlighted fixture back its date, and let the folded sheet have one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A tooltip has room for a headline and a detail, and the split rewrite spent the detail on the mirror archive. So a cell highlighted as an upcoming first meeting said "first meeting coming up" and stopped there — the date and the competition, the only reason to look at a yellow cell, were gone. A played pair quietly lost the years it has met between, and a pre-debut cell the year of its first match. The cell's own archive keeps its detail now and the mirror is appended, not substituted, so a summary is three lines where it has three things to say. summaryHtml renders as many as it is given rather than exactly two. Upcoming was also dead on the folded sheet: the toggle greyed out with the never-played one, on the grounds that both were single-archive ideas. Only one of them is. Never-played moves the meetings ramp, and a folded cell carries the four-way key instead, whose colours are fixed — but a pairing that has never met in either game and has a date booked is exactly what the folded sheet is for. It highlights those 23 pairs now, on the same rule the unfolded halves use: yellow replaces never, and a pair that has already met in one game keeps the colour that says so. The folded tooltip names the fixture too. While there: the folded key never named the three empties the sheet can also paint, and the fixtures feed still described itself as covering both games "whichever dataset the grid is set to", which has not been a thing to set since the fold landed. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Ktg1PkqJw6sBz1Wh5qyDsh --- docs/app.js | 50 +++++++++++++++++++++++++++++++------------------ docs/index.html | 3 +++ docs/style.css | 4 ++++ 3 files changed, 39 insertions(+), 18 deletions(-) diff --git a/docs/app.js b/docs/app.js index 4542f48..b6aff0c 100644 --- a/docs/app.js +++ b/docs/app.js @@ -365,6 +365,8 @@ function isUpcoming(a, b, gender = "both") { const u = upcomingInfo(a, b, gender); return !!u && u[0] >= S.today; } +// Folded, a cell is both archives at once, so a date in either one is a date for the cell. +const isUpcomingEither = (a, b) => isUpcoming(a, b, "men") || isUpcoming(a, b, "women"); // Has this team played anyone at all in the active archive? An entire empty row is a // different fact from "these two have never met", and the site says so. @@ -718,9 +720,12 @@ function draw() { } else if (ink === "combined") { const sil = silent.both, pre = predebut.both; col = metCategory(a, b) ? combinedColor(a, b) - : (sil[r] || sil[c]) ? nodataCol - : (pre[r] || pre[c]) ? predebutCol - : neverCol; + // Never met in either game, and a date on the calendar to change that: the same + // rule the unfolded halves use, asked of the pairing rather than one archive. + : (S.showUpcoming && atPresent && isUpcomingEither(a, b)) ? upcomingCol + : (sil[r] || sil[c]) ? nodataCol + : (pre[r] || pre[c]) ? predebutCol + : neverCol; } else { const g = inkGender(ink, r, c); const sil = silent[g], pre = predebut[g]; @@ -1180,15 +1185,25 @@ function pairSummary(aId, bId, gender = "both") { return { title: A.name, lines: [`${A.confed}${A.defunct ? " · defunct" : ""}`], self: true }; } const title = `${A.name} v ${B.name}`; - if (gender === "both") { // no half in hand: report the two archives - const say = g => `${archiveWord(g)}: ${archiveSummary(A, B, g).lines[0]}`; - return { title, lines: [say("men"), say("women")] }; + if (gender === "both") { // the folded sheet: one cell, both archives + const lines = [`${archiveWord("men")}: ${archiveSummary(A, B, "men").lines[0]}`, + `${archiveWord("women")}: ${archiveSummary(A, B, "women").lines[0]}`]; + // When and where, which is the one thing neither of those lines has room for. + for (const g of ["men", "women"]) { + const up = upcomingInfo(A.id, B.id, g); + if (up && present()) lines.push(`${up[0]} · ${up[1]}`); + } + return { title, lines }; } + /* The cell's own archive leads and keeps its detail — the years a pair has met between, + or the date a first meeting is booked for. Losing that second line to the mirror is + how a highlighted fixture stopped being able to say when. The mirror follows it. */ const sum = archiveSummary(A, B, gender); const other = gender === "men" ? "women" : "men"; - return { ...sum, title, - lines: [`${archiveWord(gender)}: ${sum.lines[0]}`, - `${archiveWord(other)}: ${archiveSummary(A, B, other).lines[0]}`] }; + const lines = [`${archiveWord(gender)}: ${sum.lines[0]}`]; + if (sum.lines[1]) lines.push(sum.lines[1]); + lines.push(`${archiveWord(other)}: ${archiveSummary(A, B, other).lines[0]}`); + return { ...sum, title, lines }; } const genderWord = (gender = "both") => (gender === "both" ? "senior" : gender === "men" ? "men's" : "women's"); @@ -1207,7 +1222,7 @@ function summaryHtml(sum) { const cls = sum.upcoming ? "up" : sum.silent ? "silent" : sum.predebut ? "pre" : "n"; return `
${esc(sum.title)}
` + `
${esc(sum.lines[0] || "")}
` - + (sum.lines[1] ? `
${esc(sum.lines[1])}
` : ""); + + sum.lines.slice(1).map(l => `
${esc(l)}
`).join(""); } function showTooltip(rc, mx, my) { @@ -1758,7 +1773,7 @@ function renderFixtures() {

Never met. Scheduled to.

Every pairing below would be a first meeting in the history of the game — two national teams that have never played each other, with a date. This feed covers - both games, whichever dataset the grid is set to${esc(isFiltered() ? ", filtered to the teams in the panel" : "")}. + both games${esc(isFiltered() ? ", filtered to the teams in the panel" : "")}. Subscribe by RSS or JSON.

` + groups.map(gr => @@ -2376,13 +2391,12 @@ function setFolded(folded) { b.setAttribute("aria-selected", on ? "true" : "false"); b.tabIndex = on ? 0 : -1; }); - /* Never-played and upcoming are single-archive ideas. Each half of the unfolded sheet - has one archive, so they mean something there; the folded sheet is the two read - together and answers with its own four-way key instead. */ - for (const id of ["opt-highlight", "opt-upcoming"]) { - const el = $(id); - if (el) el.disabled = folded; - } + /* Never-played moves the meetings ramp, and the folded sheet has no ramp — it carries + the four-way key, whose colours are fixed. Upcoming is not like that: a pairing that + has never met in either game and has a date booked is exactly what the folded sheet is + for, so it stays live on both. */ + const highlight = $("opt-highlight"); + if (highlight) highlight.disabled = folded; // The keyboard focus may be sitting on the half that has just folded away; the same // pairing is waiting for it across the crease. if (folded && S.focus && S.focus.c < S.focus.r) S.focus = { r: S.focus.c, c: S.focus.r }; diff --git a/docs/index.html b/docs/index.html index 86f8cac..0c011db 100644 --- a/docs/index.html +++ b/docs/index.html @@ -153,6 +153,9 @@

Legend

men's only women's only neither + upcoming + not yet debuted + never played anyone

The two halves laid on top of each other: each cell is one pairing, answered by both archives at once.

diff --git a/docs/style.css b/docs/style.css index d478c29..d5b19f4 100644 --- a/docs/style.css +++ b/docs/style.css @@ -224,6 +224,10 @@ body[data-never="1"] #sw-never { background: var(--never-hi); border-color: var( #sw-men { background: var(--men-only); } #sw-women { background: var(--women-only); } #sw-neither { background: var(--never); border: 1px solid var(--grid-strong); } +/* The three empties the folded sheet can also paint, which its key never named. */ +#sw-up-folded { background: var(--upcoming); } +#sw-pre-folded { background: var(--predebut); border: 1px solid var(--grid); } +#sw-none-folded { background: var(--nodata); border: 1px solid var(--nodata-line); } .split-key { display: flex; gap: 10px; align-items: flex-start; } .split-key svg { flex: none; border: 1px solid var(--grid-strong); border-radius: 2px; } .split-key .hint { margin: 0; line-height: 1.5; }