feat(docs): add interactive iframe demos to FSL and Long Task pages - #87
Merged
Conversation
Embed the render-pipeline and event-loop demos from joanleon.dev as interactive iframes, reusing the self-contained HTML from the blog. They complement the existing mermaid diagrams rather than replacing them, adding the temporal "why" that a static diagram cannot convey. - Add reusable Demo component: iframe wrapper with postMessage auto-height and light/dark theme sync via shared localStorage - Embed raf-pipeline in Forced-Synchronous-Layout, next to the double-rAF fix - Embed yield-pipeline in Long Task under a new "Breaking Up Long Tasks" section on yielding to the main thread - Remove the duplicate "Severity Levels" mermaid in Long Task (the thresholds table above already covers it)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Adds interactive iframe demos to two Interaction snippet pages, reusing the self-contained demos from joanleon.dev.
raf-pipelinedemo next to the double-requestAnimationFramefix, so readers can step through the render pipeline and see why the double rAF avoids the forced layout.yield-pipelinedemo, comparing no-yield /queueMicrotask/setTimeoutin the event loop.Why
The demos complement the existing mermaid diagrams rather than replacing them, adding the temporal "why" that a static diagram cannot convey. Diagrams that document a snippet's internal mechanism (like the FSL detector
sequenceDiagram) are kept.Changes
Democomponent: iframe wrapper with postMessage auto-height and light/dark theme sync via sharedlocalStorage(same origin as Nextra's next-themes).public/demos/.Verification
Verified at runtime (
next dev) on both pages: iframes render inline, auto-height works, demos are interactive (step-through), light/dark theme syncs, andcheck:consistencypasses.