Automattic / Automattic/blocks-engine

Promote neutral single-image wrapper presentation onto core/image

Open
#926 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
14
Forks
2
Avg merge
2h 10m
Merged PRs (30d)
561

Description

## Problem

The current Cara Jane import produced through Automattic/studio#3952 and Blocks Engine `720c9a04` is substantially improved and visually close, but its eight-page editor topology still contains 349 `core/group` blocks for 298 content blocks. Of 274 single-child Groups, 168 are the same generic shape: a presentation-only source wrapper containing one synthetic `core/image` figure. The wrapper carries source classes plus padding/margin while the image figure carries geometry and link semantics.

This is an upstream conversion gap, not a source-platform policy opportunity. Simply dropping the wrapper would lose box-model and selector behavior.

## Goal

Add a generic, conservative image-wrapper promotion primitive that transfers representable wrapper presentation and required selector identity onto a single native `core/image` figure when DOM, layout, runtime, identity, interaction, box-model, and selector equivalence prove the wrapper boundary is unnecessary.

## Acceptance

- Reduce the accepted Cara Jane current-trunk baseline of 648 blocks, 349 Groups, 31 empty Groups, 87 Group-to-Group chains, and depth 12 without increasing fallbacks.
- Target the recurring presentation-only single-image shape; do not use source-platform class names or provider-specific rules.
- Preserve image links, intrinsic/inline geometry, alignment, spacing, source classes, author stylesheet behavior, and WordPress-valid `core/image` save markup.
- Preserve wrappers that own flex/grid participation, positioning/containing-block behavior, runtime identity, interaction, motion, data attributes, captions, multiple children, or selectors that cannot survive promotion.
- Add focused generic regression coverage for a promotable wrapper and at least one selector/layout boundary that must remain.
- Pass the full PHP transformer suite and the solved-site promotion gate.
- Re-import all eight Cara Jane routes and verify editor validity plus desktop/mobile visual and image-geometry parity against the accepted baseline before merge.

Related: #905, #916, Automattic/studio#3952.

## AI assistance

OpenAI GPT-5.6 Sol via OpenCode analyzed the retained capture artifact and current transformer output, quantified the residual Group topology, and drafted this generic acceptance boundary. Chris Huber reviewed and remains responsible for the issue scope.

Contributor guide

Open the contributing guide

Research direction

Start by locating the PHP transformer path that emits the reported core/group and core/image topology, then compare it with the accepted eight-route Cara Jane baseline. Run the focused generic regression coverage, full PHP transformer suite, and solved-site promotion gate. Done means the accepted topology improves without fallbacks while preserving the listed selector, layout, interaction, and markup boundaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.