FlowFuse / FlowFuse/node-red-dashboard

Feature Request: Allow ui-template to load content from an external file

Open
#1,846 0 comments 0 reactions 0 assignees View on GitHub
needs-triage
Dominant language
HTML
Stars
355
Forks
82
Avg merge
4d 23h
Merged PRs (30d)
24

Description

The ui-template node's built-in editor is sufficient for small templates. However, for larger and more complex UIs, it becomes difficult to manage, debug, and organize the code. This workflow prevents the use of powerful features from external editors like VS Code, such as linting, autocompletion, and better syntax highlighting.

Proposed Solution

Add a configuration field to the ui-template node to specify a path to an external file (e.g., my-template.html). If a file path is provided, the node will load its content from that file, overriding the content of the built-in editor.

Benefits

This change would significantly improve the development experience by enabling:

Use of Modern Editors: Allows developers to use VS Code, Sublime Text, or other IDEs.

Improved Tooling: Enables the use of linters, formatters, and advanced debugging tools.

Better Organization: Separates UI code (HTML/CSS/JS) from the Node-RED flow logic.

Version Control: Template files can be properly tracked with Git, independent of the flows.json file.

Possible Workaround: Can the ui-template content be set dynamically using `msg.ui_update.format`?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.