Repository navigation
fix(docs): Generate screenshots for WebGL examples - #1005
Merged
Merged
Conversation
…next.7, reduced motion in galaxy/solar-system) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Contributor
Preview deploymenthttps://pr-1005-layerchart.techniq.workers.dev Built from 93b0b46. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The generated-docs bot PR (#1002) made no screenshots for the
@layerchart/webglexamples. This PR fixes that.Why they were missing
generate-screenshotsonly read example folders one level down, sosrc/examples/components/webgl/<Component>/*.sveltelooked like an emptywebglcomponent. 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/galaxyspins 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/docs1.0.0-next.6→1.0.0-next.7. Nested example folders are now captured, and orphan cleanup walks into them. The generator emulatesprefers-reduced-motion: reduceand replaces the page after a failed example.webgl/Points/galaxydoesn't auto-rotate when reduced motion is preferred. It can still be dragged.webgl/Points/solar-systemstarts 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