Skip to content

fix: mobile overflow on benchmark detail pages - #236

Merged
Flotapponnier merged 1 commit into
devfrom
fix/mobile-overflow-benchmark-detail
Jun 1, 2026
Merged

fix: mobile overflow on benchmark detail pages#236
Flotapponnier merged 1 commit into
devfrom
fix/mobile-overflow-benchmark-detail

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Problem

Sur iPhone (375-414px), les pages /benchmarks/[slug] avaient tout le contenu qui sortait du viewport à droite : breadcrumb, titre, paragraphe, et la ligne LEADER/RANGE/GAP. Cause racine : plusieurs composants forcent une largeur minimum en px supérieure au viewport.

Fixes (par cause racine, pas en band-aid)

Fichier Avant Après
ledger-table.tsx:59 min-w-[480px] md:min-w-0 min-w-full sm:min-w-[480px] md:min-w-0
region-grid.tsx:41 min-w-[520px] min-w-full sm:min-w-[520px]
count-leaderboard.tsx:52 grid-cols-2 gap-x-8 grid-cols-1 sm:flex gap-x-3 sm:gap-x-8
count-leaderboard CountStat pas de min-w-0 min-w-0 + truncate pour la dd
summary-stat.tsx:27 min-w-[8rem] min-w-0 sm:min-w-[8rem]
page.tsx breadcrumb tracking-[0.16em] tracking-[0.08em] sm:tracking-[0.16em] + truncate max-w-[60vw] sur le dernier crumb
page.tsx bench identifier tracking-[0.18em] tracking-[0.1em] sm:tracking-[0.18em]
page.tsx h1 + subtitle pas de break-words break-words ajouté
globals.css rien html { overflow-x: clip } en dernier filet de sécurité

overflow-x: clip sur html (pas hidden) ne crée pas de scroll container, donc le position: sticky du header continue de marcher. C'est le filet, pas la solution : les vrais fix sont les min-w responsive.

Test plan

  • iPhone Safari + Telegram sur /benchmarks/onchain-data-most-networks
  • Vérifier breadcrumb, titre, subtitle, body, LEADER strip et ledger : aucun overflow
  • Desktop (>=768px) : aucun changement visuel

- Tables (ledger, region-grid): min-w only applies from sm: so mobile
  shrinks the table inside its overflow-x-auto wrapper instead of
  forcing 480/520px and pushing the whole page past the viewport edge
- count-leaderboard summary strip stacks 1-col on mobile, reduces
  gap-x so 'RANGE 40 → 306 7 providers' no longer cuts off
- summary-stat removes the 8rem min-width on mobile flex children
- breadcrumb + bench identifier lower tracking on mobile, last crumb
  truncates at 60vw so long titles can't push the row off-screen
- Title + subtitle get break-words as safety net
- html { overflow-x: clip } as a final root-level safety net
@Flotapponnier
Flotapponnier merged commit bd84de3 into dev Jun 1, 2026
1 check failed
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.

1 participant