Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node configuration marked as invalid after update to 0.4.2 #63

Closed
Just-another-pleb opened this issue Jan 12, 2021 · 6 comments
Closed

Comments

@Just-another-pleb
Copy link

Just-another-pleb commented Jan 12, 2021

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.

Screenshot from 2021-01-13 10-43-52
Screenshot from 2021-01-13 10-43-59
Screenshot from 2021-01-13 10-44-09
Screenshot from 2021-01-13 10-44-35
Screenshot from 2021-01-13 10-44-39
Screenshot from 2021-01-13 10-45-04
Screenshot from 2021-01-13 10-45-08

@Just-another-pleb Just-another-pleb changed the title Node confied makred as invalid afte update to 0.4.2 Node configuration marked as invalid after update to 0.4.2 Jan 12, 2021
@yoiang
Copy link
Member

yoiang commented Jan 12, 2021

Arg hmmm what did that. Can you send me a snippet of the flow where a node is marked invalid?

@Just-another-pleb
Copy link
Author

It becomes "invalid" as soon as I change it form 1x1 size to 2x1` (horizontal)

@Just-another-pleb
Copy link
Author

Just-another-pleb commented Jan 13, 2021

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.

Screenshot from 2021-01-13 11-29-49
Screenshot from 2021-01-13 11-29-57
Screenshot from 2021-01-13 11-30-01
Screenshot from 2021-01-13 11-30-07
Screenshot from 2021-01-13 11-30-09

Now the other machine:

Screenshot from 2021-01-13 11-33-13
Screenshot from 2021-01-13 11-33-16
Screenshot from 2021-01-13 11-33-20

@yoiang
Copy link
Member

yoiang commented Jan 13, 2021

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.

@Just-another-pleb
Copy link
Author

Just-another-pleb commented Jan 13, 2021

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?

@yoiang
Copy link
Member

yoiang commented Jan 13, 2021

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!

@yoiang yoiang closed this as completed Jan 13, 2021
@yoiang yoiang reopened this Jan 13, 2021
@yoiang yoiang closed this as completed Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants