Skip to content

[lexical-website] Feature: Add more examples to the demos gallery with local screenshot captures#8316

Merged
etrepum merged 12 commits intofacebook:mainfrom
etrepum:claude/automate-demo-screenshots-9SKfF
Apr 9, 2026
Merged

[lexical-website] Feature: Add more examples to the demos gallery with local screenshot captures#8316
etrepum merged 12 commits intofacebook:mainfrom
etrepum:claude/automate-demo-screenshots-9SKfF

Conversation

@etrepum
Copy link
Copy Markdown
Collaborator

@etrepum etrepum commented Apr 9, 2026

Description

The demos gallery at /gallery only had three hard-coded examples (in OSS), and it depended on a third party screenshot service that mostly just took a picture of the stackblitz code editor. This adds a script to use playwright to generate the screenshots statically.

This also adds more examples to the gallery (extension-*, website-*, and agent-example)

(authored with claude)

Test plan

New content on the website at /gallery

claude added 7 commits April 9, 2026 00:10
Add a Playwright-based script that builds and screenshots each example for
the gallery page, replacing the external Slorber screenshot API with local
images. Update pluginList.tsx to use the captured preview images.

Run with: pnpm run capture-gallery-screenshots

https://claude.ai/code/session_01Aqm291YyHngNBYQAx1oWYR
Extract the hardcoded example lists from both pluginList.tsx and the
screenshot script into a shared gallery-examples.ts with proper types
and helper functions. Examples with waitForSelector get local screenshots;
others fall back to the Slorber screenshot API.

https://claude.ai/code/session_01Aqm291YyHngNBYQAx1oWYR
The gallery example definitions are website content, so they belong in
the website package. The screenshot script now imports from there.
Removes the @gallery-examples webpack alias since pluginList.tsx can
use a simple relative import.

https://claude.ai/code/session_01Aqm291YyHngNBYQAx1oWYR
Replace Linux-specific fuser/sleep shell commands with proper Node.js
process management: track child processes directly and use platform-
appropriate tree-kill (process groups on Unix, taskkill on Windows).
Use npx.cmd on Windows. Replace shell sleep with JS setTimeout.

https://claude.ai/code/session_01Aqm291YyHngNBYQAx1oWYR
Add 9 new examples to the gallery: extension-react-table, extension-
sveltekit-ssr-hydration, extension-vanilla-react-plugin-host, extension-
vanilla-tailwind, agent-example, website-chat, website-notion, website-
rich-input, and website-toolbar. Use pnpm instead of npm for dependency
installation, support per-example vite config selection, and run prepare
scripts (e.g. svelte-kit sync) after install.

https://claude.ai/code/session_01Aqm291YyHngNBYQAx1oWYR
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 9, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Apr 9, 2026 4:28pm
lexical-playground Ready Ready Preview, Comment Apr 9, 2026 4:28pm

Request Review

Add colors and descriptions for all 17 tags used in galleryExamples:
agent, ai, block, chat, collab, emoji, extension, favorite, opensource,
react, simple, ssr, svelte, tables, tailwind, toolbar, vanilla.
Fix Docusaurus reference to Lexical in the favorite tag description.

https://claude.ai/code/session_01Aqm291YyHngNBYQAx1oWYR
Audit each example's package.json and source to ensure tags are accurate:
- Add missing react tag to collab, rich-input, toolbar examples
- Add missing tailwind tag to 8 examples that use @tailwindcss/vite
- Add missing toolbar tag to collab, react-table, extension-react-table,
  agent-example
- Add missing tables tag to extension-react-table
- Add missing simple tag to sveltekit-ssr, vanilla-tailwind, toolbar
- Add missing emoji tag to website-chat

https://claude.ai/code/session_01Aqm291YyHngNBYQAx1oWYR
Filter chips now show the number of examples matching each tag.
Gallery cards display colored tag chips below the description so
users can quickly see what technologies each example uses.

https://claude.ai/code/session_01Aqm291YyHngNBYQAx1oWYR
@etrepum etrepum added this pull request to the merge queue Apr 9, 2026
Merged via the queue into facebook:main with commit 29b3c7c Apr 9, 2026
40 checks passed
@etrepum etrepum deleted the claude/automate-demo-screenshots-9SKfF branch April 19, 2026 02:33
@etrepum etrepum mentioned this pull request Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants