Skip to content
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

feat: Type aware UI for creating and accessing variables #3166

Open
2 tasks done
dnmeid opened this issue Dec 3, 2024 · 0 comments
Open
2 tasks done

feat: Type aware UI for creating and accessing variables #3166

dnmeid opened this issue Dec 3, 2024 · 0 comments
Labels
area/gui GUI / Webapp related Enhancement New feature or request

Comments

@dnmeid
Copy link
Member

dnmeid commented Dec 3, 2024

Is this a feature relevant to companion itself, and not a module?

  • I believe this to be a feature for companion, not a module

Is there an existing issue for this?

  • I have searched the existing issues

Describe the feature

Custom variables and module variables can be of all valid JS types but the UI only features a textbox to initialize variables.
It should be possible to create user variables and initialize them also as an boolean, number, array or object.
Maybe the same UI elements like for the button text entry can be reused. If it is switched to text, the variable will be the entry as a string. If it is switched to expression, the variable value will be the JSON-parsed result of the entry.
I don't want to have full expression handling in the initialization, just the same or similar UX.

For places where variables are displayed in the UI they are usually converted to string, so the information of the type gets lost, even if you can perfectly use e.g. arrays in expressions. There should be a type indicator in the variables lists, so users can see and take advantage of variable types.

This request is not about type safety or type handling or type casting, only some UI tweaks.

Usecases

No response

@dnmeid dnmeid added area/gui GUI / Webapp related Enhancement New feature or request labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gui GUI / Webapp related Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant