Skip to content

feat(docs): add interactive iframe demos to FSL and Long Task pages - #87

Merged
nucliweb merged 1 commit into
mainfrom
feat/interactive-demos
Jul 3, 2026
Merged

feat(docs): add interactive iframe demos to FSL and Long Task pages#87
nucliweb merged 1 commit into
mainfrom
feat/interactive-demos

Conversation

@nucliweb

@nucliweb nucliweb commented Jul 3, 2026

Copy link
Copy Markdown
Owner

What

Adds interactive iframe demos to two Interaction snippet pages, reusing the self-contained demos from joanleon.dev.

  • Forced Synchronous Layout: embeds the raf-pipeline demo next to the double-requestAnimationFrame fix, so readers can step through the render pipeline and see why the double rAF avoids the forced layout.
  • Long Task: adds a new "Breaking Up Long Tasks" section with the yield-pipeline demo, comparing no-yield / queueMicrotask / setTimeout in 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

  • New reusable Demo component: iframe wrapper with postMessage auto-height and light/dark theme sync via shared localStorage (same origin as Nextra's next-themes).
  • Two demo HTML files copied into public/demos/.
  • Removed the duplicate "Severity Levels" mermaid in Long Task; the severity thresholds table above already covers it.

Verification

Verified at runtime (next dev) on both pages: iframes render inline, auto-height works, demos are interactive (step-through), light/dark theme syncs, and check:consistency passes.

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)
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
webperf-snippets Ready Ready Preview, Comment Jul 3, 2026 3:11pm
webperf-snippets-u6am Ready Ready Preview, Comment Jul 3, 2026 3:11pm

@nucliweb
nucliweb merged commit 82cd633 into main Jul 3, 2026
4 checks passed
@nucliweb
nucliweb deleted the feat/interactive-demos branch July 3, 2026 15:47
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