Currently form designers build JsonLogic expressions by hand (as JSON) and enter this in a textarea (advanced logic trigger, set variable/component value action,...). This can be improved with a proper editor that builds the expression under the hood.
We are increasingly using JsonLogic and complex expressions are both useful and common (such as using and or or conditions, or negations (!)). It would be useful to have a proper re-usable editor that can be plugged into the supported places, which generates the JSON for the user. They can then select the operator, specify the arguments for the operator and combine expressions + get them presented in a more human-readable manner to better understand what the expression means.
Desired interface:
Keep the textareas with JSON, however, provide a button/icon to "open expression builder". Power users can then still copy-paste JSON from other sources if desired.
On clicking the "open expression builder", open a modal which contains the actual builder
The builder should have the options to
Select an operator (from a dropdown with all known operators)
Allow adding items to the arguments list
Items in the argument list themselves are json logic expressions, so the above bullets recurse
It should initialize with the existing expression from the textarea, if present, and properly display the above UI
It should be possible to close the modal, which is equivalent to cancelling the editing
It should be possible to click a "cancel" button, which closes the modal and does not change the expression
It should be possible to "submit" the builder state, which "persists" the (new) expression into the textarea JSON data and closes the modal
Added value / Toegevoegde waarde
Form designers don't to learn the JSON syntax
Power users can still use JSON syntax
Less mistakes/validation errors because of invalid JsonLogic expressions
Re-usable component, which encourages more use of JsonLogic for features, which reinforces consistency
Thema / Theme
Form designer
Omschrijving / Description
Currently form designers build JsonLogic expressions by hand (as JSON) and enter this in a textarea (advanced logic trigger, set variable/component value action,...). This can be improved with a proper editor that builds the expression under the hood.
We are increasingly using JsonLogic and complex expressions are both useful and common (such as using
and
oror
conditions, or negations (!
)). It would be useful to have a proper re-usable editor that can be plugged into the supported places, which generates the JSON for the user. They can then select the operator, specify the arguments for the operator and combine expressions + get them presented in a more human-readable manner to better understand what the expression means.Desired interface:
Added value / Toegevoegde waarde
Aanvullende opmerkingen / Additional context
No response