Skip to content

Preserve authored classes and flex layout on anchor buttons - #833

Merged
chubes4 merged 10 commits into
trunkfrom
fix/830-anchor-button-classes
Aug 8, 2026
Merged

Preserve authored classes and flex layout on anchor buttons#833
chubes4 merged 10 commits into
trunkfrom
fix/830-anchor-button-classes

Conversation

@chubes4

@chubes4 chubes4 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove authored anchor-root classes from both core/button surfaces.
  • Retain generated provenance markers on the canonical button wrapper, projecting matched anchor-root selectors onto marker > .wp-block-button__link.
  • Bridge direct flex-child anchors through core/buttons > core/button > link: reset synthetic wrapper gap/margin, retain column stretch width through both wrappers, and keep paint/content on the canonical link.
  • Keep direct child selectors on preserved RichText descendants, including flex: 1, and add real Gutenberg parse/save validity coverage.

Verification

  • composer run test:canonical
  • composer run test:parity (272 fixtures)
  • node node_modules/vitest/vitest.mjs run src/wp/__tests__/button-save-validity.test.ts
  • Exact fixture20 stack: Preserve compact styled select controls #831 c84fc531 + Preserve authored static controls as compact native blocks #832 5174a285 + this PR 417ba565; SSI df7bb346; WP Codebox 78bebd6c. Gutenberg validation passed 802/802 blocks with zero editor warnings.
  • Fixture20 aligned visual mismatch improved from 2.50% to 1.53% (132,084/8,654,080 pixels; 2.37% raw). The seasonal/button clusters are absent from remaining regions; remaining differences are unrelated restyle_geometry and one 1,041-pixel missing/extra element region. Evidence: /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/fixture20-831-832-833-flex-bridge-retry/.

Fixture Integrity

No tracked fixture files changed.

Depends on #831. Closes #830.

AI assistance

OpenAI gpt-5.6-terra via OpenCode implemented the generic flex-wrapper bridge, added contracts, and ran the listed verification. Chris Huber remains responsible for every line.

Base automatically changed from fix/828-compact-static-select to fix/826-css-owned-svg-fill August 8, 2026 20:48
Base automatically changed from fix/826-css-owned-svg-fill to trunk August 8, 2026 21:45
chubes4 added 3 commits August 8, 2026 17:52
….6 Terra via OpenCode; generic bridge repair and contract]
…PT-5.6 Terra via OpenCode; added generic margin lowering contracts]
@chubes4
chubes4 merged commit 9949e87 into trunk Aug 8, 2026
6 checks passed
@chubes4
chubes4 deleted the fix/830-anchor-button-classes branch August 8, 2026 22:54
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.

Preserve authored classes and flex layout on anchor buttons

1 participant