From a757743161ac3f7a348884a9f7b2490ab09b99e1 Mon Sep 17 00:00:00 2001 From: tgiachi Date: Tue, 17 Nov 2026 09:40:38 +0100 Subject: [PATCH 1/2] fix(web): keep the controls of the full-screen player on screen on a phone On a short phone screen the play, previous and next buttons were pushed under the bottom edge and needed a scroll to reach. - The seek bar and the controls sit in one block that sticks to the bottom on a phone, above the safe area; what comes next scrolls beneath it. - The cover is capped by the height of the screen as well as its width. - The sound picture is lower on a phone. Wide screens keep the same layout as before. Fixes #43 --- web/src/components/layout/NowPlaying.tsx | 15 ++++++++++----- web/src/components/layout/Player.test.tsx | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/web/src/components/layout/NowPlaying.tsx b/web/src/components/layout/NowPlaying.tsx index 9dc7f98..8b1dbeb 100644 --- a/web/src/components/layout/NowPlaying.tsx +++ b/web/src/components/layout/NowPlaying.tsx @@ -118,7 +118,7 @@ export default function NowPlaying() { {t('player.nowPlaying')}
-
+
@@ -155,11 +155,16 @@ export default function NowPlaying() { {radio &&

{t('radio.now', { name: radio.title })}

}
- + - - - + {/* On a phone the seek bar and the controls stay at the bottom of the screen while the page scrolls; wide, they are in the flow as before. */} +
+ + +
{upNext.length > 0 && ( diff --git a/web/src/components/layout/Player.test.tsx b/web/src/components/layout/Player.test.tsx index 09c045c..01daa39 100644 --- a/web/src/components/layout/Player.test.tsx +++ b/web/src/components/layout/Player.test.tsx @@ -584,6 +584,29 @@ test('the full-screen player controls come in full: shuffle, previous and repeat for (const name of ['Shuffle', 'Previous', 'Repeat: off']) expect(dialog.getByRole('button', { name })).not.toHaveClass('max-sm:hidden') }) +test('on a phone the seek bar and the controls of the full-screen player stay at the bottom while the page scrolls', async () => { + act(() => usePlayer.getState().playTracks([a, b, c])) + renderBar() + await userEvent.click(screen.getByRole('button', { name: 'Open the full-screen player' })) + const full = within(screen.getByRole('dialog')) + const dock = full.getByRole('button', { name: 'Previous' }).closest('[data-phone-dock]') + expect(dock).not.toBeNull() + expect(dock).toHaveClass('max-sm:sticky', 'max-sm:bottom-0') + // The seek bar and the play button are in the same block, so that both stay on screen. + expect(within(dock as HTMLElement).getByRole('slider')).toBeInTheDocument() + expect(within(dock as HTMLElement).getByRole('button', { name: 'Pause' })).toBeInTheDocument() + // What comes next is not in it: it is what scrolls beneath. + expect(within(dock as HTMLElement).queryByRole('region', { name: 'Up next' })).toBeNull() +}) + +test('on a short phone the cover of the full-screen player shrinks to leave room for the controls', async () => { + act(() => usePlayer.getState().playTracks([a, b])) + renderBar() + await userEvent.click(screen.getByRole('button', { name: 'Open the full-screen player' })) + const full = screen.getByRole('dialog') + expect(full.querySelector('[data-phone-cover]')?.className).toContain('max-sm:max-w-[min(18rem,34dvh)]') +}) + // --- Gestures on a phone ----------------------------------------------------------------------- const touch = (x: number, y: number) => ({ clientX: x, clientY: y }) From 85a1f9dc8a21872f5a29830ecc4fd0c10555e414 Mon Sep 17 00:00:00 2001 From: sonda-release Date: Tue, 17 Nov 2026 08:41:25 +0000 Subject: [PATCH 2/2] chore(release): 0.4.1 [skip ci] ## [0.4.1](https://git.kmalloc.org/squid/sonda/compare/v0.4.0...v0.4.1) (2026-11-17) ### Bug fixes * **web:** keep the controls of the full-screen player on screen on a phone ([a757743](https://git.kmalloc.org/squid/sonda/commit/a757743161ac3f7a348884a9f7b2490ab09b99e1)), closes [#43](https://git.kmalloc.org/squid/sonda/issues/43) --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ece0379..76c2a47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [0.4.1](https://git.kmalloc.org/squid/sonda/compare/v0.4.0...v0.4.1) (2026-11-17) + +### Bug fixes + +* **web:** keep the controls of the full-screen player on screen on a phone ([a757743](https://git.kmalloc.org/squid/sonda/commit/a757743161ac3f7a348884a9f7b2490ab09b99e1)), closes [#43](https://git.kmalloc.org/squid/sonda/issues/43) + ## [0.4.0](https://git.kmalloc.org/squid/sonda/compare/v0.3.0...v0.4.0) (2026-11-16) ### Features