docs(website): Fix mobile overflow and polish homepage - #4132
Conversation
- Wrap MDX tables in a horizontal scroll container; the global display: table rule made wide tables widen the whole page - Grid columns use minmax(0, 1fr) so code blocks scroll instead of forcing the grid wider; wrap mode no longer splits words mid-token - Fix nested admonition fence that printed a stray ::: on useSuspense - Remove dead CSS (typo'd monospace rule, duplicate navbar rule, unused Demo.module.css) and unused Grid cols prop Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKtKRyLXafwpf1pNBLAuVW
- Remove leftover hero overlap spacing that crowded the first demo - StackBlitz: framed placeholder with loading label, link-out card on phones, optional More Demos link - Homepage: tinted, consistent feature icons with a section heading; heading for the StackBlitz app section; prompt above the closing CTA - Demos page: title, per-demo description, Open in StackBlitz and Source on GitHub links, scrollable tabs on phones Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKtKRyLXafwpf1pNBLAuVW
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4132 +/- ##
=======================================
Coverage 97.87% 97.87%
=======================================
Files 156 156
Lines 3057 3057
Branches 612 612
=======================================
Hits 2992 2992
Misses 18 18
Partials 47 47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Hide the embed wrapper instead of unmounting it so the intersection observer keeps its node; resizing past the mobile breakpoint now loads the embed instead of leaving it on the loading label. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKtKRyLXafwpf1pNBLAuVW
- useHasIntersected observes via a callback ref, so StackBlitz can unmount the embed on phones instead of hiding a placeholder - Collapse the two iframe branches into one; drop the homepage-only style and moreDemos props (cap height in CSS instead) - Lazy demos tabs so only the selected StackBlitz embed loads - Use Infima utilities over duplicate module CSS; remove dead rules, unused iframe size attributes and the orphaned TypeScript SVGs Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKtKRyLXafwpf1pNBLAuVW
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ba74787. Configure here.
…layout shift useWindowSize() is 'ssr' on first paint, so phones briefly rendered the tall embed before swapping to the card. A media query renders the right variant from the server markup; the hidden iframe never intersects, so it still never loads on phones. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKtKRyLXafwpf1pNBLAuVW
…ad-2qhcyb # Conflicts: # website/src/components/StackBlitz.tsx
Remove the 'Why Data Client' heading above the features and the 'Start with one resource and one hook' heading in the ender, restoring the ender to its original markup. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKtKRyLXafwpf1pNBLAuVW
The added header, captions and links took space away from the demos themselves. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKtKRyLXafwpf1pNBLAuVW
|
Staff engineer (Cursor agent): FOLLOW_UP only, nothing blocking on 6d0c232. Restoring
|
Generated by Claude Code |

Requested by Nathaniel · project thread
Motivation
These come from a design review of the site's custom UI (review with screenshots).
Before: on a 390px phone, wide tables made whole pages scroll sideways (RestEndpoint rendered 616px wide, resource 677px, useSuspense 467px), and code inside
<Grid>overflowed too. useSuspense also printed a literal:::. On the homepage, the StackBlitz embed was an unstyled blank box until it loaded, the feature icons mixed styles, and there was barely any space between the hero buttons and the first demo on phones.After: every page I checked fits a 390px screen. Wide tables and Grid code scroll inside their own box. On the homepage, the StackBlitz embed sits in a framed placeholder that says it's loading, and phones get "Open in StackBlitz" / "View source" links instead of the embed. The feature icons share one style in the primary color, the app section has a short heading and description, and the hero has normal spacing.
Solution
Bugfixes
theme/MDXComponents.jsmaps markdowntableto a wrapper withoverflow-x: auto. The globaltable { display: table }stays, so desktop tables are still full width.Gridcolumns useminmax(0, 1fr)instead ofminmax(min-content, 1fr). Wrap mode usesoverflow-wrap: anywhereinstead ofbreak-all, so@data-client/reactno longer breaks mid-word.useSuspense.md: the outer:::reactfence needed more colons than the:::infonested inside it.var(-ifm-font-family-monospace)typo rule, a duplicate navbar rule, the unusedDemo/Demo.module.css, and Grid's unusedcolsprop.Homepage
padding-bottom: 14.5rem; margin-bottom: -12removerlap, which was left over from a background image that's commented out.StackBlitz: a code-colored frame with a "Loading demo…" label behind the transparent placeholder iframe, an iframetitle, and a height capped atcalc(100vh - 64px)in CSS. At ≤996px (Docusaurus' mobile breakpoint) a CSS media query swaps in a link-out card, so the server markup is already right on first paint. The hidden iframe never intersects, so it never loads on phones.useHasIntersectednow observes through a callback ref, so a phone that rotates or resizes past the breakpoint still loads the embed.currentColor. A newtypescript-mono.svgis the TS tile with its letters masked out, so it matches the line glyphs and doesn't show as a white block in dark mode. The oldtypescript.svgandtypescript.dark.svgare deleted because nothing references them anymore.I verified this in the dev server at 1440px and 390px in both light and dark mode. On every checked page,
document.documentElement.scrollWidthis 390 at phone width. On the homepage, the embed loads only after scrolling, and it also loads after resizing from phone to desktop width.yarn lintandyarn workspace rdc-website typecheckpass. No changeset, because only the website changed.🤖 Generated with Claude Code
https://claude.ai/code/session_01WKtKRyLXafwpf1pNBLAuVW