We have just released the first public beta release of Node-RED 1.0.
The changes in this release are mostly focused on the editor - and there are some significant changes in there.
Editor CSS restructuring
This is probably the largest breaking change we've ever made in the history of Node-RED. It is the sort of change we could only do with a major version bump.
This will break:
- any custom themes that people have created for Node-RED.
- any nodes that have ignored our warnings and custom their appearance in the
editor beyond what we have provided APIs for.
There's no easy way around that. You will want to disable your custom theme before trying this beta for the first time.
Pretty much every single CSS class and DOM ID used by the editor has been changed. The classes and ids we were using reflected 5 years of incremental development, including things dating back to the very first day I started creating Node-RED.
They have served us well this far, but were, frankly, an inconsistent mess for anyone who wanted to create a custom theme, or to try to embed the editor in their own page.
So this release brings a much more consistent naming scheme for all of these things. We avoid setting any global styles to the page, instead applying them only to things within the editor components.
We have also structured the css to make it much easier to create custom colour schemes for the editor. We also provide a script to do a lot of the work for you in generating a custom theme - more details on that in the near future, or, if you're interested, come as in #dev
on slack. I hope that by the time 1.0-final is published, we'll have some 1.0-ready themes available in the community to go with it.
A pretty much complete list of these changes is available here.
If you do see anything in the editor that looks wrong, please do flag it up in this thread. I've checked pretty much every single piece of UI functionality as part of this work, but no doubt there could be some odd edge case that hasn't been hit yet.
New Import/Export dialogs
The clipboard dialogs have been combined with the library import/export dialogs to give a more consistent experience around importing and exporting flows.
The individual type libraries (for example, in the Function node) have also been updated to a matching style.
Catch/Status node
It is now easier to pick which nodes the Catch and Status nodes target. Rather than having to just pick from a long list of nodes, you can now switch back to the workspace and click on the nodes you want.
This is a new facility in the editor that we'll be making use of in other places prior to 1.0 - such as the Debug filter dialog and the Link nodes.
Editor dependencies
We've finally updated the versions of jQuery and jQuery-UI to their latest - 3.4.1 and 1.12.1 respectively. As jQuery 3.x removes a bunch of deprecated APIs that we were previously depending on, we've also included jquery-migrate that keeps things working for now. That has the added benefit of recording any usage of the deprecated APIs so we can start spotting contrib nodes that need to be updated.
Whilst we say hello to the latest version of jQuery, we also say goodbye to Bootstrap. We used the Bootstrap theme in the very early days of the editor and have been slowly weaning ourselves off it. With this release, the last remnants of bootstrap css and JavaScript have been removed.
Context Sidebar auto-refresh
The Context sidebar now has an option to toggle on or off the auto-refreshing of its contents as you switch tabs. It defaults to off.
Picking your language
There is a new option under the user settings dialog to pick what language the editor is presented in. By default it will use the browser's preferred language, but you can override that to use one of the languages we provide: English, Japanese, Chinese, Korean or German.
Node updates
There have been a small number of bugs fixes and enhancements to the core nodes. The CSV node now has an option to turn off its smart detection of number values and to leave them as strings. It turned out it was being a bit too smart for certain edge cases.
And finally, the Template node finally has an option to expand the edit box to a full screen editor, much like the Function node has had for a while. Having recently had to spend some time using the Template node, I can only apologise for it having taken so long to get this feature.
Installing the beta
If you want to try out the beta, you will need specify node-red@next when you use npm to update. Without the @next
you'll still get 0.20.x.
So on a Pi you'd do:
sudo npm install -g --unsafe-perm node-red@next
Reporting problems
If you hit any problems, please report them either as a reply on this topic, or in the #dev slack channel. Please do not post new topics to the forum regarding the beta as that could confuse users who are not using the beta.
Outstanding work
Given the nature of the changes to the editor in this beta, there is likely to be some more work tidying up a few left over pieces - in particular within the node edit dialogs.
There are also some more runtime-focussed changes to come - in particular, adding a new API to allow nodes to declare when they have finished processing a message.