diff --git a/CHANGELOG.md b/CHANGELOG.md index a76835c..2d81157 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- An item published without a title shows its opening words, in plain text rather than bold, instead of "(untitled)"; one with no text either shows its file's name, or its show and date. Opened, it starts with its text. - A feed that has moved for good (a permanent redirect) is followed to its new address, which iPX then reads from, and says so in the log as `feed_moved`. A temporary redirect changes nothing. - The daemon sleeps until the next feed is due, at most ten minutes, instead of looking every minute; refreshing or adding a feed still wakes it at once. - A pinned feed's pin sits on the corner of its artwork, as a failing feed's mark does, instead of before its name. diff --git a/tests/ui/app.spec.js b/tests/ui/app.spec.js index 8816ae9..8a7c39f 100644 --- a/tests/ui/app.spec.js +++ b/tests/ui/app.spec.js @@ -972,6 +972,21 @@ test('artwork comes from iPX, kept, and only as an image', async ({ page }) => { expect((await page.request.get('/api/art?u=' + encodeURIComponent('http://127.0.0.1:8792/show.xml'))).status()).toBe(404); }); +test('an item without a title is named from its text, then its file, then its show and date', async ({ page }) => { + const names = await page.evaluate(() => [ + entryName({ title: 'A Title' }), + entryName({ title: ' ', description: '
I like the way AI is evolving.
' }),
+ entryName({ description: '' + 'word '.repeat(40) + '
' }).text.length, + entryName({ enclosures: [{ url: 'https://k.example/media/KARTAS691.mp3?x=1' }] }), + entryName({ feed_id: 'nobody', published: 0 }), + ]); + expect(names[0]).toEqual({ text: 'A Title', derived: false }); + expect(names[1]).toEqual({ text: 'I like the way AI is evolving.', derived: true }); + expect(names[2]).toBeLessThanOrEqual(121); // cut at a word, with … + expect(names[3]).toEqual({ text: 'KARTAS691', derived: true }); + expect(names[4]).toEqual({ text: 'nobody', derived: true }); +}); + test('a deleted file looks as if it was never downloaded', async ({ page }) => { // Other people subscribe to Picture Blog by now, so both prompts come; take them. page.on('dialog', d => d.accept()); diff --git a/web/app.css b/web/app.css index fc44f26..5717c24 100644 --- a/web/app.css +++ b/web/app.css @@ -844,6 +844,8 @@ body.playing .eq i:nth-child(3){animation-delay:-.6s} @keyframes eq{from{transform:scaleY(.35)}} .ep .st:hover,.ep .fl:hover{background:var(--raise)} .ep .t{font-weight:600;font-size:13.5px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} +/* An item with no title shows its opening words: set as text, not as a heading. */ +.ep .t.notitle{font-weight:400} .ep.read .t{color:var(--dim);font-weight:500} .ep .line{display:flex;gap:9px;align-items:center;flex-wrap:wrap;color:var(--faint);font-size:11.5px} .ep .line:empty{display:none} diff --git a/web/src/dialogs.ts b/web/src/dialogs.ts index f98c58a..9808776 100644 --- a/web/src/dialogs.ts +++ b/web/src/dialogs.ts @@ -140,7 +140,7 @@ async function renderListening(url,box){ el.className='childrow'; el.entry=e; el.innerHTML=artHTML(e.image||feedArt(e.feed_id),e.title||'')+ - `