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 1a51c73 commit 5ec01f9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
31 changes: 6 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,20 @@ Please see the documentation for archived changelogs - a new archive is produced

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

### Front-end library

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

### `uibuilder` node

* 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

* Add input to allow restriction by pageName/clientId/tabId

### `uib-update` node

* Add input to allow restriction by pageName/clientId/tabId

### Documentation

* New doc for using `ui.js` outside of uibuilder.

----

## [Unreleased](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.3.1...main)
## [Unreleased](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.4.0...main)

<!-- Nothing currently. -->
Nothing currently.

## [v6.4.0](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v6.4.0...v6.3.1)

### Front-end client library

* A received msg containing a `msg._ui` property no longer triggers `onChange` or `onTopic` event handlers.

* `_ui` handling moved to a separate utility library `ui.js` to allow use elsewhere. Currently configured as a CommonJS style module which allows use in front-end code via esbuild or in Node-RED (though another library will be needed to provide direct DOM support).

* `ui.js`
* New class library containing the uibuilder _ui processing so that it can be used in the future for processing in Node-RED as well.

Expand All @@ -55,7 +36,7 @@ Check the [roadmap](./docs/roadmap.md) for future developments.
Both of those input functions are available in the uibuilder client library. If using separately, those functions will need to be reproduced.

As the library uses `module.exports`, it must currently be built into a working script using `esbuild` or it can be imported into another script that is run through esbuild.

* Additional safety checks added to ensure browser native API's present (`document`, `fetch`, etc.).
* Class constructor takes a `log` function as an argument, this is required. The log function is assumed to be the same as the one in the main library (which requires calling as `log(...)()` to ensure that the correct calling line is reported.)
* Fixed handling of `xlink` SVG attributes. Allows the use of `<use>` and other tags with `xlink:href` attributes.
Expand Down
15 changes: 13 additions & 2 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ To see what is currently being developed, please look at the "Unreleased" sectio
* CHANGE CONTEXT VAR HANDLING TO DEAL WITH ASYNC

### Extensions to the `uib-element` node
* Add input to allow restriction by pageName/clientId/tabId

* Add individual class handling to _ui processing. [ref](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList).
* New type "Clone" - use a template or other element already in the HTML and copy it to a new position in the DOM. Applies attribs/slot changes if specified. Templates themselves are invisible.
* "Text Box" type - allow msg.payload to be an array with each entry being a new para.
Expand Down Expand Up @@ -212,6 +214,8 @@ To see what is currently being developed, please look at the "Unreleased" sectio
* ??? How to allow EXTERNAL element definitions ??? e.g. Someone else's contributed package.

### Extensions to the `uib-update` node
* Add input to allow restriction by pageName/clientId/tabId

* Add props: `uibUpdated`, `uibUpdatedBy`
* ?? 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)
Expand Down Expand Up @@ -246,9 +250,11 @@ To see what is currently being developed, please look at the "Unreleased" sectio
* [ ] getStore, setStore, removeStore - control browser local storage
* [ ] `convertToUI(cssSelector)`

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

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

* Add individual class handling to _ui processing. [ref](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList).

* Add `window.uib` as a synonym of `window.uibuilder`.
* Add a `jsonImport` option to the _ui `load` method. The `jsonImport` property being an object where the keys are variable names to load to and the values are the URL's to load the JSON from.

Expand Down Expand Up @@ -305,6 +311,9 @@ To see what is currently being developed, please look at the "Unreleased" sectio

### Updates to `uibuilder` node

* 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

* Move all filing system handling to a separate library module. Should help work out how to support implementations with limited filing systems.
* Add option to process a crafted msg from the FE that returns a JSON list of all files/folders (optionally recursive) - needs change to FE library & editor.
* In Editor, set the top-level permitted folder - relative to the `Serve` folder (e.g. If serving `<instanceRoot>/src`, that would be the default root but allow a sub-folder to be set, e.g. `content` so that only `<instanceRoot>/src/content` and below could be queried). This is to facilitate the creation of content management systems.
Expand Down Expand Up @@ -396,6 +405,8 @@ To see what is currently being developed, please look at the "Unreleased" sectio


### Updates to Documentation (including videos)
* New doc for using `ui.js` outside of uibuilder.

* Search for `*(This document is a work-in-progress, it is not complete)*` and update documents.
* Split the new client library, move _ui features to separate page.
* Add message interaction diagram to "pre-defined-msgs.md"
Expand Down
1 change: 1 addition & 0 deletions tests/myesm.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const fred = 42
2 changes: 2 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const fred = require('./myesm.mjs')
console.log({fred})

0 comments on commit 5ec01f9

Please sign in to comment.