Repository navigation
fix(example): fit mobile web widths without horizontal scroll - #382
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
LunatiqueCoder
left a comment
There was a problem hiding this comment.
🤖 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
left a comment
There was a problem hiding this comment.
🤖 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.
🤖 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'plusrowGap: 6on 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'ssrc/or its API. I also added a one-line note toCLAUDE.mdon the 375 px rule and how to measure it.Proof
Headless Chrome mobile emulation (deviceScaleFactor 3, touch).
document.documentElement.scrollWidthis compared with the emulated width, because in mobile emulation an overflow also widensinnerWidth./reorderable-list/reorderable-list?embed=1,/color-drag-drop?embed=1and the 11 other routes/cross-listand/scrollinghave 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 lintandyarn 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/:Not tested
scrollWidthreading 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
presetBarstyle now usesflexWrap: 'wrap'androwGap: 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.mddocuments the 375px viewport rule for example web UIs and notes usingdocument.documentElement.scrollWidthvs 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.