Problem
Static-site header conversion currently loses two related semantic surfaces:
- constrained search forms are recognized but preserved as
core/html, so provider-specific search endpoints and adjacent icon toggles do not become functional native WordPress search
- list-shaped navigation selectors such as
ul.site-menu > li and ul.site-menu > li a are not fully retargeted to the runtime markup emitted by core/navigation, losing menu spacing and typography
The four-page mrfoxtalbot.weebly.com parity fixture demonstrates both gaps. Its header uses a GET /apps/search form with a single q input plus adjacent search/open/close controls, and desktop navigation styles carried by list/item/anchor selectors.
Proposed Direction
- Detect a constrained search cluster with one GET query input and optional adjacent search trigger controls.
- Convert it to dynamic
core/search, using buttonPosition: button-only and buttonUseIcon: true for expandable icon-search patterns.
- Treat conversion as an intentional migration from provider-specific search endpoints to native WordPress search (
s).
- Project accepted source form/input/button selectors onto core search runtime classes.
- Retarget source navigation list/item/link selectors onto the corresponding
core/navigation runtime structure while preserving combinators, states, media rules, and specificity.
- Preserve complex/runtime-dependent search and filter forms as raw HTML.
Acceptance
- eligible header search clusters render functional native WordPress search with an icon trigger
- arbitrary forms remain losslessly preserved
- source navigation typography, casing, item spacing, hover treatment, and responsive rules survive conversion
- generated blocks validate in the editor
- existing transformer contracts and parity fixtures pass
- the four-page Weebly replay shows the repaired header on Home, Services, Team, and Contact
Evidence
- Search detection currently returns HTML preservation:
php-transformer/src/HtmlToBlocks/HtmlTransformer.php:7068-7112
- Standalone constrained search already emits
core/search: php-transformer/src/HtmlToBlocks/HtmlTransformer.php:7117-7163
- Existing header contract locks the current gap:
php-transformer/tests/contract/run.php:1611-1620
- WordPress core provides icon-only expandable search through the Interactivity API:
wp-includes/blocks/search.php
AI assistance
OpenAI gpt-5.6-sol through OpenCode was used to investigate current behavior, inspect the Weebly fixture and WordPress core implementation, and draft this issue. Chris Huber remains responsible for scope and implementation decisions.
Problem
Static-site header conversion currently loses two related semantic surfaces:
core/html, so provider-specific search endpoints and adjacent icon toggles do not become functional native WordPress searchul.site-menu > liandul.site-menu > li aare not fully retargeted to the runtime markup emitted bycore/navigation, losing menu spacing and typographyThe four-page
mrfoxtalbot.weebly.comparity fixture demonstrates both gaps. Its header uses a GET/apps/searchform with a singleqinput plus adjacent search/open/close controls, and desktop navigation styles carried by list/item/anchor selectors.Proposed Direction
core/search, usingbuttonPosition: button-onlyandbuttonUseIcon: truefor expandable icon-search patterns.s).core/navigationruntime structure while preserving combinators, states, media rules, and specificity.Acceptance
Evidence
php-transformer/src/HtmlToBlocks/HtmlTransformer.php:7068-7112core/search:php-transformer/src/HtmlToBlocks/HtmlTransformer.php:7117-7163php-transformer/tests/contract/run.php:1611-1620wp-includes/blocks/search.phpAI assistance
OpenAI
gpt-5.6-solthrough OpenCode was used to investigate current behavior, inspect the Weebly fixture and WordPress core implementation, and draft this issue. Chris Huber remains responsible for scope and implementation decisions.