diff --git a/CHANGELOG.md b/CHANGELOG.md index 398879e1..7e917257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,25 +6,6 @@ typora-root-url: docs/images Please see the documentation for archived changelogs - a new archive is produced for each major version. Check the [roadmap](./docs/roadmap.md) for future developments. -## To do/In-progress - -* Outdated examples - some of the included example flows such as the "remote-commands" example are now out of date. What is there will still work but they are no longer comprehensive. Will try to catch them up as soon as I can. -* Add uib.var function as a test of using a proxy to manage vars and work with the uib-var component. - -### TO FIX - -* Loading template - if it fails due to a missing dependency, the template isn't loaded but the Template shows the new one. Need to revert the name if loading fails. -* uibRoot package.json - add check if dependencies blank but `node_modules` is not empty, if so, repopulate? Need to decide when to check - on commit at least. - -* Templates - add eslint dev dependencies to package.json - * .eslintrc.js: Configuration for rule "sonarjs/no-duplicate-string" is invalid: Value 6 should be object. - -* uib-element/client - allow loading of data to the ROOT to allow for full HTML replacement - -* Dev Docs - * http://127.0.0.1:1880/red/uibuilder/admin/api-test?cmd=checkfolder - is called each loaded instance on load of editor - - ------------ ## [Unreleased](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.7.0...main) diff --git a/README.md b/README.md index 9b0bfbba..c655fb88 100644 --- a/README.md +++ b/README.md @@ -131,31 +131,33 @@ The purpose of UIBUILDER is to: The core features of UIBUILDER: -* Provides nodes to enable zero-code translation of input data to usable and accessible web elements. -* Provides capability for low-code, configuration-driven (data-driven) UI's. Creating a framework for describing a UI and translating to actual code without having to write code. -* Provides a 2-way communications channel between the Node-RED server (back-end) and front-end UI. -* Provides a Node-RED node to act as the focus for communications with other nodes for additional ease of use. -* Provides a front-end library to: do the complex parts of the communications in the client browser; make manipulation of the UI easier and more consistent; make it easy to get data back to Node-RED as needed (both automatically and manually). -* Provides easy to use templates and examples for front-end code to enable people to get a quick start on creating web apps. -* Provides management and serving of npm packages that provide front-end libraries consumable easily by front-end code. -* Allows editing of front-end code from the Node-RED Editor (designed for small changes, use web development tools generally). -* Enables the use of external authentication and authorisation methods and services to control multi-user access to web apps. -* Provides various server middleware and API options for additional custom capabilities. -* Allows as many `uibuilder` node instances as you like. Each instance allows the creation of many web pages and sub-folders for easy management. +* As far as possible, uses only vanilla, native HTML, CSS and JavaScript. Other than the Socket.IO client for communications (which is baked into the front-end library), no other front-end libraries are needed. UIBUILDER stays as close as possible to native HTML to avoid future compatibility issues. However, it does aim to make interaction with native HTML easier. +* Nodes to enable zero-code translation of input data to usable and accessible web elements. +* Capability for low-code, configuration-driven (data-driven) UI's. Creating a framework for describing a UI and translating to actual code without having to write code. +* 2-way communications channel between the Node-RED server (back-end) and front-end UI. +* A Node-RED node to act as the focus for communications with other nodes for additional ease of use. +* Front-end library to: do the complex parts of the communications in the client browser; make manipulation of the UI easier and more consistent; make it easy to get data back to Node-RED as needed (both automatically and manually). +* Easy to use templates and examples for front-end code to enable people to get a quick start on creating web apps. +* Management and serving of npm packages that provide front-end libraries consumable easily by front-end code. +* Editing of front-end code from the Node-RED Editor (designed for small changes, use web development tools generally). +* Various server middleware and API options for additional custom capabilities. +* A caching capability allowing newly joining clients to receive the latest data and configurations. Joining/leaving clients create notifications in Node-RED. +* A front-end lightweight router for creating Single-Page Apps. +* Have as many `uibuilder` node instances as you like. Each instance allows the creation of many web pages and sub-folders for easy management. * Each `uibuilder` node instance provides a private 2-way communications channel between the Node-RED server (back-end) and browser (front-end) UI code. * Supports the use of standard web development workflows. * Allows the creation of a dedicated web service to facilitate independent security. -* Provides a caching capability allowing newly joining clients to receive the latest data and configurations. Joining/leaving clients create notifications in Node-RED. -
No-code UI's -UIBUILDER is still growing towards offering more no-code capabilities like Node-RED's Dashboard extension does. However, it is starting to offer these features via the "new" client available since v5. V6.1 introduced the new `uib-element` and `uib-update` nodes that offer the first usable no-code features. +UIBUILDER continues to expand its no-code capabilities. THe `uib-element`, `uib-tag`, and `uib-update` nodes offer no-code methods for creating and updating data-driven web UI's. `uib-element` takes in simple data and outputs configuration data. This can then be sent to the front-end via the `uibuilder` node. Alternatively, it can be saved and the result used in an initial load. Several simple options such as tables and lists are available in UIBUILDER v6.1, additional elements and structures will be made available in future versions. The UIBUILDER front-end client takes the configuration information and dynamically builds HTML elements and inserts them to the web page (or removes/updates as needed). While this is not the most efficient processing approach (since updates are mostly replacing the whole element which could be quite large for things like big tables), it is very efficient from an authoring perspective. So the `uib-update` node provides a more targetted approach to updating and changing specific attributes and "slot" content for elements. +The `uib-tag` node then lets you create ANY single HTML element and so covers all the many things that `uib-element` might not (yet) cover. This even works with web components which are vanilla HTML/JavaScript native enhancements to HTML. + It is important to note that no front-end, 3rd-party frameworks such as VueJS or REACT are needed for this approach! Everything uses vanilla HTML, JavaScript and CSS under the skin and so is **compatible with current and future web standards**.
@@ -164,20 +166,27 @@ It is important to note that no front-end, 3rd-party frameworks such as VueJS or The data that `uib-element` outputs is a format that you can use in your own flows in Node-RED and even in front-end code if desired. It describes a set of HTML UI elements but does not need you to actually write HTML code. The configuration schema is very flexible and even allows you to load configuration data, HTML, scripts, and new ECMA Modules/Components from external files. The schema and the UI creator functions built into the front-end client are specifically designed to work with current and future HTML standards in order to avoid the kinds of issues commonly encountered when using 3rd-party front-end frameworks (e.g. major version changes forcing rewrites of all of your tooling). So ES Modules, ECMA Components, and future ECMA versions should all be supported. + +The `ui.js` library is now also available for anyone to use in their own projects and works fully stand-alone without UIBUILDER. It is also baked into the `uib-html` node which turns low-code configurations into HTML from within Node-RED.
Future direction -The general direction of UIBUILDER (or associated modules) is likely to include: +UIBUILDER will continue to be independent of front-end frameworks though it will also continue to be as compatible as possible so that any desired framework can be used with it. + +* It will continue to gain more zero-code pre-built elements. +* It will gain improved control over the instance root folder structure and the ability to execute `npm run` scripts defined in the `package.json`. +* More videos! + +### Longer term focus + +There remains a desire to build a page-builder feature so that people with no coding skills can build great data-driven web apps. + +* The documentation quality will continue to improve. +* The number of 3rd-party module dependencies will be reduced. Starting with the eventual removal of `fs-extra` in favour of the native promisified fs library. Followed most likely by `arun`. +* Once Node.js v18 or 20 is the base, the code is likely to be refactored into multiple sub-packages in a mono-repo. -* Provide more no-code and low-code UI creation and update capabilities. As of v6.1, these are now starting to be delivered, v6.2 will extend these. -* The ability to save updated HTML from the front-end via Node-RED so that UI building can be done once and loaded as efficient, static HTML. -* The ability to use the zero-code features to produce HTML for other tools to use. -* The ability within Node-RED to, for each `uibuilder` node, run npm scripts such as build processes and to manage instance-level npm packages. -* Be able to install/update/remove instance-level npm packages as can already be done for UIBUILDER-level packages. -* Provide a "development server" capability that auto-reloads connected clients when code changes are made. -* A UI designer allowing users without HTML/CSS/JS skills to create reasonable web apps without code.
Feature details and benefits @@ -201,18 +210,7 @@ The general direction of UIBUILDER (or associated modules) is likely to include: * Uses Node-RED's own ExpressJS webservers by default. Switch to a custom ExpressJS server if desired. When using a custom server, pages can also include EJB server-side templating. * Has middleware for ExpressJS (for web services) and Socket.IO (for communications, both at initial connection and per-message) so that you can add your own custom features including security. * Can create custom API's for each UIBUILDER instance. -
- -
Current limitations - -* You may need to write some of your own HTML. -* You have to know the front-end library locations for installed 3rd-party packages and edit your HTML accordingly. The `uibindex` admin API (accessible from any node's admin ui) shows you all of the root folders and what the package authors report as the main entry point for all active packages. There is now also a simplified information page for the currently viewed `uibuilder` node instance, this is access from a button in the configuration panel. - - Note that this is a limitation of `npm` and module authors, not of UIBUILDER. Unless module authors correctly identify the browser entrypoint for their libraries, UIBUILDER can only guess. - -* You cannot yet compile/compress your custom front-end code (HMTL, JS, SCSS, etc.) for efficiency. *This will be added soon.* - - This will use a local package.json file that contains a "build" script. If it exists, UIBUILDER will expose a build button that will run the script. +* Use the `ui.js` library in your own projects!
## Contributing @@ -250,6 +248,7 @@ You can also support the development of UIBUILDER by sponsoring the development. - [dczysz](https://github.com/dczysz) - Thanks for reporting [Issue #186](https://github.com/TotallyInformation/node-red-contrib-uibuilder/issues/186) and helping work through the complex async bug. - [Colin J (mudwalkercj)](https://github.com/mudwalkercj) - Thanks for helping with the documentation. - [Marcus Davies](https://discourse.nodered.org/u/marcus-j-davies) - Many thanks for the encouragement and for the 3d logo. +- [Fabio Marzocca (fmarzocca)](https://discourse.nodered.org/u/fmarzocca)) - Many thanks for help with the design and testing of the uibrouter front-end router library. Many other people have contributed ideas and suggestions, thanks to everyone who does, they are most welcome. diff --git a/docs/roadmap.md b/docs/roadmap.md index f505e3b2..359b8fc2 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -46,17 +46,17 @@ To see what is currently being developed, please look at the "Unreleased" sectio * Node Refactoring: - | Node | Mv src editor.js
to resources | jQ Tooltips | getSource | Notes | - | ----------- | :--------------------------------: | :---------: | :-------: | ----------------------------------- | - | uibuilder | | ✔️ | | | - | uib-cache | | | | | - | uib-element | | | ✔️ | | - | uib-html | | | | | - | uib-save | ✔️ | ✔️ | | | - | uib-sender | | | | | - | uib-tag | | ✔️ | ✔️ | | - | uib-update | | | | | - | uib-uplot | | | | check this for other needed updates | + | Node | Mv src editor.js
to resources | jQ Tooltips | jQ Tt class not id | getSource | Notes | + | ----------- | :--------------------------------: | :---------: | :-------: | :---------------------------------: | :---------------------------------: | + | uibuilder | | ✔️ | ✔️ | | | + | uib-cache | | | | | | + | uib-element | | | | ✔️ | | + | uib-html | | | | | | + | uib-save | ✔️ | ✔️ | | | | + | uib-sender | | | | | | + | uib-tag | | ✔️ | | ✔️ | | + | uib-update | | | | | | + | *uib-uplot* | | | | | check this for other needed updates | Vars moved to ti-common (replace): node.urlPrefix, node.nodeRoot, paletteCategory, typedInputWidth, localHost, packages, editorInstances[urlsByNodeId] @@ -65,7 +65,6 @@ To see what is currently being developed, please look at the "Unreleased" sectio * Allow control of browser html cache from Node-RED. Add an auto-restore on load option. (? Add send updates back to Node-RED option - control msg ?) -* Use alt logging for websocket disconnects, sleep, error, etc * Editor: Add panel of links to all instances of uibuilder. @@ -79,8 +78,11 @@ To see what is currently being developed, please look at the "Unreleased" sectio ### Updates to `uibuilder` node +* **FIX NEEDED** Loading template - if it fails due to a missing dependency, the template isn't loaded but the Template shows the new one. Need to revert the name if loading fails. + * Allow file uploads * Add instance title and description fields. Extend record of instances to include these and update the `apps` page. +* Use alt logging for websocket disconnects, sleep, error, etc * [**STARTED**] Move all filing system handling to a separate library module `libs/fs.js`. Should help work out how to support implementations with limited filing systems. * Move all uibRoot package.json handling to `libs/package-mgt.js` @@ -149,6 +151,9 @@ To see what is currently being developed, please look at the "Unreleased" sectio #### Templates +* Add eslint dev dependencies to package.json + * .eslintrc.js: Configuration for rule "sonarjs/no-duplicate-string" is invalid: Value 6 should be object. + * Add template description to display. * Add dependency version handling to templates (e.g. vue 2/3) * Allow templates to provide example flows via a `uibuilder` Node-RED library plugin - will library update though? @@ -248,10 +253,6 @@ To see what is currently being developed, please look at the "Unreleased" sectio * Add empty cache button. * Think about impact of a cache clear (affects all connected clients) -### Extensions to `uib-sender` node - -* CHANGE CONTEXT VAR HANDLING TO DEAL WITH ASYNC - ### Extensions to the `uib-element` node * Add width setting @@ -375,32 +376,36 @@ To see what is currently being developed, please look at the "Unreleased" sectio * Pill list, scrollable search - https://www.w3.org/WAI/ARIA/apg/patterns/grid/examples/layout-grids/ * ??? How to allow EXTERNAL element definitions ??? e.g. Someone else's contributed package. -### Extensions to the `uib-update` node +### Extensions to the `uib-html` node -* Add input to allow restriction by pageName/clientId/tabId. `_ui.pageName`, `_ui.clientId`, and/or `_ui.tabId` -* Add individual class handling to _ui processing. [ref](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList). -* Add props: `uibUpdated`, `uibUpdatedBy` -* Add status in Editor: # input msgs -* ?? Consider if worth adding a way to update a front-end javascript variable directly ?? -* New type option "Template" - Replaces the selected element with a template clone. Then applies attribs/slot if required. [Ref](https://developer.mozilla.org/en-US/docs/web/html/element/template) +* Add option to remove the page tags, leaving just the document body fragment. +* Add options for DOMpurify and Markdown-IT +* Consider adding an HTML editor for the template? + +### `uib-save` node + +* Allow msg overrides of input fields + +### `uib-sender` node +* CHANGE CONTEXT VAR HANDLING TO DEAL WITH ASYNC -### Extensions to the `uib-tag` node +### `uib-tag` node * Add input to allow restriction by pageName/clientId/tabId. `_ui.pageName`, `_ui.clientId`, and/or `_ui.tabId` * Add individual class handling to _ui processing. [ref](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList). -### Extensions to the `uib-html` node - -* Add option to remove the page tags, leaving just the document body fragment. -* Add options for DOMpurify and Markdown-IT -* Consider adding an HTML editor for the template? +### `uib-update` node -### Extensions to the `uib-save` node +* Add input to allow restriction by pageName/clientId/tabId. `_ui.pageName`, `_ui.clientId`, and/or `_ui.tabId` +* Add individual class handling to _ui processing. [ref](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList). +* Add props: `uibUpdated`, `uibUpdatedBy` +* Add status in Editor: # input msgs +* ?? Consider if worth adding a way to update a front-end javascript variable directly ?? +* New type option "Template" - Replaces the selected element with a template clone. Then applies attribs/slot if required. [Ref](https://developer.mozilla.org/en-US/docs/web/html/element/template) -* Allow msg overrides of input fields -### Extensions to client Library +### client Library * Add client time offset from server to standard client metadata. [ref](https://discourse.nodered.org/t/time-zone-in-a-z-in-node-red/82537/7?u=totallyinformation) * Restrict `onChange` to only watch watched variables? Optionally make the watched var managed automatically (checking to make sure it doesn't start with `_` or `#`) * [**STARTED**] Ability to visually show all uibuilder managed variables. @@ -491,7 +496,16 @@ To see what is currently being developed, please look at the "Unreleased" sectio * Check all auto-added elements for accessibility * Add count of current errors to title -### Improvements to `uib-brand.css` +### `ui.js` library + +* uib-element/client - allow loading of data to the ROOT to allow for full HTML replacement + +### `uib-var` web component + +* Allow no var attrib but instead allow ID to create a new managed variable +* Add uib.var function as a test of using a proxy to manage vars and work with the uib-var component. + +### `uib-brand.css` * Forms: * Allow for blank line spanning the form width. @@ -509,7 +523,14 @@ To see what is currently being developed, please look at the "Unreleased" sectio * bigger spaces between lines (1.5 spacing in a word processor for example) - already done in the base. * 1 idea per image -### Updates to Documentation (including videos) +### Server libraries + +#### `libs/package-mgt.js` + +* uibRoot package.json - add check if dependencies blank but `node_modules` is not empty, if so, repopulate? Need to decide when to check - on commit at least. + + +### Documentation (including videos) * New doc for using `ui.js` outside of uibuilder. * `README.md`: Add more links to the Features section so that each feature points to appropriate documentation. Add a landing-page link to "includes many helper features" to signpost to relavent detailed documentation.