/events: horizontal scroll on mobile from matters-selector dropdown width #86
Reference in New Issue
Block a user
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?
m's report (2026-05-25 13:53)
Scope
/eventspage on a mobile viewport — the matters (projects) selector / multi-select dropdown is wider than the screen, forcing horizontal page scroll. m's hard rule: NO horizontal scrolling on mobile.What to do
frontend/src/events.tsxfilter row or a sharedclient/filter-bar/*.tsaxis component.max-width: 100%of the viewport at mobile breakpoint, nomin-width: <wide>px, nowhite-space: nowrapcausing overflow, no fixed-width inner ul.Files most likely touched
frontend/src/events.tsx/frontend/src/client/events.ts— filter row layoutfrontend/src/client/filter-bar/axes.ts(if matters is a filter-bar axis)matters,projects-select,projekt,projects-picker.frontend/src/styles/global.css— mobile breakpoint rules for the selectorHard rules
go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/events-mobile-scroll-fix.Out of scope
Reporting
mai report completedwith branch + SHAs + chosen approach (A/B/C) + screenshot-equivalent description of the mobile selector before/after (or actual Playwright screenshots if you grab them).Fix shipped
Approach: A — Let the matters selector respect its container at every viewport width.
Root cause: a native
<select>sizes itself to the widest<option>text. The existing 480px media query forcedwidth: 100%on phones, but the 481–1000px range (tablet portrait, landscape phones) had no constraint at all and inherited the intrinsic select width. With long project titles likeHLC-MUC-2024-007 — Bayer Pharma AG ./. Genentech, Inc. — EP 3 patent infringement and validity proceedings — Munich Local Division — UPC_CFI_007/2024, the select grew to 1034px on a 768px viewport.Fix in
frontend/src/styles/global.css(13 lines, +2 inline comments):Why this works:
max-width: 100%caps the cell at its flex container;min-width: 0lets it shrink below content size inside that flex layout. Together they keep the select inside the viewport at every width.Verification
Playwright at all four required widths after the build:
Desktop (1280px) still lays out all four filter-groups in one row (status 173, project 282, event-type 192, appointment-type 148 px wide). Only when content is pathologically wide does the affected cell wrap onto its own line — the alternative (overflow scroll) is what we are killing.
Gates:
go build ./...— cleango test ./internal/... -short— all greencd frontend && bun run build— cleanWhy not approach B/C
<select>. Browsers already render the open state as a native sheet on mobile.N ausgewählt).Files
frontend/src/styles/global.css(only file touched)Applies to both
/eventsand the Custom Views filter bar (filter-bar-group/filter-bar-selectextendfilter-group/entity-select).Branch + SHA
mai/demeter/gitster-events716f6d7ece