ioBroker / ioBroker.javascript

Script engine for JavaScript and Blockly
MIT License
322 stars 120 forks source link

Show current values when creating a blockly script #1498

Closed Stroell closed 2 months ago

Stroell commented 5 months ago

When creating/troubleshooting a blockly script, it would be super helpful to see the current values of states and e.g. current results of "if" statements at a glance. Here a basic mockup of what I mean: BlocklyMockup

You can see directly that current value of "Anwesenheit" is "wahr", the result of the "=" statement is "wahr", the result of the second "=" statement is "falsch" and that the first statement "mache Do something" will be executed.

This could be implemented for a lot of blocks, but I don´t know how complicated that would be. Also a button would make sense to enable/disable this

klein0r commented 5 months ago

In 99% of the cases it is not necessary to use those blocks (e.g. in triggers where you use the given value).

And: Your Blockly script is too complex. A comparison with true or false is redundant code and "sonst falls" should be a normal "sonst". See https://www.youtube.com/watch?v=J9j3K0X9vlc

Stroell commented 5 months ago

Hey, I know your Videos. Thanks for them 👍 This was just one example to show what I mean with the feature request.

So let me take this one. It would be nice if you could see the current value of the variable IAQ, which "und" is currently "true" and which "falls"/"sonst falls" will be executed.

image

PS: After a brave migration to RedisDB (I don´t need instructions for that!!!) I know that a boolean value can be "true", "false" or "NULL", so my bad example from above covers this scenario ;)

klein0r commented 5 months ago

It would be nice if you could see the current value of the variable IAQ

That's even harder. Since there is no interface to the variables in a specific script. And those variable blocks are defined by Google.