Skip to content

Commit 7edd782

Browse files
Added new route ./docs/resources mapped to the /front-end/ folder to allow use of uib FE images, brand, router, etc in the docs.
1 parent 1ab8328 commit 7edd782

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1791
-620
lines changed

.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.github/
2+
.vscode/
3+
node_modules/
4+
tmp/
5+
tests/
6+
archive/

CHANGELOG.md

+39-23
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Please see the documentation for archived changelogs - a new archive is produced
1010

1111
## To Do
1212

13+
* [ ] [started] Change all calls to `$.get` into `$.ajax` and add beforeStart to add optional bearer token header
14+
* [ ] 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.
1315
* [ ] Add instance descriptions to the index pages
1416
* Update examples:
1517
* [ ] [started] Update text update example to include new `uib-topic` html attributes
@@ -26,6 +28,9 @@ Please see the documentation for archived changelogs - a new archive is produced
2628
* [ ] Document how to use `<instanceRoot>/routes/` properly. [Ref](https://totallyinformation.github.io/node-red-contrib-uibuilder/#/changelog?id=new-features)
2729
* [ ] Remove `writeJson` from package.mgt.js then remove `fs-extra` dependency
2830
* [ ] Remove execa from gulpfile.js & remove from dev deps
31+
* [ ] 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+
* [ ] 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+
* [ ] 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.
2934

3035
### `uibrouter` FE library
3136

@@ -71,9 +76,9 @@ Please see the documentation for archived changelogs - a new archive is produced
7176

7277
### FE `ui` library
7378

74-
* [ ] Allow Markdown-IT plugins ([list](https://www.npmjs.com/search?q=keywords:markdown-it-plugin)) & additional config. [ref](https://github.com/markdown-it/markdown-it?tab=readme-ov-file#plugins-load)
79+
* [x] Allow Markdown-IT plugins ([list](https://www.npmjs.com/search?q=keywords:markdown-it-plugin)) & additional config. [ref](https://github.com/markdown-it/markdown-it?tab=readme-ov-file#plugins-load)
7580
* [x] ui.js
76-
* [ ] uib-router.js
81+
* [x] uib-router.js
7782
* [ ] document `ui-md-plugins` managed uib variable
7883
* [ ] document `ui-md-plugins` ui variable
7984
* [ ] document `ui-md-plugins` router variable
@@ -118,33 +123,33 @@ Please see the documentation for archived changelogs - a new archive is produced
118123
### `uibuilder` node
119124

120125
* [ ] ?? 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?
129+
* [ ] 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+
121131

122132
## Issues
123133

124-
* [ ] Process for showing outdated libraries ~~isn't working~~ is working sometimes.
125-
* [ ] `uibuilder` file Editor - sometimes on file change, we get:
126-
Uncaught Error: Illegal value for lineNumber
127-
Error: Illegal value for lineNumber
128-
at e.getLineMaxColumn (editor.js:5:1743420)
129-
at zo.getViewLineMaxColumn (editor.js:5:1161732)
130-
at Go.getViewLineMaxColumn (editor.js:5:1174931)
131-
at es.getLineMaxColumn (editor.js:5:1196932)
132-
at new yn (editor.js:5:1096427)
133-
at In._actualRender (editor.js:5:1110215)
134-
at editor.js:5:1109784
135-
at editor.js:5:1109747
136-
at In._renderNow (editor.js:5:1109773)
137-
at In._flushAccumulatedAndRenderNow (editor.js:5:1107153)
138-
at In._onRenderScheduled (editor.js:5:1109678)
139-
at y.execute (editor.js:2:180485)
140-
at o (editor.js:2:181412)
141-
at editor.js:5:161683
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+
* [ ] uib-element editor panel
139+
* [ ] Heading 2nd drop-down needs to be narrower to account for 1st drop-down
140+
* [ ] uibuilder editor panel
141+
* [ ] info panel fixed width, needs to be expandable
142+
* [ ] Text in fieldset is fixed width
143+
* [ ] uib-cache editor panel
144+
* [ ] Some inputs width not consistent
145+
* [ ] uib-save & uib-file-list editor panels
146+
* [ ] URL drop-down width not consistent (check uib-update as this is correct)
142147

143148
### "Outdated" dependencies
144149

145150
As of v7, all outdated dependencies have been removed or limited to uibuilder development only, not production use.
146151

147-
The following are only used for developing UIBUILDER:
152+
The following are only used for _**developing**_ UIBUILDER:
148153

149154
* `execa` - restricted to v5. Author sindresorhus decided that everyone HAS to use ESM even though his packages are widely used and he must know that it is often impossible to move from CommonJS without a complete rewrite. Node-RED is so complex, when would that be possible? Very annoying.
150155
* `@types/node` - restricted to v18 to match Node-RED's current baseline.
@@ -237,10 +242,12 @@ Most of these changes will *not* impact most people but you should check through
237242
* 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.
238243

239244
* You can now define route content as Markdown instead of HTML. This makes Notion/Obsidian-like applications feasible using UIBUILDER.
245+
246+
* You can now use Markdown-IT plugins to enhance your Markdown content.
240247

241248
* Markdown improvements.
242249

243-
Both the main uibuilder node (via the `ui.js` library) and the `uibrouter` library both accept markdown content (via the external Markdown-IT library) and now they both support Markdown-IT plugins so that you can add features such as checkbox lists, GitHub style callouts, Mermaid diagrams and much more.
250+
Both the main uibuilder node (via the `ui.js` library) and the `uibrouter` library both accept markdown content (via the external Markdown-IT library) and now they both support *Markdown-IT plugins* so that you can add features such as checkbox lists, GitHub style callouts, Mermaid diagrams and much more.
244251

245252
There is also a new documentation page dedicated to using Markdown.
246253

@@ -272,9 +279,13 @@ Most of these changes will *not* impact most people but you should check through
272279
* The `nanoid` package is no longer a dependency. UIBUILDER now has its own UUID generator function. The nanoid package stopped being useful since it moved to only an ESM release.
273280
* The `jsdom` package now tracks the current release again thanks to UIBUILDER moving to a node.js baseline in line with Node-RED v4 (Node.js v18)
274281
* External module `execa` no longer a dependency.
282+
* On the Detailed Information Page (uibindex) "User-Facing Routes" is changed to "Client-Facing Routes" to make it clearer.
275283

276284
* Documentation
277285
* New How-To: Creating a well-structured HTML page
286+
* Mustache plugin removed from Docksify load. Not used and not required since Docsify supports easy loading of custom Vue components which can do the same work.
287+
* Additional uibuilder web path added `./docs/resources` which is mapped to the `/front-end` package folder. Allowing the docs to use the images, router, branding, etc in the future.
288+
* The Docsify JS and CSS now split from the main html file for ease of management.
278289

279290
* URL's are now _case sensitive_ when using the custom ExpressJS server feature.
280291

@@ -284,6 +295,9 @@ Most of these changes will *not* impact most people but you should check through
284295

285296
[Ref 1](https://stackoverflow.com/questions/21216523/nodejs-express-case-sensitive-urls), [Ref 2](http://expressjs.com/en/api.html). [Ref 3](https://discourse.nodered.org/t/uibuilder-and-url-case-sensitivity/81019/6).
286297

298+
* Node-RED's admin optional auth token is now added to all admin API calls. [Ref](https://github.com/victronenergy/node-red-contrib-victron/blob/ac5e383b727a13d7f613cb02c183f5b205408c1b/src/nodes/victron-nodes.html#L233-L238). This should ensure that, if you are using tokens in your Node-RED authentication, all the UIBUILDER admin API calls should work consistently.
299+
300+
287301
### NEW node - `uib-file-list`
288302

289303
Returns a list of files with their folders from the active source folder of the chosen uibuilder instance. The searches are constrained to that folder or below and may not escape for security purposes. In addition, any file or folder name starting with a `.` dot will not be searched. Any files or folders that are links, will be followed.
@@ -378,7 +392,7 @@ The `URL Output?` setting will change the output from a folder/file list to a re
378392
* Now enforces only 1 instance of a router on page (would need to change how uib vars work otherwise).
379393
* Internally, a tracking flag is added to inbound messages from Node-RED to indicate if/where they have been processed by the library. This helps to avoid double-processing. This is important now that there are ever more auto-process features available.
380394

381-
### `uibuilderfe` old front-end library
395+
### **REMOVED** `uibuilderfe` old front-end library
382396

383397
**REMOVED** - this was deprecated in UIBUILDER v5, it has now been removed completely. Please use `uibuilder.iife.min.js` (for simple `<script>` loading) or `uibuilder.esm.min.js` for ESM module imports.
384398

@@ -437,6 +451,8 @@ The `old-blank-client` template and all associated documentation has also been r
437451

438452
* The help panel has been updated to better reflect the current configurations. Also some additional links added.
439453

454+
* The list of installed libraries now has more reliable behaviour for updates. If there are >1 updates waiting, updating 1 library no longer looses the other indicators.
455+
440456
### `uib-list` node
441457

442458
**REMOVED** - this node was deprecated in UIBUILDER v6. It has now been removed. Use the `uib-element` node with one of the list element types.

docs/.config/docs-version.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> [!NOTE]
2+
> These are the docs for UIBUILDER v7. If you need the v6 or earlier docs, the easiest way is to set up a test instance of Node-RED and manually install the appropriate UIBUILDER version: `npm install node-red-contrib-uibuilder@5` then use the documentation links from a `uibuilder` node.

docs/.config/docs.css

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Load defaults from `<userDir>/node_modules/node-red-contrib-uibuilder/front-end/uib-brand.min.css`
2+
* This version auto-adjusts for light/dark browser settings but might not be as complete.
3+
*/
4+
@import url("../resources/uib-brand.min.css");

docs/.config/docs.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import "../resources/utils/uibrouter.esm.min.js"
2+
3+
'use strict'
4+
5+
const routerConfig = {
6+
hide: true,
7+
routes: [
8+
{
9+
id: 'home',
10+
src: './readme.md',
11+
type: 'url',
12+
format: 'markdown'
13+
}
14+
],
15+
otherLoad: [
16+
{
17+
id: 'menu-content',
18+
src: './.config/sidebar.md',
19+
format: 'markdown'
20+
}
21+
],
22+
}
23+
24+
const router = new UibRouter(routerConfig)

0 commit comments

Comments
 (0)