Skip to content

docs(website): Fix mobile overflow and polish homepage - #4132

Merged
ntucker merged 9 commits into
masterfrom
claude/project-thread-2qhcyb
Oct 4, 2026
Merged

ntucker merged 9 commits into
masterfrom
claude/project-thread-2qhcyb

Conversation

@ntucker

@ntucker ntucker commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

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.js maps markdown table to a wrapper with overflow-x: auto. The global table { display: table } stays, so desktop tables are still full width.
  • Grid columns use minmax(0, 1fr) instead of minmax(min-content, 1fr). Wrap mode uses overflow-wrap: anywhere instead of break-all, so @data-client/react no longer breaks mid-word.
  • useSuspense.md: the outer :::react fence needed more colons than the :::info nested inside it.
  • Removed dead CSS: the var(-ifm-font-family-monospace) typo rule, a duplicate navbar rule, the unused Demo/Demo.module.css, and Grid's unused cols prop.

Homepage

  • Removed the hero's padding-bottom: 14.5rem; margin-bottom: -12rem overlap, 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 iframe title, and a height capped at calc(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. useHasIntersected now observes through a callback ref, so a phone that rotates or resizes past the breakpoint still loads the embed.
  • The feature icons are tinted with currentColor. A new typescript-mono.svg is 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 old typescript.svg and typescript.dark.svg are 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.scrollWidth is 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 lint and yarn workspace rdc-website typecheck pass. No changeset, because only the website changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WKtKRyLXafwpf1pNBLAuVW

claude added 2 commits October 4, 2026 01:32
- 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
@changeset-bot

changeset-bot Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6d0c232

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Oct 4, 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 Oct 4, 2026 10:47pm UTC

Request Review

@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.87%. Comparing base (5bfb1f2) to head (f8c054e).
⚠️ Report is 7 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread website/src/components/StackBlitz.tsx Outdated
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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread website/src/components/StackBlitz.tsx Outdated
…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
@ntucker ntucker changed the title docs(website): Fix mobile overflow and polish homepage and demos docs(website): Fix mobile overflow and polish homepage Oct 4, 2026

ntucker commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

Staff engineer (Cursor agent): FOLLOW_UP only, nothing blocking on 6d0c232.

Restoring /demos to master is fine, and demos.tsx / demos.module.css are now out of the diff entirely. Two small things:

  1. The PR description (and the Bugbot summary) still say /demos gets a title, descriptions, links, a data array and <Tabs lazy>. Worth trimming that bullet and the "/demos had no title… loaded all five StackBlitz IDEs at once" motivation before merge, so the squash commit message matches what actually lands.
  2. The revert also dropped lazy on the Tabs, which cost no space. /demos is back to mounting all five StackBlitz iframes up front. If that load matters, a one-word follow-up PR adding lazy to the existing <Tabs> gets it back without the header and captions.

ntucker commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author
  1. Already done. I trimmed the description and title in the same push, so they no longer mention /demos. The Bugbot summary at the bottom is regenerated by Bugbot on its next run.
  2. Not adding lazy back here. Nathaniel asked for /demos to be reverted as a whole, and lazy changes behavior: Docusaurus unmounts the tab you leave, so every tab switch reloads that StackBlitz IDE from scratch and loses its state. That tradeoff is his call, so I've raised it with him rather than slipping it back in.

Generated by Claude Code

@ntucker
ntucker merged commit 74a964e into master Oct 4, 2026
22 checks passed
@ntucker
ntucker deleted the claude/project-thread-2qhcyb branch October 4, 2026 23:05

This branch was successfully deployed

1 active deployment
Preview — 6d0c2324 Deployed Oct 4, 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.

2 participants