Bases: Formula editor improvements

Use case or problem

If I open formula editor for some property, first of all, the textarea is super small. That often means I have to resize it to be able to see the whole formula. However if I want to make the textarea wider I am only able to resize it to the right side, which means it’s outside of the window and therefore invisible:

Also another problem I feel like is readability of more complex formulas. We are not able to add newlines or indentation. Whole formula is basically one line which is not optimal. If I add newline into the textarea, it’s stripped out from the final string that is put into the YAML file.

Proposed solution

Formula textarea should maybe be wider (and also higher) by default, or automatically scale depending on how big is the formula.

We should be able to put newlines and indentation inside of formulas. This can be either solved by multiline YAML strings, or simply the newlines could be saved as \n in underlying YAML file and translated into actual newlines only in the UI formula editor.

1 Like

I agree! Also some form of autocomplete/code-highlighting for the exisiting functions and to check syntax would be awesome!

I also think this would be beneficial, but would also add that errors in functions should give an indication of what the error is rather than being a warning triangle or silently producing no output.

I’m very interested in using functions but the documentation (and absence of examples other than very simple text manipulation) is a limitation.