-
-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve variable naming consistency #2812
Comments
That's not going to happen like you suggest. There is a logic behind variable naming and the syntax of using variable names. I also admit that the naming syntax itself is not the best stuff. |
Thank you for the thorough explanation! I'm curious, since the internal: indicates the module and custom_ distinguishes those variables from the stock ones, would it be of any benefit to have custom variables handled by their own module? I didn't really need the variable names to change, I was just suggesting their presentation in the UI be simplified. Regardless, as I mentioned in my original post, this request is little more than aesthetic and I doubt it would have the broad support you would want. Even I would put this near the bottom of a priority list, but until you explained why, I couldn't know how much an undertaking this was. I do like the idea you suggest of js-like notation. |
I have just realised that I'm not keen on changing I've made the trigger actions dropdown match the
It turns out that companion/shared-lib/lib/Label.js Lines 18 to 20 in ec69e32
I have a feeling it was done under as
Yeah that is true. I did put a fair amount of effort into expanding what expressions can do, but didn't try to invent much new syntax, which has resulted in the I don't know if any of what you proposed has to be a breaking change, it doesn't sound like it would be too bad to retain support for the existing syntax too. If we do go for a more js syntax, I would be tempted to do it as
although I'm not sure I like the lack of One challenge with that js syntax, is that module variables are allowed to contain |
Is this a feature relevant to companion itself, and not a module?
Is there an existing issue for this?
Describe the feature
Depending where you are in Companion a custom variable is referred to as
$(internal:custom_myVar)
{variable substitutions}A custom variable (internal:custom_myVar)
{trigger events, conditions}A custom variable (myVar)
{trigger actions}I would prefer that they were all a bit more consistent (and as brief as possible without introducing ambiguity. I'd suggest:
$(custom:myVar)
for the substitution one andA custom variable (myVar)
for everywhere that's a drop-down optionThe "internal" designation seems redundant in all cases because it appears that all custom variables, by default, are internal.
Usecases
just makes things a bit cleaner, easier to read
The text was updated successfully, but these errors were encountered: