LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtNov 18, 2026, 3:14 PM
updatedAtNov 18, 2026, 8:55 PM
githubUrlhttps://github.com/neomjs/neo/issues/21334
authorneo-opus-ada
commentsCount2
parentIssue21329
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[x] 21324 Color list throws, chip label overlaps its chips, form app Save throws
blocking[]
closedAtNov 18, 2026, 8:55 PM

Every field type shows its states in the workbench

neo-opus-ada
neo-opus-ada commented on Nov 18, 2026, 3:14 PM

Context

#21140's content table, Forms & Fields tiles: "18 field entries, ↻ in one template: the stage shows the field in its states (empty, filled, invalid, disabled, read-only). + 9 types without an entry: Country, Currency, Display, IBAN, Password, Phone, Range, Search, ZipCode." Grace's rows sharpen two of the states: "empty with placeholder" and "invalid with its message". Lane epic #21329.

The Problem

Each field workbench shows one bare field in an otherwise empty stage. Eleven of them label it "Label", so their tiles would read as the same card many times. Nine field types have no entry, and IBAN appears in no example or app (the rows).

The Architectural Reality

  • examples/ConfigurationViewport.mjs#onConstructed() puts exampleComponent alone into the stage's .neo-example-container, and onConfigChange() writes the inspector's values to it. The tile recipe crops the stage's first item, .neo-example-container > * (buildScripts/docs/captureExamples.mjs#captureTile()).
  • examples/form/field/ holds 17 entries: 16 field types and the copyToClipboard trigger. The "18" above does not match the tree. picker leaves the catalog (#21140 ✕), so 16 entries adopt the template.
  • The field classes are src/form/field/*.mjs, 26 types; Hidden gets no entry. validate(false) shows a field's own message before it mounts (src/form/field/Text.mjs#validate()). FileUpload has states of its own (state: ready, uploading, upload-failed, downloadable, …), not empty and filled.
  • Design authority: #21140's body (quoted above) makes the states the target; this calls no engine behaviour wrong.

The Fix

  • ConfigurationViewport gains one hook, createStageItems(): items that follow the example component on the stage, none by default. The example component stays the stage's first item, so the inspector still drives it and the tile recipe still finds it.
  • The tile recipe hides the stage's other items while it captures, so a tile still shows the component alone.
  • Neo.examples.form.field.StatesViewport (examples/form/field/StatesViewport.mjs, styles in resources/css/src/examples/form/field/StatesViewport.css) is the template. An entry declares its field once and the states that apply to its type. The live field, which the inspector drives, is the filled state; below it, captioned, the same field empty with its placeholder, invalid with its message, disabled and read-only. FileUpload shows its own states.
  • The 16 entries adopt it, each field labelled as a form would label it, never "Label".
  • Nine new entries, examples/form/field/<type>, are built on it.
  • Every stage names its field ("Date field"), never a class (design 7).

Acceptance Criteria

  • AC-1: Each of the 16 entries shows its field in the states that apply to it, and an inspector change reaches the live field.
  • AC-2: Country, Currency, Display, IBAN, Password, Phone, Range, Search and ZipCode each have an entry in the same template.
  • AC-3: No stage title is a class name.
  • AC-4: Frames of three entries at 1440 × 900 and 390 × 844, dark, on the pull request.
  • AC-5: The nine new entries are listed for the tile recipe; their records arrive with their crops.

Out of Scope

  • The input masks, the form app and the new demonstrations (their own leaves under #21329).
  • picker, date/selectorContainer and fields leaving the catalog (#21140 ✕): #21333 edits the group's records.
  • The defects of #21324 (landed in #21327).

Intake (18 Nov, after the drift probe)

  • Drift since createdAt: src/form/field/Chip.mjs and ComboBox.mjs (#21327), apps/portal/resources/data/example-captures.json (#21342). #21327 fixed what the template builds on; #21342 is the recipe it keeps working. The prescription stands.
  • Prescription checked: examples/ConfigurationViewport.mjs — owns the concern (stage and inspector); the field-only logic goes to a subclass beside its consumers.
  • Structural: the nine entries take the fast path (sibling examples/form/field/date/). For the template, full pre-flight: considered ConfigurationViewport.mjs itself (field logic in every workbench), examples/form/, src/form/field/ (no engine primitive); chose examples/form/field/, the only tree it serves. No ADR applies; the Structural Inventory maps no examples/ row, so no map change.
  • Core idioms: each state is a config object its container creates (Neo.create(), src/Neo.mjs) with its state given at construction, so nothing mutates afterwards and no set() batch is needed (src/core/Base.mjs). The states share nothing, so no state.Provider (src/state/Provider.mjs).
  • Verdict: valid-as-written, sharpened. Duplicate sweep (all states since 14:00Z, open PRs on these paths): none.

Related

Parent #21329 · #21140 · #21324 · the tile recipe (#21332) and the tile list (#21333), siblings under #21329.

Live latest-open + closed sweep with #21329's at 2026-11-18T14:12Z: no equivalent; #18996 (closed) added unit coverage for three of the fields, not examples.

Retrieval Hint: "field states template workbench empty filled invalid disabled read-only nine field types without an entry IBAN"

⚖️ Ada · @neo-opus-ada · Claude Opus 5.5 · Claude Code