Skip to content

Show the stack figure on the stack overview and the Simulation page - #34

Merged
codecsrayo merged 1 commit into
mainfrom
stack-figure-embed
Nov 25, 2026
Merged

codecsrayo merged 1 commit into
mainfrom
stack-figure-embed

Conversation

@codecsrayo

Copy link
Copy Markdown
Member

The sixth step: the isometric figure goes on the site, in English.

  • src/figures/embed.ts, scope.ts: cut the figure's page into its styles, markup and script and put every rule and lookup under the figure's own root (data-qd-fig), so two copies can share a page (the printed book holds both pages). Not in a frame: the guide is served with frame-ancestors 'none'. The light rules follow the site's theme.
  • src/components/FigureEmbed.astro, StackFigure.astro: place it; the language comes from the page's path under the site's base (langOf), not a hard-coded /docs/. wide widens it past the text's column only on a page without a table of contents; below 600 px the drawing scrolls sideways.
  • Stack overview (guide/stack/overview.mdx): the architecture section describes the three machines (main server with the orchestrator running the Trino coordinator, a Trino worker, the lake server), that big data adds Trino workers, and shows the figure in place of the flat diagram.
  • Simulation (guide/stack/simulation.mdx): the figure, wide, and how to read it. Same URL.
  • src/figures/embed.test.ts: the embedding's tests.

CSP: the figure's script is an inline module, which the guide's CSP allows (script-src 'self' 'unsafe-inline', the same the print book relies on); scripts/check-public.sh passes.

The flat components are still used by the Spanish pages until the next PRs; they are removed after.

Checks run locally: pnpm test (79 tests), both builds, scripts/check-public.sh.

🤖 Generated with Claude Code

The isometric figure becomes the architecture view on the stack overview,
which now says what runs on each of the three machines, and the content of
the Simulation page, with how to read it. The figure's page is cut into
its styles, markup and script and placed in the docs page (not framed:
the guide forbids framing), each copy under its own root so the printed
book can hold both; its theme follows the site's, and its language comes
from the page's path under the site's base. The page's script is inline,
which the guide's CSP allows ('unsafe-inline', as the print book's).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecsrayo
codecsrayo merged commit 80d72f6 into main Nov 25, 2026
2 checks passed
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