Skip to content

fix(ui): stop horizontal overflow on the listing detail view on phones - #478

Closed
osinho wants to merge 1 commit into
orangecoding:masterfrom
osinho:mobile-fixes
Closed

osinho wants to merge 1 commit into
orangecoding:masterfrom
osinho:mobile-fixes

Conversation

@osinho

@osinho osinho commented Sep 28, 2026 •

Copy link
Copy Markdown

On viewports below 430px the detail page was clipped on the right. .listing-detail is a flex item of .app__content without min-width: 0, so it grew to the width of its widest child (long titles, addresses and URLs without spaces) instead of the space left next to the sidebar.

Add ListingDetail.mobile.less, scoped to .listing-detail and a single max-width: 430px media query, so upstream merges stay trivial:

  • let the page shrink to the available width and drop the fixed 400px rail
  • cap images and svg at 100% width
  • wrap long words and URLs
  • collapse key-fact tiles, workspace columns and finance facts to one column

ListingDetail.jsx only gains the stylesheet import.

What does this PR do?

Fixes horizontal overflow on the listing detail view on phones (<430px): the page grew to the width of its widest child (long titles, addresses, URLs) instead of shrinking to the available space next to the sidebar, clipping the right edge.

Related issue

none

AI disclosure (required)

  • ai:generated - AI produced most or all of this PR. I reviewed it, but it is largely machine written.

Which AI: Claude Code, Sonnet 5
How much: All of the diff - the new ListingDetail.mobile.less stylesheet and the one-line import in ListingDetail.jsx.
Why: Found the bug on my own phone; used Claude Code to locate the offending element and write/verify the CSS fix against a live Chrome viewport test before committing.

Checklist

  • yarn test:offline passes (or yarn test if the change touches a live provider)
  • yarn lint and yarn format:check pass
  • The change is useful for everybody, not a custom tweak for my own setup
  • I have read and answered the AI disclosure above honestly

On viewports below 430px the detail page was clipped on the right.
`.listing-detail` is a flex item of `.app__content` without
`min-width: 0`, so it grew to the width of its widest child (long
titles, addresses and URLs without spaces) instead of the space left
next to the sidebar.

Add ListingDetail.mobile.less, scoped to `.listing-detail` and a single
`max-width: 430px` media query, so upstream merges stay trivial:
- let the page shrink to the available width and drop the fixed 400px rail
- cap images and svg at 100% width
- wrap long words and URLs
- collapse key-fact tiles, workspace columns and finance facts to one column

ListingDetail.jsx only gains the stylesheet import.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@orangecoding

Copy link
Copy Markdown
Owner

@osinho This neither has a description nor does it have the mandatory checks fullfilled.

@osinho

osinho commented Sep 28, 2026

Copy link
Copy Markdown
Author

@orangecoding truly sorry, updated the missing info - pls recheck

@orangecoding

Copy link
Copy Markdown
Owner

Thanks @osinho for tracking this down, the overflow on phones is real.

I won't merge this one though, and will fix it in master myself. The cause is a different one than described: .app__content is a column flexbox, and .listing-detail centres itself in it with margin: 0 auto, which turns off stretching. So the page becomes as wide as its longest unbreakable line. min-width: 0 changes nothing there, since the width is the cross axis. What actually fixes it is the width: 100% in your file, and that belongs in the base rule for all widths. With a long title the page still overflows at 500 or 600px with this PR.

A few more things I ran into:

  • Below 1180px, __main and __rail are display: contents, so the rules for them (including the 400px rail) have no effect.
  • .listing-detail .listing-card { padding } overrides the padding-top: 0 of the collapsed cards on phones.
  • overflow-wrap: anywhere on every span splits the price in the middle of the number on small phones.
  • A separate "local override" file to keep upstream merges easy is not something I want in this repo.

I'll push the fix to master shortly, so I'm closing this one. Thanks again for the report!

orangecoding added a commit that referenced this pull request Sep 29, 2026
The page centres itself in the app shell, a column flexbox, with auto
margins, and those switch off the stretch. Without a width of its own it
was as wide as its longest unbreakable line (a compound noun in the
title, the price, a URL), and on a phone the shell clipped the right
edge off. It now takes the full width up to its maximum at every size,
which on a desktop also stops its width from depending on the listing.

Below 768px the address took its 24rem flex basis as a height once the
title row stacks, leaving a 384px gap under the title. Title, address
and description now break a line too long for their card, and on a
narrow phone the price shrinks and the key-fact tiles stack instead of
being cut off.

Reported in #478.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants