Skip to content

Recognize accordion items whose own element is the disclosure control - #3050

Merged
chubes4 merged 2 commits into
trunkfrom
fix/issue-3049-blocks-engine
Oct 19, 2026
Merged

chubes4 merged 2 commits into
trunkfrom
fix/issue-3049-blocks-engine

Conversation

@chubes4

@chubes4 chubes4 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Captured accordion panels used to be saved with their closed-state class list, including Tailwind `hidden`. core/accordion opens a panel only by removing the `hidden` attribute, so the `hidden` class kept every panel invisible. AccordionPattern now works out the panel's styling from the recorded open-state class list and drops the classes that only the closed state has. This applies to item-level controls and title buttons alike. The toggle icon keeps its resting (closed) class list. The fix is committed locally as c767b7a5 but not pushed, because the branch has no upstream set.

What changed

  • [operator-only reference omitted]
  • php-transformer/tests/unit/accordion-item-level-control.php: the full captured shape now matches the real evidence (`faq-answer mt-4 text-gray-600 hidden` with open/closed class attributes). New checks confirm the saved accordion-panel keeps `faq-answer` and the other shared classes, drops `hidden`, and has no `data-blocks-engine-capture-disclosure-*` attributes. A title-button case checks the same rule. These checks fail on the old branch head (6 failures) and pass after the fix (94 assertions).
  • `composer test:canonical` exits 0 with no failures.

How to test

  1. Run cd php-transformer && composer install --no-interaction --prefer-dist --no-progress && composer test:canonical; expect passes as recorded by Cook's deterministic gate.

Compatibility

Only affects accordion panels that carry the capture's open-class attribute. Panels without it are lowered exactly as before. The toggle icon and heading presentation are unchanged.

Evidence

  • Verified command cd php-transformer && composer install --no-interaction --prefer-dist --no-progress && composer test:canonical: status=succeeded; candidate commit 47d4149c918e7c76d02f35a7093ef2445744a976, tree aa3674031104ebfc879b40a89d3669c3d4b642dc, fingerprint 918194ccc81fc790a8d5d4a98acb817a8b5317a68c4e495cc35ce8b75fdd9dca; durable gate gate-1
  • Base unchanged since verification: trunk remains at 20d8b2a.
  • CI expected: Homeboy CI after push
  • Candidate adoption provenance: the candidate was promoted from the recorded Cook task execution.
  • Cook deterministic verification: 1 gate(s) completed green.
  • Durable run execution: Succeeded
  • Reviewer-resolvable evidence from source_refs[0]: Recognize accordion items whose own element is the disclosure control #3050
  • Task objective: Continue PR Recognize accordion items whose own element is the disclosure control #3050 (issue Accordion items whose own element is the disclosure control are not recognized #3049) in this worktree. The accordion now converts on the real import, but every panel stays collapsed when its item is opened.
  • Verified candidate scope: 2 changed file(s): php-transformer/src/HtmlToBlocks/Patterns/AccordionPattern.php, php-transformer/tests/unit/accordion-item-level-control.php.
  • Verified finalization base: trunk at 20d8b2a
  • deterministic gate passed: sh -c cd php-transformer && composer install --no-interaction --prefer-dist --no-progress && composer test:canonical (Passed)

AI assistance

  • AI assistance: Yes
  • Tool(s): Homeboy (pi)
  • Model: anthropic-claude-opus-5-5
  • Used for: [operator-only reference omitted]

@chubes4
chubes4 force-pushed the fix/issue-3049-blocks-engine branch from 329aa59 to cf17528 Compare October 18, 2026 21:09
@chubes4
chubes4 merged commit 97d00ed into trunk Oct 19, 2026
15 checks passed
@chubes4
chubes4 deleted the fix/issue-3049-blocks-engine branch October 19, 2026 11:39
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