LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtNov 18, 2026, 6:49 PM
updatedAtNov 18, 2026, 8:48 PM
githubUrlhttps://github.com/neomjs/neo/issues/21381
authorneo-opus-ada
commentsCount0
parentIssue21329
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 18, 2026, 8:48 PM

A chip field wraps its triggers onto a row of their own

neo-opus-ada
neo-opus-ada commented on Nov 18, 2026, 6:49 PM

Sub of #21329. Owned by @neo-opus-ada for the Engine 14 cut (Mon 23 Nov), so no curated labels: the form-field-chip tile in neomjs/pages#109 crops this field.

Context

Found on PR #21369 (#21366), whose operator-requested 7.5 px text inset makes each glyph-less chip wider. Measured on dev 28fed2adc6 in devmode, examples/form/field/chip on neo-theme-light, setting the field's width (the inspector's own control) through Neo.worker.App.setConfigs:

Field width Row 1 Row 2 Field height
300 px (default) value list 175 px, input 80 px (its minimum), clear and dropdown triggers none 36 px
270 px value list 175 px, input 81 px the clear trigger, then the dropdown trigger, at the row's start 65 px

At #21369's head the default 300 px example renders the second case: rework-field-dark-after.png on ada/21366-evidence (1c1cf5c35a).

The Problem

The chip field's input row wraps (#21349 AC-5 makes the outline span it), and its triggers wrap with it. Once the chips and the input fill the first row, the dropdown trigger moves to the start of a row of its own. It reads as a stray glyph under the chips, and the field grows by a row with nothing to type into.

The Architectural Reality

  • src/form/field/Text.mjs afterSetTriggers() renders the input wrapper as [...startTriggers, input, ...endTriggers].
  • src/form/field/Chip.mjs insertValueListVdom() splices the value list in before the input, and its afterSetTriggers() override re-runs it after every trigger rebuild.
  • resources/css/src/form/field/Chip.css: .neo-chipfield .neo-input-wrapper is one flex row with flex-wrap: wrap; gap: 4px, and the input is flex: 1 1 80px; min-width: 80px. Value list, input and triggers are siblings in that row, so a trigger wraps like a chip.
  • No stylesheet selects .neo-input-wrapper > …; Picker aligns its picker to the input wrapper by id. Text#getInputEl() finds the input by a deep VDomUtil.find, so nesting it does not break the lookup.

Design authority: align_='end' (src/form/field/trigger/Base.mjs) puts a trigger at the field's end. #21349 AC-5 lets the chip field's input row wrap; no record places triggers in that flow.

The Fix

  • insertValueListVdom() groups the value list and the input in one flow node, {cls: ['neo-chipfield-flow'], cn: [valueListReference, input], id: <field id>__flow}, where the input sat, instead of splicing the list before it. It runs after every trigger rebuild, so the grouping survives trigger changes.
  • resources/css/src/form/field/Chip.css: the input wrapper stops wrapping, and .neo-chipfield-flow takes display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 4px; min-width: 0. The triggers keep their places at the wrapper's start and end, centered on the field's height by the wrapper's existing align-items: center.

Acceptance Criteria

  • AC-1: Once the chips and the input fill the first row, the clear and dropdown triggers stay at the field's end, beside the wrapped chips and input, instead of starting a row of their own.
  • AC-2: A chip field whose chips and input fit one row renders as before (one row, 36 px).
  • AC-3: Adding or removing a trigger keeps the grouping: the value list stays before the input, inside the flow node.
  • AC-4: Typing, Backspace removing the last chip, and the picker's alignment work as before.
  • AC-5: A browser spec narrows the field until the chips and the input fill the row, and reads the triggers' edge: red on base, green at head.
  • AC-6: Post-merge: the form-field-chip tile shows the triggers at the field's end.

Out of Scope

  • The chip's fill and text spacing (#21366).
  • Where a text field shows its error (#21324, Out of Scope).

Avoided Traps

  • Absolutely positioned triggers over an end padding on the wrapper: the padding would have to track how many triggers show.
  • Shrinking the chip text inset until the default example fits: it fixes one width and leaves the wrap at every other.

Related

  • Parent: #21329. Siblings: #21349 (the wrapping input row, AC-5), #21366 and PR #21369 (the text inset that pushes the default example over).

Live latest-open + closed sweep: checked latest 20 open plus open and closed search ("chip field trigger", "trigger wraps row", "chipfield wrap"; #21349, #21324 and #17312 read on trigger and wrap clauses) at 2026-11-18T17:48Z; no equivalent or prior exclusion found. Backlog: 85 open (red), folded under #21329. A2A in-flight claim sweep: last 30 messages, no chip field claim. MC sweep: "chip field dropdown trigger drops onto a second row when the chips fill the field width"; 6 results, no prior decision found. Own-assignment sweep: 8 open; #21366 and #21334 share the surface, neither covers trigger placement.

Retrieval Hint: "chip field trigger wraps onto a row of its own"