Skip to content

Commit 7393d16

Browse files
traviswheelerclaude
andcommitted
Strike through passed deadlines instead of labeling them 'passed'
deadlineCell() detects a passed deadline (explicit 'passed' marker or a parseable date before today), removes the '(passed)' annotation, and renders the remaining date with a line-through .passed style. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f0424ad commit 7393d16

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

app.js

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,43 @@ function daysUntil(conf, today) {
4141
return Math.round((parseISO(conf.start) - today) / 86400000);
4242
}
4343

44+
// Renders a deadline cell. When the deadline has passed, the text is struck
45+
// through (with the "(passed)" annotation removed) rather than labeled "passed".
46+
// A deadline counts as passed if the data marks it "passed" or if a parseable
47+
// date in the string is before today.
48+
function deadlineCell(value) {
49+
const td = el("td");
50+
const raw = (value || "TBD").trim();
51+
const lower = raw.toLowerCase();
52+
53+
if (lower === "tbd" || lower === "n/a" || raw === "") {
54+
td.textContent = raw || "TBD";
55+
return td;
56+
}
57+
58+
// Drop the "passed" marker, keeping any other note (e.g. "abstracts, passed").
59+
let text = raw
60+
.replace(/\s*\(([^)]*\bpassed\b[^)]*)\)/i, (_m, inner) => {
61+
const rest = inner.replace(/\s*,?\s*passed\s*/i, "").trim();
62+
return rest ? ` (${rest})` : "";
63+
})
64+
.replace(/\s*,?\s*passed\s*$/i, "")
65+
.trim();
66+
if (text === "") text = raw; // was a bare "passed" with no date
67+
68+
const parsed = Date.parse(text);
69+
const isPast =
70+
/\bpassed\b/i.test(raw) ||
71+
(!isNaN(parsed) && parsed < startOfToday().getTime());
72+
73+
if (isPast) {
74+
td.appendChild(el("span", { text, className: "passed" }));
75+
} else {
76+
td.textContent = text;
77+
}
78+
return td;
79+
}
80+
4481
function renderUpcoming(list, today) {
4582
const tbody = document.querySelector("#upcoming-table tbody");
4683
const emptyMsg = document.getElementById("empty-msg");
@@ -64,8 +101,8 @@ function renderUpcoming(list, today) {
64101
}
65102
tr.appendChild(dates);
66103

67-
tr.appendChild(el("td", { text: conf.paper_deadline || "TBD" }));
68-
tr.appendChild(el("td", { text: conf.poster_deadline || "TBD" }));
104+
tr.appendChild(deadlineCell(conf.paper_deadline));
105+
tr.appendChild(deadlineCell(conf.poster_deadline));
69106
tbody.appendChild(tr);
70107
}
71108
}

style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ td a:hover { text-decoration: underline; }
6060

6161
.soon { color: var(--soon); font-weight: 600; }
6262

63+
.passed { text-decoration: line-through; color: var(--muted); }
64+
6365
.empty { color: var(--muted); font-style: italic; }
6466

6567
details { margin-top: 1rem; }

0 commit comments

Comments
 (0)