Mobile: fixed-width popovers (clone menu, notification tray) overflow the viewport #278
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#278
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What's wrong
Fixed-width absolutely-positioned popovers overflow the phone viewport when triggered near the right edge (which is where all the header popovers live):
.clone-bodyisabsolute right-0 … w-96(384px) — at a 390px viewport its left edge lands at x = −10 (measured live): the panel hangs off the left side of the screen and its content is clipped..traymeasures 384px wide opening from a trigger already clipped by the header overflow (#273) —right: 515measured on repo pages, fully off-screen on one side.Both are unusable on mobile: content cut off on one edge, no way to see the whole panel.
Measured evidence (390×844)
Root cause (code evidence)
web/css/repo.css:90-95(.clone-menu/.clone-body):position: absolute; … width implied by Tailwindw-96atweb/src/pages/Repo.jsx:92(class="clone-body card absolute right-0 z-30 mt-2 w-96 space-y-3 p-3"`). No max-width bound against the viewport.Fix direction
max-width: calc(100vw - 16px)(or Tailwindmax-w-[calc(100vw-1rem)]) on.clone-body,.tray, and an audit of the otherabsolutepanels (ref-dropis 320px — fits at 390 but barely; tasks popover, theme-adjacent panels).left: 0; right: 0; margin: autoat small breakpoints so they span the viewport minus padding.Fixed by #290 (branch fix/issue-278): shared max-width: calc(100vw - 1rem) bound on all audited popovers in web/src/ui.css + regression test. Ready for review — not merging per task rules.
Review of PR #290 (fix/issue-278), verified in scratch worktree /tmp/pr290 (removed after):
RE-AUDIT (absolute/fixed panels in web/src): all 10 bound panels confirmed — clone-body (Repo.jsx:99, right-0 w-96), ref-drop (Repo.jsx:289 left-0 w-80; Pull.jsx:220 + PullNew.jsx:82 w-full), tasks-drop (Repo.jsx:453 right-0 w-96), notif-drop (NotificationTray.jsx:98 right-0 w-80), reaction-drop (ReactionMenu.jsx:116 left-0), label-drop (LabelPicker.jsx:92 right-0 w-64), milestone-drop (MilestonePicker.jsx:73, same shape as label-drop), close-drop (CommentComposer.jsx:92 bottom-full right-0 min-w-52), tag-drop (ReleaseNew.jsx:214 inset-x-0), tray (ui.css:157 fixed bottom-4 right-4 w-96). No misses. Deliberately unbounded and correct: .progress (inset-x-0, already fluid), notif badge (tiny), sha.jsx clipboard textarea (invisible), FinishReview form (inline, not floating).
FINDINGS:
235db75and pushed to origin/fix/issue-278.VERIFY (scratch only, main untouched): node --test web/test/unit/*.test.js 557/557 green incl. new popover-viewport.test.js 5/5 (scratch has no node_modules; used a read-only symlink to main's — marked-dependent suites fail without it, environmental only, 0 fail with it). vite build green in 2s; built CSS contains max-width:calc(100vw-1rem). (Chunk-size warning is pre-existing.) No browser run — no runnable browser in this environment; proof is structural (selector + 390px fit arithmetic), noted explicitly.
MERGE RECOMMENDATION: ready to merge (not merging per task rules).
Fixed by PR #290 incl. review doc entry (all 10 panels bounded, milestone-drop opaque; 557/557), merged. Closing.