Skip to content

A website: the kit as Bureau draws it, a library of every component, its foundations and the guide - #19

Merged
explodi merged 2 commits into
mainfrom
website
Dec 3, 2026
Merged

explodi merged 2 commits into
mainfrom
website

Conversation

@explodi

@explodi explodi commented Dec 2, 2026

Copy link
Copy Markdown
Owner

A website for Bureau, in site/, published to GitHub Pages by a new workflow. It is the project's home page, a library of every component in the kit, the design system's foundations, and the guide.

Every picture on it is drawn by Bureau. deno task site:pictures bundles the gallery's TSX, runs each specimen in a bureau::Ui of its own, draws its display list through the Metal backend into an offscreen texture and writes the PNG (site/specimens/render.mm). There are no screenshots and no mock-ups: the library's code samples are the source of the function that drew each picture.

Pages

  • Home: the case for Bureau, using the README's own words. Its hero is a game screen (a budget window, a district instrument, HUD keys and controller prompts over a harbour town) with an x-ray slider that wipes across to the same frame's quads, the thing a renderer is actually handed (1,041 quads in 128 clips). Below it: both sides of the seam (TSX and C++), the two threads, what Bureau is and isn't, a mosaic of the kit, one window in five languages, the backends table, and getting started.
  • Library: 104 components in 81 pictures, in six sections: windows and dialogs; keys, checks and fields; lists, sheets and cards; meters, charts and readouts; instruments and motion; controllers, keyboards and hints. Each entry has its picture, what it's for, its import line, and the code that drew it. Animated components are animated PNGs that hold still under reduced motion.
  • Foundations: the DB32 palette, role inks in both chromes, type styles, bevel recipes, patterns, controller glyphs, motion and layers, read straight from kit/tokens.ts.
  • Guide: docs/*.md rendered, with links into the repository sent to GitHub.

The site is static HTML and CSS. Its only script is the hero's slider. Links are relative, so it works at any address.

How it's built

  • site/specimens/*.tsx: one file per library section. A specimen is a function that renders the component, plus its title, description, kit file and imported names.
  • site/specimens/render.mm (the bureau_specimens target, built with the tests): settles each specimen on a frozen clock, can hover a node, start the clock past an entrance animation, write frames as an animated PNG, and write the x-ray.
  • site/build.ts (deno task site): the pages, into site/dist/. A missing picture fails the build; --draft builds anyway.
  • .github/workflows/site.yml: draws the pictures on macos-26, builds the pages on Ubuntu, and deploys from main. Pull requests that touch the site, kit, docs or engine build everything and publish nothing.

deno task check now covers site/, and the guide's "Developing Bureau" section names the two tasks. marked is the one new dev dependency.

A kit fix

bureau-hold-fill had no 0% frame, so a HoldButton's fill stood full from the moment the hold began. It now grows from empty. This is in its own commit.

Bugs found while drawing the kit (not fixed here)

  • LoadingState shows /img/hourglass.gif, but Bureau decodes only PNG and JPEG (STBI_ONLY_PNG/JPEG), and the file isn't in assets/. The hourglass never draws, so the library's picture has an empty slot.
  • Icon's name prop loads /icons/95/<name>.png, a set that isn't in assets/.
  • Stamp, CardRow and CardStatus throw without a HintProvider, even with no hint, because they use useHintActions where keys use useOptionalHintActions.
  • GamepadKeyboard reads about 19 controller: strings that kit/i18n/kit_strings.ts doesn't have. Without a game catalog it shows "Text unavailable". The site supplies them in site/specimens/catalog.ts.
  • Card hard-codes id="toolbox-config".
  • ListLabel keeps its own inks under a row's selectedColor.
  • A Sheet with a wrap spansRow cell, in a shrink-to-fit parent, lays out far too tall.
  • Select draws fragments of its hidden options at 2x, and its open list doesn't mark the chosen option.
  • HudKey's ringing doesn't move: the native animator leaves rotateDeg out (src/view/anim.cpp), which also drops the rotation from bureau-shake.
  • GlitchText draws empty boxes for 18 of its 38 symbols (⌘, ⚠, ★ and others), because no shipped face has them.
  • RainbowWave drops spaces: each glyph is its own Text, and a lone space has no width.
  • kit/MenuBar.tsx's header comment still talks about game-specific files.

To publish

GitHub Pages has to be switched on for the repository, with GitHub Actions as its source (Settings → Pages). A custom domain, as Quaso has, needs a DNS record plus that setting. Until Pages is on, the Website workflow fails on main at configure-pages; pull requests aren't affected, since they skip that step.

https://claude.ai/code/session_015YsDT1mrrucxxz116AeCoP

bureau-hold-fill had only its 100% frame, and a missing 0% frame starts at
the property's resting value, which for scaleX is 1: the fill stood full
from the first frame of the hold. It now starts at 0.

Claude-Session: https://claude.ai/code/session_015YsDT1mrrucxxz116AeCoP
…its foundations and the guide

Every picture on the site is drawn by Bureau. `deno task site:pictures`
bundles the specimens in site/specimens/, runs each in a Ui of its own on a
frozen clock, draws its display list through the Metal backend into a
texture no window shows, and writes the PNG (site/specimens/render.mm, the
bureau_specimens target). An animation is written as an animated PNG with its
frames beside it, and the hero also as its quads alone, the x-ray its slider
wipes across. The library's code samples are the source of the functions
that drew its pictures.

`deno task site` builds the pages into site/dist/: the home page, the library
of 104 components in six sections, the foundations read from kit/tokens.ts,
and docs/ as the guide. They are static HTML and CSS, and the hero's slider
is the one script.

The Website workflow draws the pictures on macOS, builds the pages on Ubuntu
and publishes main to GitHub Pages; a pull request that touches the site,
the kit or the engine builds both and publishes nothing.

Claude-Session: https://claude.ai/code/session_015YsDT1mrrucxxz116AeCoP
@explodi
explodi merged commit 02ac871 into main Dec 3, 2026
5 checks passed
@explodi
explodi deleted the website branch December 3, 2026 05:42
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