Skip to content

Replace demo card placeholders with live demo screenshots#117

Merged
justin808 merged 1 commit into
mainfrom
jg-conductor/update-demo-placeholders
Jun 4, 2026
Merged

Replace demo card placeholders with live demo screenshots#117
justin808 merged 1 commit into
mainfrom
jg-conductor/update-demo-placeholders

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Jun 3, 2026

What

The demo cards on the homepage "Live demos" section and /examples rendered a
branded text-only placeholder (gradient box with the demo name) because no
demo had an image set. This wires up a real 16:9 hero screenshot for each of
the four live demos.

Demo Live deployment Screenshot
Marketplace https://rsc.reactonrails.com static/img/demos/marketplace.webp
TanStack Starter https://starter.reactonrails.com static/img/demos/tanstack-starter.webp
Legacy tutorial app https://www.reactrails.com static/img/demos/legacy-tutorial.webp
Hacker News https://hn.reactonrails.com static/img/demos/hacker-news.webp

Gumroad has no live deployment yet, so it intentionally keeps the branded
placeholder and "Demo coming soon" until it ships.

Before / after

  • Before: all five cards showed the blue gradient placeholder with just the
    demo name as text.
  • After: the four live demos show real screenshots of the running apps;
    Gumroad keeps the placeholder.

The four screenshots are committed in this PR, so you can review each one
directly in the Files changed tab.

How

  • Captured each live URL at a 1600x900 (16:9) viewport (top-of-page hero), to
    match the card's aspect-ratio: 16 / 9 + object-fit: cover media box.
  • Resized to 1280x720 and encoded as WebP (188 KB total for all four vs
    ~1.7 MB as PNG) under static/img/demos/.
  • Added one image: '/img/demos/<id>.webp' line per live demo in
    src/constants/demos.ts. No component or CSS changes — DemoCard already
    renders <img> when image is set and falls back to the placeholder
    otherwise.

Verification

Rendered the real DemoCard markup + styles.module.css with the actual WebP
files; confirmed all four images load (naturalWidth > 0), frame cleanly at
16:9, and that Gumroad still shows the placeholder.

🤖 Generated with Claude Code


Note

Low Risk
Marketing-site content and static assets only; no runtime logic or auth changes.

Overview
Live demo cards on the homepage and /examples now show real 16:9 WebP screenshots instead of the gradient text placeholder, by setting image: '/img/demos/<id>.webp' on the four deployed demos in demos.ts and adding the assets under static/img/demos/.

Gumroad is unchanged (no image, no live URL), so it still uses the branded placeholder and “Demo coming soon.” No DemoCard or CSS changes—existing logic already prefers <img> when image is set.

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

Summary by CodeRabbit

  • New Features
    • Demo showcases now display visual screenshots for marketplace, tanstack-starter, legacy-tutorial, and hacker-news.

The four live demos rendered a branded text-only placeholder box because
none had an `image` set. Capture a real 16:9 hero screenshot from each live
deployment and wire it to the demo's `image` field so the homepage "Live
demos" section and /examples show what each app actually looks like.

- Marketplace      -> rsc.reactonrails.com
- TanStack Starter -> starter.reactonrails.com
- Legacy tutorial  -> www.reactrails.com
- Hacker News      -> hn.reactonrails.com

Screenshots are stored as optimized WebP (188 KB total for all four) under
static/img/demos/. Gumroad has no live deployment yet, so it keeps the
branded placeholder and "Demo coming soon" until it ships.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9a53d678-fc30-455a-b2a3-fffca23601fb

📥 Commits

Reviewing files that changed from the base of the PR and between 9d9a5a6 and 885bd94.

📒 Files selected for processing (5)
  • prototypes/docusaurus/src/constants/demos.ts
  • prototypes/docusaurus/static/img/demos/hacker-news.webp
  • prototypes/docusaurus/static/img/demos/legacy-tutorial.webp
  • prototypes/docusaurus/static/img/demos/marketplace.webp
  • prototypes/docusaurus/static/img/demos/tanstack-starter.webp

Walkthrough

This PR populates the optional image field in four demo entries by adding webp screenshot paths that reference images stored under /img/demos/.

Changes

Demo Image References

Layer / File(s) Summary
Demo image paths
prototypes/docusaurus/src/constants/demos.ts
Four demo entries (marketplace, tanstack-starter, legacy-tutorial, hacker-news) are populated with image properties pointing to webp screenshot paths under /img/demos/.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Poem

🎨 Four demos now wear their portrait frames,
Screenshots bright, webp claim to fame!
Marketplace shines, tanstack takes the stage,
Hacker-news and tutorials turn the page. 📸

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding real demo screenshots to replace placeholder content in the demo cards.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-conductor/update-demo-placeholders

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 3, 2026

Greptile Summary

This PR wires up real WebP screenshots for the four live demo cards on the homepage and /examples page, replacing the branded gradient placeholder that appeared when no image was set. The DemoCard component and its CSS are unchanged — only demos.ts gains four image fields and four 1280×720 WebP files (~188 KB total) are committed under static/img/demos/.

  • demos.ts: added image: '/img/demos/<id>.webp' for marketplace, tanstack-starter, legacy-tutorial, and hacker-news; Gumroad is intentionally left without an image since it has no live deployment yet.
  • Static assets: four WebP screenshots captured at a 16:9 viewport, matching the card's aspect-ratio: 16/9 + object-fit: cover styling; paths follow the standard Docusaurus static/ convention.

Confidence Score: 5/5

Safe to merge — only data constants and static binary assets are changed; no logic, components, or CSS are modified.

The change is minimal: four string literals added to a constants file and four binary WebP files committed. The DemoCard component already handled the image field correctly, the paths follow the Docusaurus static-asset convention, and Gumroad is correctly left without an image since it has no live deployment.

No files require special attention.

Important Files Changed

Filename Overview
prototypes/docusaurus/src/constants/demos.ts Added image field pointing to WebP screenshots for four live demos; Gumroad correctly omitted. Paths follow Docusaurus static-asset convention and match committed files.
prototypes/docusaurus/static/img/demos/marketplace.webp 1280×720 WebP screenshot of the Marketplace live demo; referenced by demos.ts.
prototypes/docusaurus/static/img/demos/tanstack-starter.webp 1280×720 WebP screenshot of the TanStack Starter live demo; referenced by demos.ts.
prototypes/docusaurus/static/img/demos/legacy-tutorial.webp 1280×720 WebP screenshot of the Legacy Tutorial live demo; referenced by demos.ts.
prototypes/docusaurus/static/img/demos/hacker-news.webp 1280×720 WebP screenshot of the Hacker News live demo; referenced by demos.ts.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[demos.ts — Demo object] -->|image field set?| B{Yes / No}
    B -->|Yes — four live demos| C[DemoCard renders img\nsrc=withBaseUrl demo.image\nalt=demo.name demo screenshot\nloading=lazy]
    B -->|No — Gumroad| D[DemoCard renders\nbranded gradient placeholder\naria-hidden div with demo name]
    C --> E[static/img/demos/marketplace.webp]
    C --> F[static/img/demos/tanstack-starter.webp]
    C --> G[static/img/demos/legacy-tutorial.webp]
    C --> H[static/img/demos/hacker-news.webp]
Loading

Reviews (1): Last reviewed commit: "Replace demo card placeholders with live..." | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Cloudflare preview deployed.

@justin808 justin808 merged commit 0e63ecc into main Jun 4, 2026
5 checks passed
@justin808 justin808 deleted the jg-conductor/update-demo-placeholders branch June 4, 2026 01:23
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