fix(patterns): bands write the padding style WordPress rebuilds #136
No reviewers
Labels
No labels
build-dist
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!136
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/pattern-group-padding-style"
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?
Opening a page in the Site Editor offered "Attempt Block Recovery" in place of the page. Every generated band declared
style.spacing.paddingin its block attributes and wrote none of it into the markup. WordPress rebuilds a block's markup from its attributes and compares the two, so all five generated pages carried an invalid wrapper.It is not only an editor warning.
core/groupis a static block, so the saved markup is what renders:<main>today/rituals/,/spelwork/,/contact/, landingclass="wp-block-group alignfull …"— no padding/news/… style="padding-top:var(--wp--preset--spacing--lg);padding-bottom:…"News differs because someone hit this in September, recovered the block and saved, which is what left the
page-newsoverride (post 1085) in the database — it now shadows the theme's own template._group_wrapwas missingalignfulltoo — the class the align support puts on saved markup — so the brand previews carried the same fault.Scope
forgeblock_pattern.py: both group emitters derive the inline style from the padding they declare, via_padding_style/_preset_css, so the attributes and the markup cannot drift apart again._group_wrapalso emitsalignfull.build_surfaces.py build): the 5 theme patterns and all 6 brands' previews.udg/products/fux-capacity/wp-preview/patterns/fux-landing.php, a stale artifact from the old naming scheme thatlanding.phpreplaced. Nothing references it and its wrapper was invalid too.test_generated_block_markup.pyreads every generated pattern back: a declared padding must reach the markup, andalign:fullmust carry its class.Not in scope, found while diagnosing:
core/coverblocks and 28 blocks needing the Getwid plugins. They sit in the inserter.theme_builder.py(reachable only fromcli.py, not from this build path) emits header/footer groups with no wrapper tag at all — the same class of fault.Testing
tools/wp_theme_ingestor/,generator/tests/).@wordpress/blocks+registerCoreBlocks, with everytoilville/*block registered from its realblock.json. The theme's patterns, templates and parts, and all six brands' previews, now report zero invalid blocks. Before the fix it reported exactly the 5 wrappers.build_surfaces.py check,forgeblock_validate.py checkand the pre-commit gates are clean.Impact Statement
Restores band padding on the landing, rituals, spelwork and contact pages — they gain the top and bottom
spacing|lgthe design intends and News already has, so expect a visible spacing change on deploy. No copy, colour or structure changes. The editor stops offering block recovery on these pages.After deploy, the stale
page-newsoverride (post 1085) should be deleted so News renders from the theme file again like its siblings; until then, theme-side changes to that page stay invisible.