feat(surfaces): emit toilville/* Gutenberg blocks from ForgeBlock (layer 2 to 3) #104
No reviewers
Labels
No labels
priority
P1
priority
P2
priority
P3
priority
P4
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Toilville/toilville-design!104
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/forgeblock-toilville-gutenberg-emitter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the layer Peter flagged on #102. Targets
main.The pipeline stopped one step short. ForgeBlock was rendered straight to core
Gutenberg blocks, so the patterns were a flat content skeleton — while the blocks
that actually carry the Toilville design (
toilville/*inToilville_Rituals/wordpress/rituals-wp/) sat unused, even thoughtoilville-fse/templates/front-page.htmlalready composes them by hand.The adapter layer
forgeblock_toilville.py— each adapter recognises a run of ForgeBlocks andemits the matching
toilville/*block with attributes filled from the designcopy. Unrecognised runs still fall through to core blocks, so output stays valid
while coverage grows. Adapters are surface-aware: a surface with no hero
block (rituals/news/contact) falls through rather than borrowing another page's
hero.
toilville/hero-home,toilville/joinband-ctatoilville/spelwork-hero,toilville/spelwork-ctaThe Home hero now round-trips the design exactly:
Two converter fixes this depended on
1.
_collect_text()lost document order.handle_data()concatenated everytext run of a node into
.textregardless of position, so<h1>a <span>b</span> c</h1>flattened to"a c b"— that's the mangled"Governance should be a , not a plugin. primitive" in the #102 renders.
Nodenow keeps
parts, an ordered interleave of text runs and children. Joining ispunctuation-aware, so
<span>primitive</span>, not…no longer yields"primitive , not…".2. Headings record
emphasis— the inline<em>/<strong>/recoloured<span>. A flat string can't say which words carry the accent, which isexactly what
hero-home'sheadline1/emphasis/headline2split needs.And a fix to my own previous pass
Annotating CTAs in #101 promoted the nearest enclosing
<div>todata-block="actions", which swallowed sibling headings and body copy — theHome closing CTA "Let's build it." vanished entirely. Buttons are now wrapped
in their own button-only container. Landing goes 47 → 49 blocks.
Supporting changes
theme.jsongains six palette slugs so layer 3 has presets for the tokensadded in #100:
accent-spelwork,accent-rituals,neutral-warm-{ink,body,muted},brand-surface. Each verified againstdist/toilville/tokens.dtcg.json.align_check.pygains a layer-3 audit — raw hex in thetoilville/*blocks,with the SPELWork-skin values (
#7394c8/#587c6d/#c66c5a) reportedseparately since those are correct-but-untokenised, not drift.
Correction to something I said on #102
I reported "9× stale
#cc5c37, 0× canonical" in the blocks. That was a plaingrep that didn't distinguish fallbacks — they are all
var(--wp--preset--color--primary, #cc5c37), so the blocks do reference thepreset and already render the corrected
#c05734in production. Only thefallback literal is stale. The genuine raw hex is 13 values (
#fff,#E1B659in JS/PHP,
#1a1a1a,#5a5a5a,#f4f4f2), which the new audit lists.Verification
just check— fully greenpytest generator/tests/ tools/wp_theme_ingestor/test_*.py— 267 passedspelworkgaining a correct"emphasis": "legible."on its H1Still open
No block yet for the Rituals hero, the Wish/Steward/Ritual triad, the
ritual-in-progress demo, the CLI terminal, the intent-registry console, or "Who
we are".
products-grid/product-card/wish-formadapters needcolumn_setand form detection first. Tracked on #102.
https://claude.ai/code/session_01Kbzfscp4w5enUrZxMnDt78