Skip to content

feat(media): composable stack image template - #3663

Merged
chubes4 merged 2 commits into
mainfrom
fix/issue-3661-data-machine
Oct 23, 2026
Merged

chubes4 merged 2 commits into
mainfrom
fix/issue-3661-data-machine

Conversation

@chubes4

@chubes4 chubes4 commented Oct 23, 2026

Copy link
Copy Markdown
Member

Closes #3661

What

  • New stack image template (StackTemplate): an ordered blocks array of text, image, qr, row, list, divider, spacer. Text and lists fit proportionally, spacers flex, and overflow or missing assets produce warnings instead of silently dropping content.
  • QR resolution and text fitting are extracted from PosterTemplate into shared TemplateHelpers rather than duplicated.
  • Registered for the ability and the CLI; warnings are surfaced through both.
  • Docs: docs/api/stack-image-template.md.

Verification

  • StackTemplateTest: OK (8 tests, 91 assertions), with a representative 8-block render on print_pocket_flyer and instagram_feed_portrait
  • PosterTemplateQrHeroTest: OK (9 tests, 96 assertions), so the PosterTemplate refactor causes no regression
  • tests/poster-template-smoke.php: 196 assertions passed
  • All 371 tests/*-smoke.php, exit codes compared against main: 0 regressions (45 already fail on main; see tests: gate standalone smokes in CI; fix or delete the 44 failing on main #3649)
  • php -l passes on all changed files; no site or vendor names added

Note: StackTemplateTest must run with the composer autoloader as bootstrap (its own WP stubs). Under tests/bootstrap-unit.php, that bootstrap's apply_filters stub shadows the test's QR filter stub and one assertion fails. The same bootstrap-ordering family as #3649.

Process note

Finalized outside Homeboy, with operator authorization (Chubes in Discord). The Cook (wf-cook-batch-535a84e2a820, n1) produced this candidate, but its --changed-since origin/main gate fails on smoke fatals that already exist on main (#3649), and the whole-suite --differential replacement gate was killed for no progress during npm install. Verification above was run by hand in the cook worktree.

Overlaps with the #3660 PR in ImageTemplateAbilities.php and ImageCommand.php. Whichever merges second needs a small rebase.

🤖 Authored by an AI agent (Extra Chill Bot: Pi cook plus manual finalization).

homeboy-ci Bot added 2 commits October 23, 2026 17:28
Adds a stack template that renders an ordered list of blocks (text,
image, qr, row, list, divider, spacer) with proportional fitting and
overflow warnings. QR resolution and text fitting are extracted from
PosterTemplate into shared TemplateHelpers.

Closes #3661
@chubes4
chubes4 force-pushed the fix/issue-3661-data-machine branch from 378ba5f to 4790af3 Compare October 23, 2026 17:30
@chubes4
chubes4 merged commit 1bff6e7 into main Oct 23, 2026
19 of 23 checks passed
@chubes4
chubes4 deleted the fix/issue-3661-data-machine branch October 23, 2026 17:36
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.

Image templates: composable 'stack' template (ordered blocks: text, image, qr, row, list, divider)

1 participant