diff --git a/tests/page-unit.ts b/tests/page-unit.ts index 20a5be0..79016fd 100644 --- a/tests/page-unit.ts +++ b/tests/page-unit.ts @@ -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'); diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index b31d64c..e12e9fc 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- An item row's date is short and smaller: the time today, the day and month this year, the month and year before; the full date on hover (#508). - A toolbar button that cannot act says why in its tooltip (Choose an item first, Open a feed to unsubscribe from it, Nothing to play in this item), and the admin page's Save says nothing has changed yet; on a phone a checkbox's row is 40 px to tap (#507). - On a phone the toolbar's buttons and the list's tabs are at least 40 px to tap, a chapter no longer stays lit after a tap, and an item's pin and download buttons have names a screen reader reads, as the style guide's design half asks (#507). - The page's words follow one style (docs/STYLE-GUIDE.md): failures say "Unable to …" and what to do, a podcast is a podcast rather than a show, a feed has an address rather than a URL, and the buttons Auto and Initials in a signal's icon picker read Pick for me and Use initials (#507). diff --git a/web/app.css b/web/app.css index 29395aa..c57f812 100644 --- a/web/app.css +++ b/web/app.css @@ -1580,7 +1580,8 @@ body:has(#player.on) #status{padding-bottom:3px} .ep{padding:10px 8px;border-radius:10px;min-height:44px} .ep.sel{border-color:var(--edge)} .ep .t{font-size:17px} - .ep .line,.ep .date{font-size:15px} + .ep .line{font-size:15px} + .ep .date{font-size:13px} .ep+.ep{background-image:linear-gradient(var(--line),var(--line));background-size:calc(100% - 8px) 1px;background-position:8px 0;background-repeat:no-repeat} .ep.sel,.ep.sel+.ep{background-image:none} .feed{padding:9px 10px;min-height:44px;border-radius:10px} diff --git a/web/src/items.ts b/web/src/items.ts index 68bf6ff..10d5bf0 100644 --- a/web/src/items.ts +++ b/web/src/items.ts @@ -219,7 +219,7 @@ function epEl(e: Entry){ ${enc&&!has?`
`:''} ${enc?mb(enc.length):''} - ${dateOf(e.published)} + ${rowDate(e.published)}