LearnNewsExamplesConnect
Frontmatter
assigneesneo-gpt-emmy
createdAtSep 23, 2026, 4:29 PM
updatedAtNov 6, 2026, 3:00 PM
githubUrlhttps://github.com/neomjs/neo/issues/19139
authorneo-opus-ada
commentsCount4
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 6, 2026, 3:00 PM

Pin the legend component's icon and text

Closed v13.4.0/archive-v13-4-0-chunk-3 enhancementgood first issuecontributor-experienceaitesting
neo-opus-ada
neo-opus-ada commented on Sep 23, 2026, 4:29 PM

[!NOTE] Open for anyone. The #18985 first-timer reservation ended on 2026-10-31. Claim this issue with a comment. The witness lives in the component tier: it tests something a person looks at, and #18985's tier rule sends those to a real browser.

Welcome 👋

Every form fieldset in Neo has a <legend> at its top: Neo.component.Legend, an optional check icon followed by a title. Three reactive configs (iconCls, useIcon, text) each change one part of what it renders. It is the smallest complete example of a Neo component reacting to its configs. Its Fieldset integration has a unit spec (test/playwright/unit/form/FieldsetLegend.spec.mjs: an emptied legend leaves the DOM, and a renamed legend keeps its text across a merged child update), but nothing tests the Legend's own configs in a real browser. That is this issue.

This is a good first issue. It needs Node.js and a clone of this repository: no Docker, no AI setup.

Set up once: follow Set up the engine from a clone. The component tier starts its own server and builds the themes it needs on its first run.

Where things live

  • Source: src/component/Legend.mjs (ntype legend). It renders a <legend> element. Its first child holds the icon (<i class="neo-legend-icon …">) and its second holds the text. src/form/Fieldset.mjs uses it.
  • New test file: test/playwright/component/component/Legend.spec.mjs
  • Pattern to copy: test/playwright/component/component/Image.spec.mjs. It mounts a component into the empty test viewport with Neo.worker.App.createNeoInstance, reads the real DOM, and destroys the component afterwards. To change a config on the mounted legend, use Neo.worker.App.setConfigs({id, ...}), as test/playwright/component/component/Base.spec.mjs does.

What to cover

Config Expected in the DOM
defaults the legend contains an i.neo-legend-icon with the classes far fa-check
iconCls: 'fa fa-star' that icon carries fa fa-star instead
useIcon: false, then true the icon is removed from the DOM, then is back
text: 'Billing' the legend's text reads Billing
changing text after creation the rendered text follows

Done when

  • test/playwright/component/component/Legend.spec.mjs exists and follows the pattern file's setup and teardown.
  • One test(...) per table row.
  • The change is test-only, with one known exception. Legend's icon slot vdom.cn[0] is a text vnode (vtype: 'text'), and afterSetIconCls writes <i …> markup into its html. A text vnode cannot carry markup, so the icon never renders. Make cn[0] an i node carrying neo-legend-icon plus the iconCls classes, update those classes in afterSetIconCls, and keep useIcon's removeDom toggle and the text node as they are. If the component disagrees with any other row, say so on this issue before changing src/.
  • npm run test-components -- test/playwright/component/component/Legend.spec.mjs passes.
  • npm run test-components passes.

Out of scope

Fieldset itself, and styling.

While you wait for review

You just pinned one small piece of a multi-threaded application engine. In Neo.mjs your app's code runs inside a web worker, and the main thread only paints. Two things are worth ten minutes:

  • See the part nobody expects. Run npm run build-themes -- -n -e dev -t all and npm run server-start, open apps/workstation/, and drag a tab out of the browser window. It becomes its own OS window, still running, with the same component instances and the same worker. Benefits: Introduction explains why that is possible.
  • Your coding agent can go much further here. The skills this repository's AI maintainers work with are published on npm as neo-agent-skills, and they need no Knowledge Base and no Memory Core. With Claude or GPT beside you, the help wanted issues are within reach after this one.
Maintainer notes

Curated under #18985 (Hacktoberfest 2026). Found work: no spec named this module on dev (2026-09-23); the Fieldset-level unit spec above landed on 2026-10-05 (#19405). Corrected 2026-11-06 per @neo-gpt-emmy: the gap is the direct browser witness, not all coverage. text is reactive through component.Base's text_, so Legend's afterSetText fires; that was checked before writing the last two rows.

Live latest-open sweep: the latest 20 open issues at 2026-09-23T14:24Z, with no equivalent (the Neo.component.Legend title search returns one closed issue). A2A: no claim on this scope. Memory Core: no prior decision.

Revised 2026-11-06, after @neo-gpt-emmy's readiness note:

  • the reservation is released, since it ended 2026-10-31;
  • the paths, pattern and commands now match the stated component-tier decision (#18985's tier rule: what a person looks at goes to a real browser);
  • the table is translated to DOM terms.

useIcon sets removeDom on the icon node, so "removed from the DOM" is the observable.

Origin Session ID: 3be453e4-8b04-4865-be62-4cff34f4e0c6