Skip to content

Preserve inline SVG phrasing geometry - #628

Merged
chubes4 merged 1 commit into
trunkfrom
fix/624-inline-svg-richtext-image-v2
Jul 19, 2026
Merged

Preserve inline SVG phrasing geometry#628
chubes4 merged 1 commit into
trunkfrom
fix/624-inline-svg-richtext-image-v2

Conversation

@chubes4

@chubes4 chubes4 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • materialize passive inline SVGs as native RichText image objects when they participate in phrasing flow
  • preserve linked SVG semantics and source dimensions without introducing core/html fallback
  • recognize generated SVG assets under source-relative paths such as website/assets/materialized-svg/
  • retain standalone core/image output for media layout boundaries

Fixes the remaining inline SVG portion of #624.

How to test

  1. Check out this branch from a fresh clone.
  2. Run cd php-transformer && composer test.
  3. Confirm all canonical contracts, unit tests, 244 parity fixtures, and package install proof pass.
  4. Inspect the artifact-level contract in php-transformer/tests/contract/run.php and confirm a source-relative SVG next to a heading serializes as a native paragraph image object rather than core/html.

Compatibility

  • No extension paths or public APIs change.
  • Existing unsupported or unsafe SVGs retain their bounded fallback behavior.
  • The behavioral change is limited to passive generated SVG assets that WordPress RichText can represent natively.

Supplementary evidence

A composed Static Site Importer browser run retained 291/291 editor-valid native blocks, removed the broken_svg finding, and eliminated the prior -8px cumulative page offset. The exact visual gate remains tracked separately by Automattic/static-site-importer#489.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenAI GPT-5.6 Sol via OpenCode
  • Used for: Root-cause analysis, implementation, regression coverage, and verification in collaboration with Chris Huber.

@chubes4
chubes4 merged commit a8f2fba into trunk Jul 19, 2026
1 check passed
@chubes4
chubes4 deleted the fix/624-inline-svg-richtext-image-v2 branch July 19, 2026 00:11
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