LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtNov 18, 2026, 3:56 PM
updatedAtNov 18, 2026, 4:58 PM
githubUrlhttps://github.com/neomjs/neo/issues/21349
authorneo-opus-ada
commentsCount0
parentIssue21329
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 18, 2026, 4:58 PM

Chips in a chip field render unstyled: list.Chip items get no windowId

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

Context

The chip field example draws its chips with no chip styling: no border or radius, and each close button is the browser's default grey button with the fa-times-circle glyph spilling over its edge. The frames on PR #21327 show it on dev (0128668721) and at that PR's head alike; that PR fixed only the inline label.

Measured on the dev server, examples/form/field/chip at 6cbcd09625, 1440 × 900, neo-theme-light:

stylesheets matching /chip/  src/form/field/Chip.css, src/list/Chip.css   (no component/Chip.css)
.neo-chip                    border 0px none, border-radius 0px
.neo-chip-close-button       background rgb(239, 239, 239), border 2px outset

examples/list/chip on the same server loads component/Chip.css from src, theme-dark, theme-light and theme-neo-light; its chips have a 1px border, a 15px radius and a transparent close button.

The Problem

Neo.component.Chip's theme files load only once a chip gets a windowId: component.Abstract#afterSetWindowId() is what calls insertThemeFiles(). list.Chip#createItemContent() creates its chips with appName, parentId, tabIndex, itemDefaults and the record's config, but no windowId (unchanged since 722f78a5d4, 2021). A chip gets a window only when list.Component#afterSetWindowId() hands the list's window to items that already exist.

That is why the two examples differ. The chip list's items exist before the list joins its window, so they receive it. The chip field's store loads by url, so its chips are created after the field and its ValueList already hold a window. They never get one, and nothing else in that window loads component/Chip.css.

Loading the styles exposes a second gap. Styled chips are 30px tall (--chip-height), and the field's input row grows to 36px around them, but an inline label's outline stays at calc(var(--textfield-input-height) + var(--textfield-border-width) * 2), 27px. The chips then hang below the outline's bottom edge.

The Architectural Reality

  • src/list/Chip.mjs createItemContent(): the Neo.create() call without windowId.
  • The other three list.Component subclasses in src pass it: src/list/Circle.mjs, src/list/Buffered.mjs and src/calendar/view/calendars/List.mjs (windowId: me.windowId).
  • src/form/field/chip/ValueList.mjs extends list.Chip, so the field inherits the fix.
  • resources/css/src/form/field/Text.css: .label-inline .neo-label-wrapper is position: absolute with that fixed height. Its .neo-has-character-count.label-inline rule already lays the field out as a grid whose outline takes grid-area: input at height: 100%, so the outline spans the input row and the error sits below.
  • Design authority: #17312's acceptance criterion "Both shipped themes style the field token-governed", and resources/css/src/component/Chip.css (.neo-chip { border: var(--chip-border); border-radius: var(--chip-border-radius) }, .neo-chip-close-button { background: none; border: 0 }).

The Fix

  • Pass windowId: me.windowId in list.Chip#createItemContent(), as its siblings do.
  • In resources/css/src/form/field/Chip.css, lay out .neo-chipfield.label-inline as the character-count grid does: the outline and the input row share grid-area: input, the error takes error.

Acceptance Criteria

  • AC-1: A chip that list.Chip creates after the list has a window carries that window. A unit spec shows it, red on base and green at head.
  • AC-2: examples/form/field/chip loads component/Chip.css. Its chips show the theme's border and radius and a transparent close button.
  • AC-3: The PR body shows the chip field at rest before and after.
  • AC-4: examples/list/chip looks the same before and after.
  • AC-5: With an inline label, the chip field's outline spans its input row, also when that row wraps, and a validation error sits below the outline.

Out of Scope

  • Neo.create() inheriting windowId from parentId across the engine. The siblings pass it explicitly; an engine-wide default is its own decision.
  • The chip field's inline label (#21324, PR #21327).
  • Any change to the chip design.

Avoided Traps

  • Loading component/Chip.css from form/field/Chip.css or through additionalThemeFiles. That paints over the symptom and leaves list.Chip the only list.Component whose items have no window.
  • Only height: 100% on the outline, as TextArea.css does. An error renders in flow, so the outline then wraps the error too (measured with an error under the field: outline 388–441 px, input row 388–424 px). TextArea.css subtracts 1.5em under :has(.neo-textfield-error), which holds only for a one-line error.

Related

  • Parent: #21329
  • #21324, PR #21327 (its frames show this defect)
  • #17312 (the field as a multi-select over list.Chip)
  • #21334 (field-type workbench states; its chip tiles need this)

Live latest-open + closed sweep: checked latest 20 open + open and closed search ("chip unstyled", "chip windowId", "list.Chip", "chip close button", "chip theme css"; #17312 Out of Scope read) at 2026-11-18T14:55Z; no equivalent or prior exclusion found. Backlog: 79 open (red), so this is filed as a leaf of the lane epic #21329. A2A sweep: latest 30 messages, all read states, no claim on this scope. MC sweep: "chip field chips unstyled close button default browser button component Chip.css not loaded", "list item components created without windowId theme files insertThemeFiles missing CSS"; 10 results, no prior decision found. Own-assignment sweep: 9 open, none overlapping (#21324 is the label, #21334 the field-type states).

Retrieval Hint: "chip field chips unstyled list.Chip windowId theme files" Origin Session ID: 700d27bb-8c8b-4bfa-b85e-82e089eac915

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