Fix the music bar mobile now-playing screen not fitting landscape #25
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/music-bar-landscape-mobile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The album art was sized off
min(220px, 60vw)— the viewport dimension a phone in landscape has plenty of — and stayed pinned near that cap regardless of how little vertical room was actually left once everything stacked vertically (art, then text, then transport, then side row). The screen ran well past a typical landscape phone's height and needed to scroll to reach the controls — not adapted to the rotation at all.Fixed with a dedicated
@media (max-width: 720px) and (orientation: landscape)block rather than chasing every fixed value in the portrait rules:.musicBarPanelTrackbecomesflex-direction: row), freeing most of the vertical space the portrait layout spends stacking them.vh(min(120px, 20vh)) — the dimension landscape actually constrains — instead ofvw.Deliberately not changed:
.musicBarPlayBig's 56px transport button and the other icon buttons. A touch target's size answers to a finger, not the screen — shrinking it in landscape would trade a real usability problem for a cosmetic one.Test plan
npm run typecheck/npm run build(client) — clean<iframe>s sized to a wide (700×320) and a deliberately extreme, narrow (650×280) landscape shape (this sandbox'sresize_windowviewport emulation doesn't reflect orientation reliably). Both matched(orientation: landscape), both switched to a realrowlayout with the art measurably to the left of the text, both image sizes tracked the shrinkingvhcap correctly (64px/56px, not the old fixed 220px), and both fit their entire content within the viewport height with zero overflow — even the extreme 280px-tall case, which the pre-fix numbers would have overflowed by well over 200px.column, still the original 220pxvw-capped art.🤖 Generated with Claude Code