You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+61-24
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,48 @@
1
1
---
2
2
typora-root-url: docs/images
3
3
created: 2017-04-18 16:53:00
4
-
updated: 2024-04-03 17:16:00
4
+
updated: 2024-06-04 20:42:08
5
5
---
6
6
7
7
# Changelog
8
8
9
9
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.
10
10
11
-
## To Do
11
+
## **NEW FEATURE** page metadata
12
+
13
+
Allows FE to get data about the current page. Mostly the file created and updated timestamps. But consider extending to allow other metadata to be defined - maybe via the instance package.json?
14
+
15
+
### `nodes/libs/fs.js`
16
+
17
+
*[x] Fn, `getFileMeta`. Returns at least created & updated timestamps and file size.
18
+
19
+
### `nodes/libs/socket.js`
20
+
21
+
*[x] Amend `listenFromClientCtrl`, listen for a control msg `get page meta`, calls `fs.getFileMeta`, sends the output to the FE using the same control msg. Does not output to uibuilder node port #2.
22
+
23
+
### FE library
24
+
25
+
*[x] Fn `getPageMeta` to call - sending a uibuilder control msg `get page meta`
26
+
*[x] Fn to listen for a `get page meta` control msg and updating the uibuilder `pageMeta` managed variable
27
+
*[ ] Consider adding a new web component, `<uib-meta type="created">` to display. `created`, `updated`, `crup` (both dates sensibly formatted)
28
+
29
+
## **NEW FEATURE** Create package.json template for Node-RED projects
An optional template package.json in `<uibRoot>/.config/projectPackage.json` where the `dependencies` are pre-requisite modules for new Node-RED projects.
34
+
35
+
Initial thinking is that there will be a new but optional file in the <uibRoot>/.config/ folder, called something like projectPackage.json. It would be, I think a sub-set of a standard package.json A full package.json on 2nd thoughts so that it would be easy to copy/paste your current <uibRoot>/package.json. That will let you include a default version, description, etc if you wish along-side the dependencies.
36
+
37
+
I will attempt to also trap a new project create to run the install if I can. Otherwise, it will display a notification for the user to run that manually. Not certain whether Node-RED will have to be restarted, I will try to avoid that but it might not be possible. Will have to test.
38
+
39
+
## In progress
12
40
13
41
*[ ][started] Change all calls to `$.get` into `$.ajax` and add beforeStart to add optional bearer token header
42
+
43
+
## To Do
44
+
45
+
14
46
*[ ] Add Docsify external libraries to `/docs/.config` to allow true offline use of docs. Add new gulp process to update them, possibly pack them all.
15
47
*[ ] Add instance descriptions to the index pages
16
48
* Update examples:
@@ -26,8 +58,8 @@ Please see the documentation for archived changelogs - a new archive is produced
26
58
*[ ] Document `.config/uibMiddleware.js`, also update `docs\how-to\server-side-views.md`.
27
59
*[ ] Document a dashboard-like grid layout.
28
60
*[ ] Document how to use `<instanceRoot>/routes/` properly. [Ref](https://totallyinformation.github.io/node-red-contrib-uibuilder/#/changelog?id=new-features)
61
+
*[ ] Document new `round` and `getPageMeta` functions in FE library
29
62
*[ ] Remove `writeJson` from package.mgt.js then remove `fs-extra` dependency
30
-
*[ ] Remove execa from gulpfile.js & remove from dev deps
31
63
*[ ] Add automatic `search` handler for all uibuilder endpoints - [Ref](https://developer.mozilla.org/en-US/docs/Web/API/Window/location#example_5_send_a_string_of_data_to_the_server_by_modifying_the_search_property)
32
64
*[ ] New Node Idea: `uib-meta` - links to a uibuilder node and returns the instance metadata including URL's and folder locations and other settings. (e.g. use with [node-red-cleanup-filesystem](https://discourse.nodered.org/t/announce-node-red-cleanup-filesystem-request-for-testing/88135))
33
65
*[ ] Move the loading of the Editor common CSS/JS to a plugin so they are only loaded once. Remove explicit links from node html files.
@@ -85,7 +117,7 @@ Please see the documentation for archived changelogs - a new archive is produced
85
117
86
118
### `<uib-var>` custom HTML component
87
119
88
-
*[ ] Amend to use same processors as the uib-attr process above
120
+
*[ ] Amend to use same processors as the uib-attr
89
121
90
122
### `uib-cache` node
91
123
@@ -123,18 +155,12 @@ Please see the documentation for archived changelogs - a new archive is produced
123
155
### `uibuilder` node
124
156
125
157
*[ ] ?? Filter `clientId` and `pageName` using socket.io rooms?
126
-
*[ ] On uibuilder Libraries tab:
127
-
*[ ] Process for updating libraries updates EVERYTHING (runs `npm install`) - need to update docs?
128
-
*[ ] Major version updates are not listed - because of package.json version spec - need to update docs?
158
+
*[ ] On uibuilder Libraries tab: Major version updates are not listed - because of package.json version spec - need to update docs?
129
159
*[ ] uibuilder.packages after an update does not contain the `outdated` prop for each package because the server only does a quick update and so does not call `npmOutdated` (from packge-mgt.js) on each package because it is async and quite slow. This may mean that update flags are not updated until the Editor is next reloaded which isn't ideal. Probably need to fix at some point.
130
160
131
161
132
162
## Issues
133
163
134
-
*[ ] uibuilder library update
135
-
*[x] Runs `npm install`. Run `npm update` with package name
136
-
*[x] Running 1 update resets displays for all updatable packages
137
-
138
164
*[ ] uib-element editor panel
139
165
*[ ] Heading 2nd drop-down needs to be narrower to account for 1st drop-down
140
166
*[ ] uibuilder editor panel
@@ -183,11 +209,11 @@ Note that potentially breaking changes are only introduced in major version rele
183
209
184
210
Most of these changes will *not* impact most people but you should check through them just in case.
185
211
186
-
* If using uibuilder's custom ExpressJS server feature, **URL's are now case sensitive**
212
+
* If using UIBUILDER's custom ExpressJS server feature (instead of the Node-RED built-in one), **URL's are now case sensitive**
187
213
188
214
This brings them into line not only with W3C guidance but also with the Socket.IO library. It can be turned off in `settings.js` using property `uibuilder.serverOptions['case sensitive routing']` set to false.
189
215
190
-
Note that when using Node-RED's internal ExpressJS web engine, URLs are still case-insensitive because that's how Node-RED has been configured.
216
+
Note that when using Node-RED's internal ExpressJS web engine (the default), URLs are still case-insensitive because that's how core Node-RED has been configured.
191
217
192
218
***Minimum node.js now v18** - in line with the release of Node-RED v4, the minimum node.js version has moved from v14 to v18.
193
219
@@ -233,17 +259,25 @@ Most of these changes will *not* impact most people but you should check through
233
259
234
260
### 📌 Highlights
235
261
262
+
* Some tweaks to the documentation should make it a little easier to get started with.
263
+
236
264
* You can now add a `uib-topic="mytopic"` attribute to _ANY_ HTML element. Doing so makes that element responsive to messages from Node-RED.
237
265
238
266
For a message with the correct `msg.topic`. The `msg.payload` will replace the inner HTML of the element. `msg.attributes` will update corresponding element attributes. Making this now one of the easiest ways to define dynamic updates in your UI.
239
267
268
+
* The new node `uib-file-list` will produce a list of files from a uibuilder instance. It automatically adjusts to the currently served sub-folder and allows filtering. Use this for producing indexes and menus.
269
+
270
+
* The new built in `<uib-meta>` web component can be used in your HTML to display facts about the current page such as its file size, when it was created and when it was last updated.
271
+
240
272
* Lots of extensions and improvements to the `uibrouter` front-end routing library in this release:
241
273
242
274
* You can now define a set of external html files (that can include scripts and css just like routes) that are immediately loaded to the page. These can be defined in the initial router config when they will be loaded immediately (before routes) or can be manually loaded later. Use these for things like menu's or other fixed parts of the UI.
243
275
244
276
* You can now define route content as Markdown instead of HTML. This makes Notion/Obsidian-like applications feasible using UIBUILDER.
245
277
246
278
* You can now use Markdown-IT plugins to enhance your Markdown content.
279
+
280
+
* You can start with an empty routing list to allow dynamic creation of routes later on.
247
281
248
282
* Markdown improvements.
249
283
@@ -255,16 +289,20 @@ Most of these changes will *not* impact most people but you should check through
255
289
256
290
* Wherever you can use no-/low-code features that accept HTML, you can now include `<script>` tags that will be executed on load.
257
291
258
-
* A new node is available. `uib-file-list` will produce a list of files from a uibuilder instance. It automatically adjusts to the currently served sub-folder and allows filtering. Use this for producing indexes and menus.
259
-
260
292
* Handling of forms and inputs continue to improve.
261
293
262
294
* Programmatic changes to input values or checked properties now trigger both the `input` and `changed` events - something that HTML normally doesn't do but can be important for data-driven web apps. For example, if using an `<output>` tag to show a combined or calculated input, changes via Node-RED will still update the values.
263
295
* When using the `eventSend(event)` function on inputs whether inside or outside of a form, the returned values have been improved, especially for checkboxes and radio buttons.
264
296
265
297
* Security of the UIBUILDER repository on GitHub has been improved.
266
298
267
-
* On the `uibuilder` node's "Core" tab, the info buttons bar has changed slightly. The "Docs" button has gone (it is still on the top of panel bar anyway) and been replaced by a new "Apps" button which shows a page *listing ALL uibuilder node instances along with their descriptions where provided*.
299
+
* On the `uibuilder` node's "Core" tab, the info buttons bar has changed slightly.
300
+
301
+
The "Docs" button has gone (it is still on the top of panel bar anyway) and been replaced by a new "Apps" button which shows a page *listing ALL uibuilder node instances along with their descriptions where provided*.
302
+
303
+
Most of the UIBUILDER nodes have be given a bit of a refresh of their Editor configuration panels. This work is ongoing but should give a more consistent look and feel and make the panels rather more responsive. The layouts are starting to use more modern CSS features. The work isn't complete yet so there are still a few inconsistencies - for example, when you make the panel wider - but we are getting there.
304
+
305
+
* For front-end developers, there are many new functions added to the `uibuilder` front-end library. Some are standard utility functions such as fast but accurate number rounding or conversion of primitives into objects. Others simplify the use of the DOM.
268
306
269
307
### General Changes
270
308
@@ -335,17 +373,16 @@ The `URL Output?` setting will change the output from a folder/file list to a re
335
373
>
336
374
> Since they are attached to the HTML `Element` class, they cannot be used in `uib-html`.
337
375
338
-
*`hasUibRouter()` Returns true if a uibrouter instance is loaded, otherwise returns false. Note that, because the router will be loaded in a page script, it is not available until AFTER the uibuilder library has loaded and socket.io initialised.
339
-
340
-
*`returnElementId(el)` Returns the element's existing ID. Or, if not present, attempts to create a page unique id from the name attribute or the attribute type. The last 2 will use a page-unique number to enforce uniqueness.
341
-
*`getElementClasses(el)` Checks for CSS Classes and return as array if found or undefined if not.
376
+
*`arrayIntersect(a1, a2)` Returns a new array (which could be empty) of the intersection of the 2 input arrays.
342
377
*`getElementAttributes(el)` Returns an object containing attribute-name/value keypairs (or an empty object).
378
+
*`getElementClasses(el)` Checks for CSS Classes and return as array if found or undefined if not.
343
379
*`getElementCustomProps(el)` Returns an object containing custom element properties/values (or an empty object). Custom element properties are those set using code that are not standard properties.
344
380
*`getFormElementDetails(el)` Returns an object containing the key properties of a form element such as `value` and `checked`.
345
-
346
-
*`arrayIntersect(a1, a2)` Returns a new array (which could be empty) of the intersection of the 2 input arrays.
347
-
*`makeMeAnObject(thing, property)` in your own code. It returns a valid JavaScript object if given a null or string as an input. `property` defaults to "payload" so that `uibuilder.makeMeAnObject("mystring")` will output `{payload: "mystring"}`.
348
-
381
+
*`getPageMeta()` Asks the server for the created/update timestamps and size (in bytes) of the current page. The result from the server is set into the managed `pageMeta` variable. Also used by the new `<uib-meta>` web component.
382
+
*`hasUibRouter()` Returns true if a uibrouter instance is loaded, otherwise returns false. Note that, because the router will be loaded in a page script, it is not available until AFTER the uibuilder library has loaded and socket.io initialised.
383
+
*`makeMeAnObject(thing, property)` returns a valid JavaScript object if given a null or string as an input. `property` defaults to "payload" so that `uibuilder.makeMeAnObject("mystring")` will output `{payload: "mystring"}`.
384
+
*`returnElementId(el)` Returns the element's existing ID. Or, if not present, attempts to create a page unique id from the name attribute or the attribute type. The last 2 will use a page-unique number to enforce uniqueness.
385
+
*`round(num, dp)` rounds a number to a set number of decimal places using a fast but accurate "commercial" format.
349
386
*`urlJoin()` returns a string that joins all of the arguments with single `/` characters. The result will start with a leading `/` and end without one. If the arguments contain leading/trailing slashes, these are removed.
350
387
351
388
* Improved handling of stand-alone input changes in the `eventSend` function. Previously, these may not have sent their new values on change events.
0 commit comments