feat(learn): interactive Playground feature pages with live embed - #43
Merged
Conversation
Add a `<TrueCalc>` MDX component that embeds the live playground (try.truecalc.app) as an iframe, seeded via `seed="A1=10;A2==A1+1"`, and register it in the Fumadocs MDX components map. Add a new "Playground" section under Learn with five feature guides — edit, fill, copy/cut/paste, undo/redo, and bold — each with an inline interactive "try it" grid. Wire the section into the Learn sidebar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 & why
Adds an inline, interactive "try it" to the docs so readers can experiment with TrueCalc's spreadsheet UI features directly on the page, and lands the first set of feature guides.
Changes
<TrueCalc>MDX component (components/truecalc.tsx) — renders<TrueCalc mode="standalone" seed="A1=10;A2==A1+1" />as an iframe of the live playground (https://try.truecalc.app/?seed=<encoded seed>), ~360px tall, bordered, with an accessible title and lazy loading. Registered in the Fumadocs MDX components map (components/mdx.tsx).content/docs/learn/playground/) with a section index plus five feature guides — edit a cell, fill a formula, copy/cut/paste, undo/redo, and bold — each with an inline interactive grid seeded to match its first scenario. Wired into the Learn sidebar viameta.json.Verification
npm run build— succeeds; all six pages emit to the static export and the iframe (with URL-encoded seed) is present in the rendered HTML.npm run gen-docs+ drift check (git diff --exit-code -- content/docs/reference/functions) — no drift.npm run types:check— passes.npm run test-docs— the new pages contain no executed code blocks; the one pre-existing failure (learn/(foundations)/cross-sheet-references.mdx) is unrelated to this change and reproduces onmain.Follow-ups (out of scope here)
@truecalc/reactcomponent once available.