Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
TotallyInformation committed Apr 11, 2023
1 parent 7d44f8b commit 1a51c73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ Please see the documentation for archived changelogs - a new archive is produced

Check the [roadmap](./docs/roadmap.md) for future developments.

### General

* Allow file uploads

### Front-end library

* Use esbuild to create IIFE version of `ui.js`.
* Allow file uploads

### `uibuilder` node

* Add `vscode:` link to instance root folder if the admin i/f is running on localhost
* Editor panel: Remove the "Allow passing to the front-end" from Advanced tab - no longer needed. Use `msg._ui` features with the updated client instead.
* Allow file uploads

### `uib-element` node

Expand Down Expand Up @@ -90,9 +88,16 @@ Check the [roadmap](./docs/roadmap.md) for future developments.

* Added links to open the instance's front-end code folder in a new VSCode window. They only appear if running Node-RED on localhost. A button is added to the top of the config panel and to the Core tab where the folder name is shown.

* Added `$$(cssSelector)` function. This matches the function of the same name available in the Chromium DevTools console. It returns ALL elements that match the selector (unlike `$(cssSelector)` which only returns the first). In addition, whereas `$(cssSelector)` returns the DOM element (like jQuery), `$$(cssSelector)` returns an array of the properties of each element.

### `uib-element` node

* **Bug-fix** - msg.payload is normally an instance of Object if created as an array or object via JSON/JSONata inputs from inject and change nodes. However, it turns out that is NOT the case if created in a function node. Corrected to a more robust detection method. Thanks to Rami Yeger for spotting the bug and reporting via YouTube comments.

### Documentation

* Added new how-to explaining CSS Selectors and giving common examples.
* Updated for the new `$$(cssSelector)` function.


## [v6.3.1](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.3.1...v6.3.0)
Expand Down
14 changes: 6 additions & 8 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ To see what is currently being developed, please look at the "Unreleased" sectio
* How best to allow other nodes to provide zero-code nodes - that allow auto feedback from the front-end? e.g. something like the [node-red-contrib-ui-time-scheduler](https://github.com/fellinga/node-red-contrib-ui-time-scheduler) node.
* How to provide a better log output? With a simple way to link to Node-RED log output (filtered) as well as a dedicated output node. That output's to a web page with highlighting and possibly page back/fwd through history.

## vNext - the next release after current (v6.4)
## Next - these are things that need to be done

* **NEW NODE** - `uib-html` - Hydrates `msg._ui` configurations

Expand Down Expand Up @@ -98,8 +98,6 @@ To see what is currently being developed, please look at the "Unreleased" sectio
* Node-specific docs.
* Reorg docs to make more sense to new starters & make more logical.

## Next - these are things that need to be done

* Change fixed text to use `RED._` for l8n. See: https://discourse.nodered.org/t/flexdash-alpha-release-a-dashboard-for-node-red/65861/48. [ref](https://discourse.nodered.org/t/question-on-internationalisation-can-i-have-1-json-file-for-several-nodes/76300/2)

* 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 ?)
Expand Down Expand Up @@ -231,21 +229,21 @@ To see what is currently being developed, please look at the "Unreleased" sectio

### Extensions to client Library
* *New Functions* (all to be callable from Node-RED):
* [ ] `elementExists(selector)`, `elementIsVisible(selector)` - methods for checking if an element exists on the page and whether it is visible to the user.
* [ ] `uibuilder.navigate(locationUrl)` - change page. Ensure it works with SPA routers and with anchor links.
* [ ] `uiUpdate(cssSelector, data)` - mirroring the `uib-update` node's features & allowing easy DOM updates from front-end code as well.
* [ ] `elementExists(selector)`, `elementIsVisible(selector)` - methods for checking if an element exists on the page and whether it is visible to the user.
* [ ] `uibuilder.cacheSend()` and `uibuilder.cacheClear()` - send ctrl msgs back to node-red - reinstate in uib-cache fn now we've removed extra ctrl send.
* [ ] `uibuilder.showLog()` - Add a visible panel on-page to show console.log output. Redirects (or maybe copies) uibuilder.log output - possibly also console.log. Will need amendments to the uibuilder.log function to give options for output to this and/or back to Node-RED.
* [ ] `uibuilder.convertToUI(cssSelector)` - convert part/all of the DOM to `_ui` json structure. [ref](https://stackoverflow.com/questions/2303713/how-to-serialize-dom-node-to-json-even-if-there-are-circular-references)
* [ ] **HARD** `uibuilder.convertToUI(cssSelector)` - convert part/all of the DOM to `_ui` json structure. [ref](https://stackoverflow.com/questions/2303713/how-to-serialize-dom-node-to-json-even-if-there-are-circular-references)
* [ ] ~~`uiUpdate(cssSelector, data)` - mirroring the `uib-update` node's features & allowing easy DOM updates from front-end code as well.~~ Not really needed since if you are already writing front-end code, you can simply use the `uibuilder.ui` function directly.

* Control from Node-RED. Functions to implement:
* [ ] watchDom(startStop), uiWatch(cssSelector)
* [ ] setPing
* [ ] `elementExists(selector)`, `elementIsVisible(selector)`
* [ ] `navigate(url)`
* [ ] `loadui()`
* [ ] `clearHtmlCache()`, `saveHtmlCache()`, `restoreHtmlFromCache()`
* [ ] getStore, setStore, removeStore - control browser local storage
* [ ] watchDom(startStop), uiWatch(cssSelector)
* [ ] setPing
* [ ] `convertToUI(cssSelector)`

* **Possibly breaking change**: Stop msg._ui and (maybe) msg._uib messages from triggering `onChange` and `onTopic`.
Expand Down

0 comments on commit 1a51c73

Please sign in to comment.