Repository navigation
Stack vote image and panel on narrow screens - #663
Conversation
The voting screens sized the image area as calc(100vw - 450px) to leave room for the 350px side panel, with no media queries. At viewports of 450px or narrower (a phone held upright) the image area had zero or negative width and no image showed; up to ~700px it was tiny. Below 700px, stack the layout in VoteYesNo and VoteRating: the image takes the full width (60vh high) and the description panel goes below it. Desktop and wider layouts are unchanged. VoteRanking and VoteEdit do not use the 100vw - 450px pattern and are not changed. Fixes #662 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Follow-up to the narrow-screen layout for #662. - Use 50svh (60vh fallback) for the stacked image so the vote buttons are more likely to be visible without scrolling on a portrait phone, where vh is the large viewport on iOS. - Let .vote-file-links and .vote-actions rows wrap, since the panel is now overflow: visible and a non-wrapping row could cause horizontal page scroll. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Zaidusyy
left a comment
There was a problem hiding this comment.
Tested this locally with the real app (backend + this branch's frontend), in a Yes/No round with five real Commons files, two portrait (Tour Eiffel, Mona Lisa) and three landscape:
- 360×740, 390×844 and 412×915: the image shows (landscape files fill the width, portrait ones fit the 50svh height), and Accept/Decline are on screen without scrolling (Accept ends at 650 px on the 360×740 screen, for every file).
- 700 px stacks, 701 px goes back to side by side; 1280 px looks unchanged.
- Phone in landscape (844×390): side by side, buttons visible.
- "Hide panel" works on narrow screens.
- At 390 px the only element wider than the screen is the header's language selector, so the sideways scroll is the header issue you mentioned, not this change.
- Prettier and ESLint pass on both files,
vite buildis fine.
Two optional thoughts, not blocking: at 701 px the side-by-side image area is only about 250 px wide, narrower than the 350 px panel, so a slightly higher breakpoint might look better there. And with the panel hidden on a phone, the image keeps its 50svh height instead of using the free space. I only ran the Yes/No round; VoteRating has the same CSS block.
…the panel hidden Review follow-ups on #663 (#662): - Also stack up to 820 px in portrait, where the image beside the 350 px panel would be narrower than the panel (tablets held upright). Phones held sideways keep the side-by-side layout. - With the panel hidden on a narrow screen, the image uses the full height. - The vh fallback for the stacked image height is now 50vh, matching 50svh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @Zaidusyy, both suggestions were right. Pushed f27139d:
Claude was able to check this in headless Chromium at 701×900, 768×1024, 820×1180 (stacked), 800×360, 844×390, 1024×768, 1280×800 (side by side, unchanged), with the panel shown and hidden: no horizontal scroll, and Accept is within the first screen in every stacked case. Prettier, ESLint and the build pass. Still untested in a real browser: the Rating round (stars). Same CSS as Yes/No, but if you have a minute to look at one at phone width, that would close the last gap. The header overflow at 390 px is separate; I'll file it. Written by Claude (Claude Code) on behalf of @lgelauff. |
Fixes #662
Problem
The voting screens sized the image area as
calc(100vw - 450px)next to a fixed 350 px side panel, with no media queries. At viewports of 450 px or narrower (a phone held upright) the image area had zero or negative width, so no image showed. Up to about 700 px it was tiny.Change
Below 700 px,
VoteYesNo.vueandVoteRating.vuenow stack the layout: the image takes the full width (50svh high, 60vh fallback) and the description panel goes below it, so the vote buttons are likely visible without scrolling on a portrait phone. The button rows wrap so they can't cause horizontal scroll. Wider layouts are unchanged.VoteRanking.vueandVoteEdit.vuedon't use this pattern and are untouched.Testing
pytest montage/tests/171 passed, 3 xfailed; ESLint and Prettier clean on the two files;npm run buildOK.Not covered
The app header probably overflows horizontally at 390 px. That predates this change and is a separate issue. Phones in landscape wider than 700 px keep the side-by-side layout.
🤖 Generated with Claude Code