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

Add the ability to alphabetically sort custom variables #3238

Open
2 tasks done
kenj1 opened this issue Jan 29, 2025 · 4 comments
Open
2 tasks done

Add the ability to alphabetically sort custom variables #3238

kenj1 opened this issue Jan 29, 2025 · 4 comments
Labels
area/gui GUI / Webapp related Enhancement New feature or request

Comments

@kenj1
Copy link

kenj1 commented Jan 29, 2025

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

Add a button on the Variables page to sort the variable names alphabetically. As it is now, variables are not sorted and appear in the order in which they're created (unless manually moved up/down). The screenshot is meant to show the "sort" button (the variables in it are not sorted). And have the button toggle from "Sort ↓" to "Sort ↑" to sort in reverse order.

Image

Usecases

If you have a lot of variables, it's time consuming to scroll up/down to locate a particular variable. Having the ability to sort the variables at any time would be incredibly useful.

@Julusian
Copy link
Member

How would this interact with the manual sorting?

As in, should this only affect how they are shown temporarily (making the button have 3 states, asc/desc/manual), or should it update the stored order to be alphabetical?

I feel like this could be a bit annoying in some ways, as we now use the order that variables are shown here in dropdowns elsewhere, giving a consistent and predictable order. If we make it so that these can be sorted alphabetically, should elsewhere be able to handle that too?

Is the filter not good enough when you want a specific variable?

@kenj1
Copy link
Author

kenj1 commented Jan 29, 2025

How would this interact with the manual sorting?

I do not see any issue with having both. If someone wants to manually sort then they can still do that. If they want to go back to alpha sort then they press the button.

As in, should this only affect how they are shown temporarily (making the button have 3 states, asc/desc/manual), or should it update the stored order to be alphabetical?

It's not temporary, pressing the sort button will sort the variables and leave them in the sorted order for export (if desired).

I feel like this could be a bit annoying in some ways, as we now use the order that variables are shown here in dropdowns elsewhere, giving a consistent and predictable order. If we make it so that these can be sorted alphabetically, should elsewhere be able to handle that too?

The dropdown lists have their own built-in filter (as you type) so I do not see an issue there. I believe sorting alphabetically would make it more predictable in dropdowns.

Is the filter not good enough when you want a specific variable?

The filter is certainly helpful. But when you're looking through the variables (and you have a naming pattern you follow), it's just easier to view them if they're sorted. I have about 50 variables because some modules do not have all necessary variables exposed so I use triggers (and other methods) to create the variables I need dynamically. Having them sorted will definitely help.

Having the ability to sort custom variables would match the ability that every module already does with their variables. The existing sort is based on when the variable was created/added, and requiring the user to manually sort 50+ of variables (or drag and drop a new variable to the right location every time) is a lot of work. A one button press to sort them alphabetically would be incredible useful.

@Julusian
Copy link
Member

Perhaps instead of this being a button it should be a dropdown, to choose between a few orders. Changing the dropdown value would reorder the variables and enable/disable the drag handles.
I think that would feel more natural than a button, as then adding new variables will slot into the ordering automatically.

@Julusian Julusian added Enhancement New feature or request area/gui GUI / Webapp related labels Jan 30, 2025
@kenj1
Copy link
Author

kenj1 commented Jan 30, 2025

I think that's a great idea. Thank you.

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

2 participants