Skip to content

Preserve responsive form context and source-owned wrapper presentation in the producer contract #2356

Description

@chubes4

Goal

Complete the source-owned form presentation contract so the importer can preserve responsive context copy and non-control wrapper boxes through existing graph/target-map projection.

Consumer ownership refactor: Automattic/static-site-importer#1916 (merged). Remaining acceptance: Automattic/static-site-importer#1904.

Verified producer gaps

  • FormControlMetadataBuilder::classNames() retains the first 16 safe class tokens. In ZeeWorks, responsive heading/disclaimer classes occur later, so their source 24px/14px wide-screen typography is absent before the consumer sees the metadata. The SSI refactor repaired its earlier eight-token truncation but cannot restore missing producer facts.
  • FormLayoutGraphBuilder v2 only includes controls and their ancestor wrappers. Its declared-property vocabulary includes width/height but excludes minimum height and padding. A neutral source submit-parent with min-height:64px is emitted as wrapper-4 without that fact. Wrapper boxes around context-only copy can also disappear from the control-centered graph.
  • Context metadata carries text, classes and base typography, but does not offer a complete property-scoped responsive/context-wrapper presentation contract.

Desired change

Reuse the existing CSS analysis, presentation/container capture and form graphs to represent source-owned control, context and wrapper facts with explicit element identity, parent/order relationships, bounded property vocabularies, media conditions and provenance. Make budget exhaustion visible rather than silently treating an incomplete class/style set as faithful. Choose the smallest coordinated producer/consumer schema change after inspecting existing primitives.

Acceptance

  • Neutral fixtures cover responsive context classes after position 16, inherited/custom-property typography, submit and disclaimer wrapper padding/minimum height, and field/container spacing across 390/768/1440/1600.
  • Producer output retains the authored facts and their distinct box ownership; conditional patches contain only changed properties.
  • Unsupported/over-budget cases emit reviewable losses instead of a solved claim.
  • Paired SSI fixtures materialize those exact declarations to editable provider blocks with matching geometry and preserved submit semantics.
  • Failing-first source regression, full transformer tests, paired browser evidence, then one reuse of the existing ZeeWorks capture. Whole-site parity remains a separate gate.

AI disclosure: OpenAI GPT-6.1 Sol via OpenCode inspected the producer and reviewed the preceding fixture/import evidence; this tracker is prepared at Chris Huber's direction for the continued form compatibility refactor.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions