sheikah icon indicating copy to clipboard operation
sheikah copied to clipboard

Radon operator StringMatch is hard to use because field auto formats JSON

Open tmpolaczyk opened this issue 1 year ago • 2 comments

The StringMatch operator has two arguments, the first one is a JSON map:

Captura de pantalla de 2022-11-17 10-21-36

It is easy to input a JSON map with one key:

{"data":true}

But when trying to add another key, like

{"data":true,"from":true}

It is not possible to write the comma after the first "true", because sheikah auto formats the JSON and removes the comma. The only way to enter the desired JSON is to use an external editor, and copy-paste the value.

So Sheikah should not remove that comma and let the user write freely.

tmpolaczyk avatar Nov 17 '22 09:11 tmpolaczyk

Actually, for the sake of UX, matches should use a value => bool input component on the UI and form the JSON map from those. Value input should use an HTML input of the appropriate to the data type (which we know), and bools should be introduced through an HTML select box.

aesedepece avatar Nov 17 '22 12:11 aesedepece

matches should use a value => bool input component on the UI and form the JSON map from those.

True, I always expected something like that, but for this issue I am fine with just being able to input the JSON manually.

tmpolaczyk avatar Nov 17 '22 12:11 tmpolaczyk