Skip to content

docs: surface pointer + trace playgrounds into a top-level Explore section#227

Open
gnidan wants to merge 10 commits into
transform-contextfrom
docs-explore-section
Open

docs: surface pointer + trace playgrounds into a top-level Explore section#227
gnidan wants to merge 10 commits into
transform-contextfrom
docs-explore-section

Conversation

@gnidan

@gnidan gnidan commented Jul 2, 2026

Copy link
Copy Markdown
Member

Surfaces the interactive pointer and trace playgrounds out of the dense Core
Schemas reference and into a dedicated top-level Explore section — the
project's best teaching material, previously buried under reference/spec pages.

This is a packages/web (docs site) change only — no spec/schema changes.

Structure (docs/web)

  • New top-level Explore section (sidebar position 2, under Project
    overview): Pointer Playground, Trace Playground, BUG Playground, plus a hub
    landing page.
  • Navbar Playground item.
  • Absorbs the former Examples section (BUG playground moves in); subsequent
    categories renumbered (Getting started 3 … Reference 7).
  • Repoints the former /docs/examples/* links (overview, getting-started,
    compiler guides) to /docs/explore/* and drops a stale pagination override.

Content (docs/web)

  • Curated standalone playground pages — one flagship example per concept
    (pointers: memory slice / storage slot / struct group / computed slot;
    tracing: counter → function call → tail-recursive sum → factorial).
  • Trims the interactive widgets out of the Core Schemas reference pages
    (regions/collections/expressions/tracing), keeping schema tables + static
    SchemaExamples + spec links, with cross-links to the playgrounds.
  • Tracing's "Building a trace viewer" how-to moves to Implementation guides.

Prose authored by writer (commit d585ddd); structural wiring by docs.

Note: the old /docs/examples/* URLs change to /docs/explore/*. All
in-repo links are updated; a client-side redirect for external inbound links
is a possible follow-up (needs the plugin-client-redirects dependency).

gnidan added 2 commits July 2, 2026 16:42
Content for the docs reorg (#17), authored for integration into docs'
Explore section (docs/explore/, per gnidan's Option A + build-fresh-and-
trim). Authoring source for docs to integrate onto docs-explore-section.

- explore/trace-playground.mdx: learn-by-doing (counter -> function call
  -> tail-call optimization).
- explore/pointer-playground.mdx: curated cross-topic (memory region,
  storage slot, struct group, computed-slot expression).
- explore/index.mdx: Explore hub linking the three playgrounds.
- explore/bug-playground.mdx: moved from examples/.
- core-schemas/programs/tracing.mdx: trimmed to reference; interactive
  examples moved to the Trace playground.
- implementation-guides/building-a-trace-viewer.mdx: extracted how-to.
- pointers/{regions,collections,expressions}.mdx: interactive examples
  removed, schema tables + prose kept, playground cross-links added.

All internal links point at /docs/explore/*.
Structural wiring to complete the Explore section reorg:
- add explore/_category_.json (label "Explore", sidebar position 2)
- add navbar "Playground" item -> /docs/explore
- renumber subsequent categories (Getting started 3, Concepts 4, Core
  schemas 5, Implementation guides 6; Reference 7)
- order Explore pages: Pointer / Trace / BUG playground per plan
- repoint former /docs/examples links (overview, getting-started,
  compiler guides) to /docs/explore and drop the stale resources
  pagination override

Composes with the Explore content + reference trims. Part of #17.
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://ethdebug.github.io/format/pr-preview/pr-227/

Built to branch gh-pages at 2026-07-03 21:27 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

gnidan added 4 commits July 2, 2026 17:04
Per review: remove the top-nav Playground entry so the header reads
Documentation | Specification. The Explore sidebar section (the core
reorg) stays. Part of #17.
explore/index.mdx carried pagination_prev: core-schemas/info/resources
from the old examples/ page (position 6). With Explore now at position 2,
that pointed Previous forward into Core schemas; drop it so Previous
auto-links to Project overview. Part of #17.
Per review, replace the toy pointer examples with real Solidity storage
layouts: packed sub-slot address, dynamic array element (keccak256(5)+i),
mapping value (keccak256(key,3)), and the flagship short/long storage
string (one pointer resolved against both short and long state). Content
authored by writer; keeps sidebar_position 2 (Pointer/Trace/BUG). #17.
lint-staged's glob skips .mdx, so the rebuilt examples slipped past the
local hook; apply prettier (quote-style only). #17
gnidan added 4 commits July 2, 2026 21:13
Per gnidan #227 review: Explore now sits after Reference (position 8)
instead of position 2.
- pointer-playground: mark "pointer" as an ethdebug/format noun
  (bold+link to the pointers reference)
- bug-playground: introduce BUG + bugc (optimizing reference compiler)
  and the self-referential validation angle
- Explore CTA sidebar_labels (drop "Playground"): per-item
  call-to-action wording
- core-schemas/pointers/index.mdx: mark "pointer"/"ethdebug/format" as
  nouns on first use (harmonizes with the Explore pointer intro)
- trace CTA sidebar_label: drop "live"
gnidan added a commit that referenced this pull request Jul 3, 2026
#243)

The docs BugPlayground only ever showed one program; the example
picker lived in the standalone packages/playground app. Port a lean
version into the docs widget (gnidan #33).

- bugc-react: add a curated `bugExamples` set (Counter, Function calls,
  Arrays & loops) as a reusable export. Sources are distilled from
  packages/bugc/examples and stripped of the `/*@test*/` behavioral
  annotations the raw files carry, so they read cleanly in an editor.
  examples.test.ts asserts each compiles to bytecode without errors
  (guards against a typo in an inlined source); adds the missing
  vitest.config.ts so the package's test script runs.
- web BugPlayground: add an optional `examples` prop (defaults to
  bugExamples) and an Example dropdown in the header controls. The
  selector shows only when no `initialCode` is passed — so the bare
  playground page gains it while inline single-example doc embeds stay
  unchanged. Selecting an example loads its source and recompiles.

Additive; does not affect the tracer or #227. Example sources verified
to compile via the new tests; UI wiring mirrors the existing optimizer
selector.
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