vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Feature request: better UI to handle combinatorial explosion of variants
I'm a fan of the variants feature, but in one of my projects, its use is starting to get unwieldy, since the number of available variants suffers from combinatorial explosion.
In this project, I currently have 9 different options I'd like to control using the variants feature -- indeed, there were additional options that I've considering adding at some point, but had to weight that against the increase in variant count, and eventually decided not to add them. While many of these options are binary choices, some have a larger number of choices, compounding the problem. Concretely, using all 9 options works out to almost 5,000 possible variants, and scrolling through them to find the desired one is quite time-consuming.
Recently I cut this down to the 5 most used options, but it still works out to almost 300 possible variants, which is easier to scroll through (but still not ideal) and forces me to run CMake manually when I need to use the other options. Sorting options from least to most commonly modified in the YAML file last helps a bit, so that often the choice is in the first few screenfuls, but is not a proper solution to the problem.
The root of the issue, in my opinion, is the UI choice of a scrollable list containing the cartesian product of all variants. I'd like to propose a different design that handles combinatorial explosion much better: when the user tries to select a variant, a dialog pops up containing combo boxes for each available option -- this works well with the current paradigm of a number of choices per option. Later, this could be extended to use check boxes for binary choice options, and even text fields for open-ended options.
I understand that, for some users, the existing UI works fine and they may dislike the proposed one. Thus, I suggest that the choice of UI should be a setting, and the existing UI might be the default choice to avoid disrupting current workflows.
Thank you for the feature idea. An alternate approach that we might also want to consider would be to add the selection UI to our CMake panel as a tree node. It should be able to show which options are currently selected and provide a mechanism to change the selections since the drop down selectors are transient.
PLEASE do this. The drop-down is un-usable after just a few variants are added.
This would be awesome. I find myself having the same issue described above.
@bobbrow Do you have any updates regarding this feature?