Skip to content

Unify button dispatch onto ButtonsPattern - #1841

Merged
chubes4 merged 1 commit into
trunkfrom
fix/unify-button-dispatch
Sep 16, 2026
Merged

chubes4 merged 1 commit into
trunkfrom
fix/unify-button-dispatch

Conversation

@chubes4

@chubes4 chubes4 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #1833

One emitter: ButtonsPattern + ButtonSignalClassifier. Registry wrappers stay.

  • ButtonLinkDispatcher.convertAnchor / convertButton go through recognizePatterns for ButtonAnchorPattern / ButtonPattern first. Leftovers are only non-button (logo, image-from-anchor, paragraph host, link wrapper, runtime island).
  • Duplicate requiresWrappedButtonPreservation on the dispatcher is gone; ButtonsPattern owns it.
  • ButtonElementConverter keeps search-cluster omit and image-carrier group; generic convertButton uses ButtonsPattern.
  • ButtonLinkDispatchContext and ButtonPatternContext take StyleResolver, SourceDom, runtime islands, and other existing objects instead of closures. No new Context bags. ButtonStyleResolver is not merged with GeneratedBlockStyleProjector.

Verified: composer test in php-transformer/ (311 parity fixtures).

AI assistance

xAI grok-4.6 via OpenCode implemented this change. Chris Huber directed the work.

Route ButtonLinkDispatcher through ButtonAnchorPattern/ButtonPattern,
delete duplicate wrapped-button preservation, and back ButtonPatternContext
and ButtonLinkDispatchContext with StyleResolver, SourceDom, and existing
collaborators.

Fixes #1833

AI assistance: xAI grok-4.6 via OpenCode. Chris Huber directed the work.
@chubes4
chubes4 merged commit c62bc72 into trunk Sep 16, 2026
10 checks passed
@chubes4
chubes4 deleted the fix/unify-button-dispatch branch September 16, 2026 19:32
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.

Unify button dispatch onto ButtonsPattern

1 participant