Skip to content

refactor(php-transformer): move custom wrapper convention recognition into Elements/CustomWrapperConventions - #5280

Open
chubes4 wants to merge 1 commit into
simplify/empty-inline-geometryfrom
simplify/wrapper-conventions
Open

chubes4 wants to merge 1 commit into
simplify/empty-inline-geometryfrom
simplify/wrapper-conventions

Conversation

@chubes4

@chubes4 chubes4 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Part of #4368 (slice 2aa). Stacked on #5276, which is stacked on #5275.

What

  • New owner, Elements/CustomWrapperConventions. It recognizes custom element tags used as a wrapping convention rather than as component hosts. Moved verbatim out of HtmlCompilation:
    • Entry points: isWrapperConventionTag, authorDataAttributeSelectors, authorAttributeSelectorAddresses.
    • Helpers: customElementCssIsRenderNeutral, wrappedContentShape.
    • The WRAPPER_CONVENTION_MIN_INSTANCES and WRAPPER_CONTENT_SHAPE_DEPTH constants.
  • What stays: unwrapRenderNeutralCustomElements remains in HtmlCompilation because it owns the run's retained-hook state.
  • No substitutions needed; the only dependency is StyleResolver.

HtmlCompilation: 6914 → 6776 lines.

Verification


AI disclosure: Claude Opus (Anthropic) via Pi/Roadie moved the code with a mechanical mover script, ran the Lab gate and A/B, and wrote this PR for Chris Huber.

… into Elements/CustomWrapperConventions

Moves isWrapperConventionTag, authorDataAttributeSelectors,
authorAttributeSelectorAddresses and their two helpers, with the two
convention constants, out of HtmlCompilation verbatim.
unwrapRenderNeutralCustomElements stays: it owns the retained-hook state.
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