Repository navigation
fix(wasm): stop the frontend page overflowing 40px and let the title scale - #4421
Conversation
Fixes #4420. Mirrors FastLED/cli#268 so the two frontend copies stay identical. `#main-container` was content-box with `width: 100%` plus 20 px of padding, so the page was always 40 px wider than any window narrower than about 1440 CSS px, and the controls column ran off the right edge. It is border-box now. The page title was a fixed 6em (96 px) at every viewport. It now scales with clamp(2rem, 5vw, 6em), keeping 6em on screens 1920 px and wider. Measured on this copy's own index.html and index.css at 989x700: overflow 40 px -> 0 and title 96 px -> ~49 px on Chromium and WebKit, with the title still 96 px at 2200 px. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe WASM compiler stylesheet now scales ChangesWASM frontend layout
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The changes address the responsive title and horizontal overflow goals without identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #4420. Mirrors FastLED/cli#268 (PR FastLED/cli#270), so FastLED's frontend copy and fastled-wasm's stay identical.
The two bugs (byte-identical in both copies)
#main-containerwascontent-boxwithwidth: 100%pluspadding: 20px, so the page was always 40 px wider than the window for any window narrower than about 1440 CSS px, and#ui-controlsran off the right edge. It is nowborder-box.clamp(2rem, 5vw, 6em), keeping 6em on screens 1920 px and wider.RED → GREEN on this repo's own copy
Measured with Playwright against
src/platforms/wasm/compiler/index.html+index.css(bundled with esbuild, no WASM needed) at 989×700, the viewer viewport the bug was reported from:#main-containerright edgeWide screens are unchanged (the
clampupper bound is the old 6em). The same two rules are covered by an automated regression test on the fastled-wasm side,tests/frontend/test_layout.py, which failed on itsmainwithpage overflows by 40px.CSS only: no JS, no WASM or compiler flags, no JSPI.
🤖 Generated with Claude Code
Summary by CodeRabbit