Skip to content

fix(example): fit mobile web widths without horizontal scroll - #382

Merged
LunatiqueCoder merged 1 commit into
mainfrom
bot/coder-example-mobile-width
Nov 30, 2026
Merged

LunatiqueCoder merged 1 commit into
mainfrom
bot/coder-example-mobile-width

Conversation

@LunatiqueCoder

@LunatiqueCoder LunatiqueCoder commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

🤖 From [drax] Coder (bot). This PR was written by a bot (Claude Code, driven by [drax] Coder).

What

At 375 and 390 px, the example web app's reorderable-list page was wider than the screen: about 476 px measured here, and about 453 px in nuclearpasta.com QA. The cause is the "Animation:" preset chip row (example/screens/reorderable-list.tsx:267), a single flex row that couldn't wrap. Mobile Chromium got a horizontal scroll, and iOS Safari cut off the last chips ("None" and "Far zone").

The fix is flexWrap: 'wrap' plus rowGap: 6 on that row, so the chips that don't fit move to a second line. This is an example-only change: nothing changes in the library's src/ or its API. I also added a one-line note to CLAUDE.md on the 375 px rule and how to measure it.

Proof

Headless Chrome mobile emulation (deviceScaleFactor 3, touch). document.documentElement.scrollWidth is compared with the emulated width, because in mobile emulation an overflow also widens innerWidth.

route 375 before 375 after 390 before 390 after
/reorderable-list 476 375 477 390
/reorderable-list?embed=1, /color-drag-drop?embed=1 and the 11 other routes fit fit fit fit

/cross-list and /scrolling have wide content, but it sits inside their own horizontal scroll views, so the page itself doesn't overflow.

iOS Simulator Safari (iOS 26.4; my own iPhone 17 and iPhone SE (3rd gen) sims, created for the run and then deleted): before the fix, "None" and "Far zone" are clipped. After it, every chip shows on two lines, and a left swipe doesn't move the page.

yarn typecheck, yarn lint and yarn test --no-watchman (170 tests) all pass, and the hooks ran normally.

Evidence is on the maintainer Mac at drax-bots/coder-mobile-width/evidence-mobile-width/:

  • REPORT.md
  • before.json and after.json
  • the Chrome screenshots: before- and after-reorderablelist-375 and -390
  • the Safari screenshots: ios-iphone17-* and ios-se-*

Not tested

  • The live nuclearpasta.com build. The run used a local dev server only.
  • Landscape, or widths other than 375 and 390.
  • A scrollWidth reading from inside Safari.

Target: rc.3, because the change is tiny and example-only.


Note

Low Risk
Example-only layout and documentation; no runtime library or security impact.

Overview
Fixes horizontal overflow on the reorderable-list example at 375px mobile web by letting the animation preset chip row wrap instead of staying on a single line (~476px wide).

The presetBar style now uses flexWrap: 'wrap' and rowGap: 6, so chips such as "None" and "Far zone" move to a second line instead of triggering horizontal scroll (Chromium) or clipping (iOS Safari). No library (src/) or API changes.

CLAUDE.md documents the 375px viewport rule for example web UIs and notes using document.documentElement.scrollWidth vs emulated width when checking overflow in Chrome mobile emulation.

Reviewed by Cursor Bugbot for commit 0701b23. Bugbot is set up for automated code reviews on this repo. Configure here.

The reorderable-list preset chip row did not wrap, so on 375/390px
viewports it pushed the page to ~476px wide. Let it wrap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-site Ready Ready Preview Nov 30, 2026 9:56am UTC
drax-example Ready Ready Preview Nov 30, 2026 9:56am UTC

@LunatiqueCoder LunatiqueCoder left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 posted by [drax] Reviewer, Ovidiu's review bot

merge-ready at 0701b23. example-only change (preset chip row wraps), checked on all 4 platforms:

  • mobile web (iOS Safari + chromium mobile): PASS. page width 375/390 vs 476/477 on main, every chip visible, reorder ok.
  • desktop web (chromium): PASS, 12/12 smoke.
  • native ios: PASS, chips wrap and "Far zone" is fully visible (clipped on main), 12/12 smoke.
  • native android: PASS, same, 12/12 smoke.

checks: CI green. bugbot: none.

@LunatiqueCoder LunatiqueCoder left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 posted by [drax] Reviewer, Ovidiu's review bot

merge-ready at 0701b23. the earlier pass covered all 4 platforms (review 6115605434). a claude code review pass also found no blocker.

the pr only touches the example's presetBar, adding flexWrap: 'wrap' and rowGap: 6, plus one note in CLAUDE.md. src/ and the exports don't change. a bar that already fits stays on one row on native and desktop, and it only wraps on narrow phones.

typecheck and lint are clean, and tests pass 170/170. ci is green and bugbot found nothing. it merges cleanly with main and with #381.

one cosmetic nit, not blocking: a wrapped row starts 3 px in because of marginHorizontal: 3.

@LunatiqueCoder
LunatiqueCoder merged commit ce1a248 into main Nov 30, 2026
8 checks passed
LunatiqueCoder added a commit that referenced this pull request Nov 30, 2026
* docs(changelog): refresh 1.2.0-rc.3 for #351 #352 #363 #380 #381 #382

* docs(changelog): say touch-action none is for draggable views only

---------

Co-authored-by: drax Upkeep (bot) <upkeep-bot@users.noreply.github.com>

This branch was successfully deployed

2 active deployments
Preview – drax-example — 0701b233 Deployed Nov 30, 2026 by vercel[bot]
Preview – docs-site — 0701b233 Deployed Nov 30, 2026 by vercel[bot]
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