An item row's date is short and smaller (#508)

"Dec 3, 2026" at 15px took a third of a phone row and cut the title short.
Now the time today, "Nov 20" this year, "May 2025" before, at 13px; the
full date stays in the tooltip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RqkrVCCH8YcP2Y3i8VNYWA
This commit is contained in:
2026-12-03 12:38:43 -05:00
parent 3de955c52a
commit 1794a4c944
5 changed files with 23 additions and 2 deletions

View File

@@ -86,6 +86,15 @@ test('ago says how long since, and never for nothing', () => {
assert.match(run(`ago(${NOW - 90 * 86400})`), /2026/);
});
test('a row date is short: the time today, the day this year, the month before (#508)', () => {
const now = 'new Date(2026, 11, 3, 15, 0)';
assert.match(run(`rowDate(new Date(2026, 11, 3, 9, 36).getTime()/1000, ${now})`), /9:36/);
const day = run(`rowDate(new Date(2026, 10, 20).getTime()/1000, ${now})`);
assert.match(day, /20/); assert.doesNotMatch(day, /2026/);
assert.match(run(`rowDate(new Date(2025, 4, 2).getTime()/1000, ${now})`), /2025/);
assert.equal(run('rowDate(null)'), '');
});
test('due says how long until a feed is checked', () => {
assert.equal(run(`due(${NOW - 1})`), 'due now');
assert.equal(run(`due(${NOW + 10})`), 'in 1m');