Skip to content

fix(docs): Generate screenshots for WebGL examples - #1005

Merged
techniq merged 1 commit into
mainfrom
techniq/webgl-screenshots
Nov 17, 2026
Merged

techniq merged 1 commit into
mainfrom
techniq/webgl-screenshots

Conversation

@techniq

@techniq techniq commented Nov 17, 2026

Copy link
Copy Markdown
Owner

The generated-docs bot PR (#1002) made no screenshots for the @layerchart/webgl examples. This PR fixes that.

Why they were missing

  • generate-screenshots only read example folders one level down, so src/examples/components/webgl/<Component>/*.svelte looked like an empty webgl component. Fixed upstream in fix(generate-screenshots): Capture nested example folders, emulate reduced motion, recover from failures layerstack#113, released as @layerstack/docs@1.0.0-next.7, which this bumps to.
  • webgl/Points/galaxy spins 300k glowing points every frame. Headless Chromium renders WebGL in software (SwiftShader, locally and on CI), so it ran at about 1 fps and its screenshot always timed out. Because the generator reused that busy page, the 19 webgl examples after it failed too.

Changes

  • @layerstack/docs 1.0.0-next.6 → 1.0.0-next.7. Nested example folders are now captured, and orphan cleanup walks into them. The generator emulates prefers-reduced-motion: reduce and replaces the page after a failed example.
  • webgl/Points/galaxy doesn't auto-rotate when reduced motion is preferred. It can still be dragged.
  • webgl/Points/solar-system starts paused when reduced motion is preferred. Play still works.

Both examples use Svelte's prefersReducedMotion. Elsewhere in the docs, reduced motion only affects the view-transition CSS, so no other screenshots change.

Verified

I ran the generator against the docs dev server: 1080 examples, 0 errors, and all 44 webgl examples captured, checked by eye in light and dark mode. The screenshots aren't included here. The update-generated-docs workflow will add them after merge.

🤖 Generated with Claude Code

…next.7, reduced motion in galaxy/solar-system)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 93b0b46

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

@techniq
techniq merged commit 735a8c2 into main Nov 17, 2026
7 of 8 checks passed
@techniq
techniq deleted the techniq/webgl-screenshots branch November 17, 2026 06:26
@github-actions

Copy link
Copy Markdown
Contributor

Preview deployment

https://pr-1005-layerchart.techniq.workers.dev

Built from 93b0b46.

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