Closed Just-another-pleb closed 3 years ago
Arg hmmm what did that. Can you send me a snippet of the flow where a node is marked invalid?
It becomes "invalid" as soon as I change it form 1x1 size to
2x1` (horizontal)
Ok, update:
Updated dashboard to latest. Restarted NR.
Same.
(Late addition) Just had a thought and checked dashboard widget size. 48 x 48. So it can't be that. Sorry.
Details: RasPi Z (W) Jessie NR 1.2.6 Dashboard 2.26.2 LED 0.4.2
Here's the scenario in pictures.
Now the other machine:
I just pushed 0.4.3 which simplified the editor validation code, let me know if this resolves the issue! You might have to go into the node's config panel or even change a value to refresh the validators.
You beauty! (oh, no smilies)
Works! (I'll let you close it if you are happy)
Only out of interest: Not down to the nuts and bolts level, but what was the problem then?
Rock! Sorry about it breaking, thanks for your patience and working with me on testing it.
Of course, happy that you're interested! I finally got around to something I'd wanted to for a bit with the library. I'm not sure how computer science familiar you are but the library, just like Node-RED was originally written in Javascript. For maintenance and new feature development purposes I finally got around to rewriting it in Typescript. I'd be happy to share the difference between the two or my personal opinions if you aren't familiar!
One of the more important things it did was iron out some of the hacky or ambiguous code that one can get away with in Javascript, which meant things like the editor field validation code had to be thoroughly clarified. When a node is first created and whenever you tab away from a field in the node config panel this code says yay or nay about the value that the user entered and gives the node the opportunity to prompt the user (right now we're just doing the red border highlights). In clarifying the validation code I thought I had translated my original intention but because Javascript's grammar has baked into it certain ambiguities (some of which I could have and should have avoided in the first place) and it was written so long ago I had forgotten my original intent. Rather than sitting down and deciding what it should do I was trying to translate what was there into what I had thought it was meant to do. So today I did that, sat down and decided on how it should behave now. And in the future when I or someone else comes back after a long time/for the first time Typescript and how I wrote it makes it much harder to misinterpret!
Um, sorry, but now it is installed (the latest version) all instances of the LED are now "invalid" and I have to edit the nodes.
So now I have to go and edit all the existing nodes.
Is this right?
It looks like the colours are honored (luckily) but for reasons unknown I have to go and edit every node.
It seems that the LEDs no longer support 1x1 size.
RasPi Z (W) Jessie LED version 0.4.2 NR 1.2.6 Dashboard 2.26.x One has .0 and the other has .1
A few pictures to show.
Ok, sorry about one. RED colours mean BAD. GREEN colours mean GOOD. One I goofed and did RED when it should be GREEN.