Hello!
I noticed an inconsistency in the way expression editor in functions references variables.
In a trigger editor expression, you use @variable but in the function editor, you use plural @variables.
In my opinion, these things should be kept the same wherever possible. This makes it possible for simple expressions using same-named variables to be copied 1 to 1. It may also spare experienced users some trouble when force of habit makes them type @variable instead of @variables.
There is also other inconsistencies between different expression editors.
Also copy-pasting the expression sometimes removes the @ and sometimes doesn’t.
Available information as Workspace Name is different…
This is already mentioned in several posts and feature requests.
Hey @enewton , good catch. This is an inconsistency, and we’re scoping it now. @thorsten.langner thanks for flagging the copy-paste and Workspace Name differences too. If you have links to the other posts, drop them here so we can track it in one place.
Quick update on this one, @enewton. We looked at which way to make them match, and we’re leaning toward standardizing on the plural, @variables, since that matches how users, tables and the rest are referenced. That would put the change on the trigger editor side rather than in Functions. No timeline yet, but I’ll post here when there’s an update.
I actually prefer @var. @rec. @aggr. @user.
The expression editor is so small and already it is a lot to type and hard to read…
I tend to agree with Thorsten that making them all as short as possible would be great, since we can’t tab to complete typing these gets long. The function editor has especially long resources, which I find can get deleted randomly while I’m typing them if they are too long. Variable names already need to be long and descriptive since they lack descriptions or documentation. Really, my wish would be to do away with the prefix entirely, just use @ by itself, and require unique names for all assets - for the most part we do that anyway so the specification of table aggregation vs variable isn’t necessary. But, that’s a pretty big change.
Regardless, thank you for looking into it!
Thanks @thorsten.langner, that’s fair feedback, and the size of the editor makes long names harder to work with. We’re looking at a broader set of expression editor improvements, and the first step is making the trigger and function editors consistent, starting with this @variable and @variables difference. I’ve added your points about shorter prefixes and the editor size to the request so they’re considered as part of that work.
cc @enewton 