From aba6bd52a714dbf100aa228df97064cbaffb5f37 Mon Sep 17 00:00:00 2001 From: rays Date: Thu, 19 Nov 2026 08:36:32 -0500 Subject: [PATCH] A pinned item's pin keeps its accent disc in the reader's floating actions (#480) On a phone the floating actions (#456) make every button transparent so the frosted capsule shows through. That outranked the pinned button's accent background but not its colour, --ink, so the pin was drawn white on a light theme's capsule. Pinned keeps its accent there now. The #456 browser test checks the pinned button's background, and names the actions it expects instead of counting them: since Up Next an episode has a fourth, and the count passed only when the tests before it left an item without audio first. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01RqkrVAJFkEgz9cXG3jG1Zy --- tests/ui/app.spec.ts | 8 +++++++- web/CHANGELOG.md | 1 + web/app.css | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/ui/app.spec.ts b/tests/ui/app.spec.ts index 69a7143..6ab2263 100644 --- a/tests/ui/app.spec.ts +++ b/tests/ui/app.spec.ts @@ -2430,7 +2430,9 @@ test.describe('an item with no files, on a phone', () => { }); const bar = page.locator('#detail .dfloat'); await expect(bar.locator('#dback')).toBeVisible(); - await expect(bar.locator('.dacts [data-a]')).toHaveCount(3); + // By name, not counted: an episode has Up Next's button too (#473), so the count depended on + // which item the tests before had left first. + for (const a of ['read', 'flag', 'share']) await expect(bar.locator(`.dacts [data-a="${a}"]`)).toBeVisible(); await page.locator('#detail').evaluate(el => { el.scrollTop = 3000; }); // Still at the top of the screen, not scrolled away with the title. for (const q of ['#dback', '.dacts']) expect((await bar.locator(q).boundingBox())!.y).toBeLessThan(80); @@ -2440,6 +2442,10 @@ test.describe('an item with no files, on a phone', () => { await flag.click(); await expect(bar.locator('[data-a="flag"]')).not.toHaveAttribute('aria-pressed', was!); expect(await page.locator('#detail').evaluate(el => el.scrollTop)).toBeGreaterThan(2500); + // Pinned, it keeps its accent disc in the bar: cleared like the others, its pin was drawn in the + // colour meant for the accent, white on a light theme's capsule (#480). + const pinned = bar.locator('[data-a="flag"][aria-pressed="true"]'); + if (was !== 'true') await expect(pinned).not.toHaveCSS('background-color', 'rgba(0, 0, 0, 0)'); await bar.locator('[data-a="flag"]').click(); await expect(bar.locator('[data-a="flag"]')).toHaveAttribute('aria-pressed', was!); await bar.locator('#dback').click(); diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index ed1d64b..4c55039 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- On a phone, a pinned item's pin in the reader's floating actions is on its accent disc again, rather than nearly invisible on a light theme (#480). - Swiping between items on a phone no longer flashes: the pictures of the items either side are loaded ahead, so the preview under your finger shows its picture with its text, and the swipe ends only once the new item's pictures are ready (#471). - Deleting a downloaded file, marking everything read, deleting a signal and the other actions that ask first now ask in the page's own dialog, so they go ahead in the iOS app, which answered the browser's question Cancel without showing it (#462). - A page kept for offline from before a deploy, shown on waking before the network was back, is loaded again rather than run with the new script, which left it dead until reloaded by hand (#449). diff --git a/web/app.css b/web/app.css index 1f4ae82..6d613f3 100644 --- a/web/app.css +++ b/web/app.css @@ -1416,6 +1416,9 @@ body:has(#player.on) #status{padding-bottom:3px} .dfloat #dback{margin:0;width:44px;height:44px;border-radius:999px} .dfloat .dacts{gap:2px;padding:2px 6px;border-radius:999px} #detail .dfloat .dacts .btn{background:transparent;border-color:transparent;box-shadow:none} + /* Pinned keeps its accent disc: cleared with the rest, its pin, in the colour drawn on the accent, + was white on a light theme's capsule (#480). */ + #detail .dfloat .dacts .btn[data-a=flag][aria-pressed=true]{background:var(--accent);border-color:var(--accent)} /* Beside the reader while it is swiped (gestures.ts): the item next to it, with a strip of the page's own background between them, so the list under the reader never shows (#52). */ #dpeek{position:fixed;top:0;bottom:0;left:0;width:calc(100% + 16px);z-index:38;background:var(--bg);pointer-events:none}