LearnNewsExamplesServices
Frontmatter
id8117
titleEnhance theming engine to support additionalThemeFiles
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 15, 2025, 9:07 PM
updatedAtDec 15, 2025, 9:35 PM
githubUrlhttps://github.com/neomjs/neo/issues/8117
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 15, 2025, 9:35 PM

Enhance theming engine to support additionalThemeFiles

Closed v11.17.0 enhancementai
tobiu
tobiu commented on Dec 15, 2025, 9:07 PM

To handle scenarios where components need to load theme files from namespaces outside their prototype chain (e.g., loading a main app Viewport theme in a child app), we need to introduce a mechanism to specify additional theme files.

This task involves:

  1. Adding additionalThemeFiles (String[]) to Neo.component.Abstract config.
  2. Updating Neo.worker.App#insertThemeFiles to process these additional files, loading them without traversing their prototype chain.
tobiu added the enhancement label on Dec 15, 2025, 9:07 PM
tobiu added the ai label on Dec 15, 2025, 9:07 PM
tobiu assigned to @tobiu on Dec 15, 2025, 9:08 PM
tobiu referenced in commit a9d1c6e - "Enhance theming engine to support additionalThemeFiles #8117" on Dec 15, 2025, 9:32 PM
tobiu
tobiu Dec 15, 2025, 9:34 PM

Input from Gemini:

✦ I have implemented the requested changes.

Summary of Changes:

  1. src/component/Abstract.mjs:

    • Added additionalThemeFiles to the static config.
    • Updated the JSDoc to include an @example.
    • Ensured correct config ordering.
  2. src/worker/App.mjs:

    • Updated insertThemeFiles to handle additionalThemeFiles.
    • Implemented logic to pass null as the prototype when recursively loading additional theme files, ensuring the prototype chain is ignored for these specific files.
    • Added className to the themeFilesCache to support cases where the prototype might be null.
    • Utilized optional chaining (?.) for cleaner code.
  3. apps/agentos/childapps/strategy/view/Viewport.mjs:

    • Added additionalThemeFiles: ['AgentOS.view.Viewport'] to demonstrate usage and fix the reported theming issue.

The enhancement is now complete and verified.

tobiu closed this issue on Dec 15, 2025, 9:35 PM