LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-maryam
createdAtNov 21, 2026, 2:47 AM
updatedAtNov 21, 2026, 2:44 PM
githubUrlhttps://github.com/neomjs/neo/issues/21708
authorneo-gemini-maryam
commentsCount0
parentIssue21704
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 21, 2026, 2:44 PM

Add ThemeSwitcher to Form, Component, Charts and StateProvider examples

Closed v14.0.0/archive-v14-0-0-chunk-6 enhancementdesignaiportal
neo-gemini-maryam
neo-gemini-maryam commented on Nov 21, 2026, 2:47 AM

Context

Rollout leaf 3 of #21704 (Engine 14 release blocker, @tobiu 2026-11-21): covers all remaining published non-ConfigurationViewport standalone examples across Forms, Components & Wrappers, Charts, StateProvider, and Platform/Workers.

The Problem

In apps/portal/resources/data/examples.json (plus in-flight #21515 examples/form/checkout), published standalone examples in these groups have no UI theme switcher, and several legacy neo-config.json files still list only a single theme (["neo-theme-dark"] or ["neo-theme-light"]) even though Neo ships both light and dark themes:

  • Forms: examples/form/validation (2 themes), plus examples/form/checkout (#21339 / #21515 once merged)
  • Components, Canvas & Wrappers: examples/component/sparkline (2), examples/component/wrapper/mermaid (2), examples/component/wrapper/openStreetMaps (2), examples/component/markdown, examples/component/toast, examples/component/graphScene, examples/charts, examples/component/{gallery,helix,coronaGallery,coronaHelix,multiWindowHelix,multiWindowCoronaGallery}, examples/videoMove
  • State, Data & Platform (published non-workbench entries): examples/stateProvider/{advanced,multiWindow,...} (check apps/portal/resources/data/examples.json for every published non-workbench entry in State & Data, Multi-Window, Workers & Platform, and Functional Components, upgrading single-theme neo-config.json files to ["neo-theme-neo-dark", "neo-theme-neo-light"] or ["neo-theme-dark", "neo-theme-light"] where supported!).

The Architectural Reality

  • Prerequisite #21705 provides Neo.button.ThemeSwitcher (ntype: 'theme-switcher').
  • Note that some entries under examples/component/* or examples/charts may extend ConfigurationViewport indirectly — verify each candidate's inheritance chain first and touch only non-ConfigurationViewport apps.
  • For canvas/3D/gallery demos whose custom CSS hardcodes dark-only obsidian backgrounds (e.g. helix / coronaGallery), verify whether switching to light theme renders legibly before adding a second theme to neo-config.json; if a 3D space canvas is intentionally dark-stage-only or themes its chrome cleanly, ensure zero unreadable white-on-white labels!
  • Design authority: #21704 binding inventory (@tobiu Engine 14 release gate).

The Fix

  1. Enumerate every published non-ConfigurationViewport standalone example in apps/portal/resources/data/examples.json outside the slices of #21706 and #21707 (plus examples/form/validation and any newly merged form/* demonstration).
  2. Ensure each target example declares >= 2 coherent themes in neo-config.json, honors ?theme= on boot in app.mjs, and mounts Neo.button.ThemeSwitcher in its header/toolbar chrome.
  3. Verify 1440 × 900 and 390 × 844 layout fit, legibility in every configured theme, and zero console/404 errors across touched examples.

Decision Record impact: none.

Acceptance Criteria

  • Every published non-ConfigurationViewport example in apps/portal/resources/data/examples.json across Forms & Fields, Charts, Canvas & Maps, Buttons, Menus & Toolbars, Lists & Galleries, Dialogs & Overlays, More components, State & Data, Multi-Window, Workers & Platform, and Functional Components (outside #21706 and #21707) exposes a working interactive theme switcher (ThemeSwitcher from #21705, or existing verified switcher in calendar/basic, code/livePreview, component/video, dialog).
  • Every touched example renders legibly in all of its configured themes at 1440 × 900 and 390 × 844 with zero console/404 errors.
  • Existing E2E specs for touched examples (ValidationExample.spec.mjs, sparkline/mermaid/portal specs, etc.) pass, plus an E2E check verifying live theme switching on representative examples in this slice.

Out of Scope

  • board/*, scheduler/*, gantt/*, timeline/* (#21706).
  • grid/*, table*, dashboard/*, desktop/*, menu/*, tab*, toolbar/*, list/*, layout/* (#21707).
  • ConfigurationViewport workbench examples.

Avoided Traps

  • Blindly adding neo-theme-neo-light to a dark-only WebGL/helix example without checking whether custom .css hardcodes white #fff text over a transparent background — verify computed contrast in both themes!

Related

unowned-rationale: Engine 14 rollout open for parallel maintainer pickup.

Live latest-open + closed sweep: checked latest 25 open (85 open total, red band — bounded leaf under #21704) + open and closed search (ThemeSwitcher, theme switcher examples) at 2026-11-21T01:46Z; no duplicate. A2A in-flight sweep, MC sweep & Own-assignment sweep: attested on #21704.

Origin Session ID: 59ca0d8c-dfdf-4d07-aefe-8ec5c658a398

Retrieval Hint: "ThemeSwitcher form validation sparkline mermaid charts stateProvider standalone examples"